suite

test suite python - webdriver

非 Y 不嫁゛ 提交于 2019-12-01 08:41:47
I'm new with python, and I'm trying to create my own test suite. The main pourpose is to execute the same test on different browser, that's why I used the variable browser, that is used within the test to call the webdriver. I have this: def test_01(self,browser): def test_02(self,browser): my Suite: def suite(): test_suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(Test01)) return test_suite main: if __name__ == "__main__": suite1 = unittest.TestSuite() self = Test01() suite1.addTest(Test01.test_01(self, 'firefox')) suite1.addTest(Test01.test_02(self, 'firefox')) unittest