Repository navigation
Conversation
…ework#452) TestNG ends an attempt that its retry analyzer retries with the SKIP status, and AllureTestNg reported it as skipped. The attempt actually failed, so the result now carries the status of its throwable: failed for an AssertionError, broken for anything else. Tests skipped for any other reason are still reported as skipped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Fixes #452.
When a TestNG retry analyzer retries a test, TestNG ends the failed attempt with the SKIP status and
wasRetried()set.onTestSkippedstopped every one of those attempts asSKIPPED, so the retries in the report said "skipped" and the real failure only showed up in the status details.Now
onTestSkippedchecksresult.wasRetried(), and a retried attempt gets the status of its throwable through the existinggetStatus:FAILEDfor anAssertionError,BROKENfor anything else. Tests skipped for any other reason (failed dependencies,SkipException, data providers) are stillSKIPPED.I left the flaky flag alone. From the discussion in allure-framework/allure2#1135, flakiness comes from history in the report rather than from the adapter, so this only fixes the status of the attempts.
Tests:
shouldKeepFailedStatusOfRetriedAttemptruns a new sample that fails an assertion and passes on the retry. Onmainthe two attempts come out asSKIPPEDandPASSED; with this change they'reFAILEDandPASSED.shouldKeepBrokenStatusOfRetriedAttemptruns the existingRetryTestsample, which always throws. Onmainthat'sSKIPPEDandBROKEN; now it'sBROKENandBROKEN.Everything ran through
allure agent. The two new tests fail onmainfor exactly that reason, and the whole:allure-testng:testpasses with the change (349 of 349).spotlessCheck,checkstyleMain,pmdMainandspotbugsMainpass forallure-testng.#1519 adds a few lines right above the same
stopTestcall inonTestSkipped, so whichever one lands second needs a small rebase. Happy to do that on my side.Checklist