我需要测试用例名称进入我的拆解方法,有没有办法在python + nosetest中获取测试用例名称?
def test_google(self):
self.driver = webdriver.Firefox()
self.driver.get("http://www.google.com")
def tearDown(self):
print ("Need to get test case name")
self.driver.quit()
试试打印self._testMethodName它将打印测试用例名称