2010-01-12 30 views

回答

0

如果您使用注解@AfterMethod,那么注释的方法将在每个测试方法之后运行。如果你使用alwaysRun选项,那么即使先前调用的一个或多个方法失败或被跳过,它也会运行。

更多信息请访问http://testng.org/doc/documentation-main.html

+0

据我所知,@AfterMethod总是运行,不管你是否使用@AfterMethod(alwaysRun = true)或不。 我*真正*想知道的是,如果我能savely假设序列 测试失败=> ItestListener#onFailue(TestResult中)=> @AfterMethod 或 测试失败=> @AfterMethod => ItestListener#onFailue(TestResult中) – sschuth 2010-01-12 14:57:55

0

@AfterMethod首先在TestNG的5.11调用,但我不知道你能依靠这种行为保持不变将来TestNG的版本。

相关问题