I have a Selenium Class with a few methods:
class MyTest(unittest.TestCase):
cls.USER = 'user'
cls.PASSWORD = 'password'
cls.browser = Chrome()
cls.browser.get('http...')
def test_1(self):
.....
def test_2(self):
.....
def test3(self):
.....
As I add more methods, the one that is called first when I execute the entire MyTest
class changes. Sometimes method test3
will get called first, but if I add another method, maybe test2
will be called first. How can I make sure test_1
is always called first?