class TestInterfaceCase(unittest.TestCase):
def __init__(self, methodName='runTest'):
super(TestInterfaceCase, self).__init__(methodName)
@classmethod
def setUpClass(cls, casename):
cls.driver = selenium_testcase()
cls.cb = webCase.WebCaseBase(driver=cls.driver, casename=casename)
...
@classmethod
def tearDownClass(cls):
pass
class testRightLogin(TestInterfaceCase):
@classmethod
def setUpClass(cls):
super(testRightLogin, cls).setUpClass(casename="testRightLogin")
@classmethod
def tearDownClass(cls):
cls.driver.quit()
def test_login(cls):
cls.cb.execCase(PATH("../yaml/rightLogin.yaml"))
def test_setting(cls):
cls.cb.execCase(PATH("../yaml/setting.yaml"))
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者