Here we are creating TestSuite by using unitTest frameWork and by using test classes of above two file test_ContactUsFormTest.py and test_LoginTest.py
UnitTest is a python inbuilt python test framework.
TestSuite.py
# 1. Import the files import unittest import pytest from AppiumFrameWork.tests.test_LoginTest import LoginTest from AppiumFrameWork.tests.test_ContactUsFormTest import ContactFormTest # 2. Create the object of the class using unitTest cf = unittest.TestLoader().loadTestsFromTestCase(ContactFormTest) gt = unittest.TestLoader().loadTestsFromTestCase(LoginTest) # 3. Create TestSuite regressionTest = unittest.TestSuite([cf, gt]) # 4. Call the Test Runner method unittest.TextTestRunner(verbosity=1).run(regressionTest)
py.test TestSuite.py
py.test --alluredir=”report_path” TestSuite.py py.test --alluredir=’/Documents/Skill2Lead/Tutorials/AppiumPython/AppiumFrameWork/reports’ TestSuite.py