Search This Blog........

Monday, 15 January 2018

Learn python unit test in 30 minutes.


Learn appium basics in 30 minutes.


Learn selenium basics (python) in 30 minutes.


Learn seagul tool in 30 minutes.


Learn SIPp (VoIP,SIP,RTP) performance tool in 30 minutes.

Index:
  1. Introduction about tool.
  2. How to install SIPp tool in linux.
  3. How to run basic sipp client and server.
  4. How to create own xml file and passing values from csv file.
  5. How to run perform test(FG,BG).
  6. How to get reports and analyze CC & CPS parameters.

Learn JMeter in 30 Minutes for REST API testing

Index:
  1. How to install Jmeter.
  2. How to create thread group, request defaults,manager and sampler.
  3. How to run thread and verifying results.
  4. How to pass values from CSV file and from command line.
  5. How to perform load test 
  6. How to generate HTML reports from the performance test.

Wednesday, 13 July 2016

Python unit testing

Python Unit testing tutorial



Unit test: 
Using python default unittest allows you to write more robust tests.

The unittest module  provides a runner to execute tests i.e, grouping tests in to logical unit and the concept of setup and teardown.
Lets see one example.....,
import unittest

class Test(unittest.TestCase):
    def setUp(self):
        self.num=1

    def test_math(self):
        self.assertEqual(self.num,1)


if __name__ ==  '__main__':
    unittest,main()   


Explanation
A testcase is class that inherits from unittest.
The function(def) inside class all require a mandatory parameter named self 
When running unittest.main(), that take care of finding all the testcases. Calling setUp method first (whose name start with test) and then finally calling method called tearDown()