We use TestNG for testing and we need to see that test is failed but it shouldn't fail all test suite.
Is it possible mark the test and continue testing the suite if this test is fails?
Based on the info you've provided it's really hard to tell what is your motive behind doing that and I would strongly recommend to avoid messing with suite results since you're making this information misleading BUT, in order to do what you want you may try to implement custom ITestListener
, from here you have 2 options:
onTestFailure()
method, but it would still show failed tests in suite results, however suite itself will be marked as passed if there are no test failures. getFailedTests().getAllResults()
from ITestContext
in onFinish()
method.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.