如果测试失败,有人知道第一次调用的是什么吗?@AfterMethod和ITestListener#的TestNG调用序列失败
1
A
回答
0
如果您使用注解@AfterMethod,那么注释的方法将在每个测试方法之后运行。如果你使用alwaysRun选项,那么即使先前调用的一个或多个方法失败或被跳过,它也会运行。
0
@AfterMethod首先在TestNG的5.11调用,但我不知道你能依靠这种行为保持不变将来TestNG的版本。
相关问题
- 1. TestNG @AfterMethod和DataProvider
- 2. 如何在AfterMethod中的TestNG中进行测试失败?
- 3. TestNG @BeforeMethod和@AfterMethod按组运行
- 4. 防止在TestNG的测试使用AfterMethod
- 5. 在TestNG中的@BeforeMethod和@AfterMethod之间共享驱动程序
- 6. TestNG - dependsOnGroups失败
- 7. @AfterMethod在onConfigurationSuccess方法中被调用两次。 TestNG中的错误?
- 8. TestNG的@AfterMethod特定组在Eclipse
- 9. Nunit。使用ITestListener对测试失败截图
- 10. 导致TestNG测试失败?
- 11. TestNG配置失败@AfterTest
- 12. testNG:强制执行@之前*即使以前的调用失败
- 13. 我TestNG的方法里面TestNG的类,通过反射调用其他方法失败登录TestNG的报告
- 14. TestNG的 “基团” 的测试失败
- 15. NunitLite自定义ITestListener,TestOutput()从未调用
- 16. ITestListener - ExtentReport
- 17. TestNG与Powermockito失败的静态方法
- 18. TestNG的平行试验失败
- 19. FactoryGirl序列失败
- 20. @AfterMethod方法使用invocationTimeOut和invocationCount> 2(TestNG 6.9 - > 6.10)时未执行
- 21. 调用失败
- 22. @AfterMethod中的TestNG如何知道测试结果?
- 23. 在@afterMethod中检测跳过的测试与testng
- 24. 失败的蓝牙序列
- 25. Opera和IE8中的AJAX调用失败
- 26. maven testng失败,但在eclipse中工作
- 27. Selenium Webdriver/TestNG/Maven/Xvfb - 截屏失败?
- 28. Testng打印结果通过/失败
- 29. 在Maven中运行TestNG测试失败
- 30. TestNG测试用例序列
据我所知,@AfterMethod总是运行,不管你是否使用@AfterMethod(alwaysRun = true)或不。 我*真正*想知道的是,如果我能savely假设序列 测试失败=> ItestListener#onFailue(TestResult中)=> @AfterMethod 或 测试失败=> @AfterMethod => ItestListener#onFailue(TestResult中) – sschuth 2010-01-12 14:57:55