Execution order of python unitests by their declaration
问题 I'm using python unittests and selenium and in my code I have one test class with many testcases: class BasicRegression(unittest.TestCase): @classmethod def setUpClass(cls): cls.driver = webdriver.Chrome(executable_path=Data.driver) cls.driver.implicitly_wait(1) cls.driver.maximize_window() def testcase1_some_stuff(self): do_something() def testcase2_some_stuff(self): do_something() def testcase3_some_stuff(self): do_something() ... @classmethod def tearDownClass(cls): cls.driver.close() cls