feat(junit): add includeRetries option to emit each retry as separate testcase#39464
Open
vazidmansuri005 wants to merge 1 commit intomicrosoft:mainfrom
Open
feat(junit): add includeRetries option to emit each retry as separate testcase#39464vazidmansuri005 wants to merge 1 commit intomicrosoft:mainfrom
vazidmansuri005 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
… testcase Adds a new `includeRetries` option (and `PLAYWRIGHT_JUNIT_INCLUDE_RETRIES` env var) to the JUnit reporter. When enabled, each retry attempt is emitted as a separate `<testcase>` entry with `(retry #N)` suffix, giving flaky test detection tools complete visibility into retry behavior. Closes microsoft#29446
c636f9c to
b2dd3db
Compare
Contributor
Author
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.
Description
Adds a new
includeRetriesoption to the JUnit reporter that emits each retry attempt as a separate<testcase>entry, enabling flaky test detection tools to see full retry history.Fixes #29446
Changes
includeRetriesoption on JUnit reporter (default:false)PLAYWRIGHT_JUNIT_INCLUDE_RETRIESfor CI configuration<testcase>with(retry #N)name suffix<failure>or<error>individuallyUsage
Or via environment variable:
PLAYWRIGHT_JUNIT_INCLUDE_RETRIES=1 npx playwright test --reporter=junitExample output (test passes on retry #2)
Edge cases verified
one(failure),one (retry #1)(failure),one (retry #2)(pass)<failure>includeRetries: false(default)includeRetriesincludeProjectInTestName+includeRetries[project1] one (retry #1)PLAYWRIGHT_JUNIT_INCLUDE_RETRIESgetAsBooleanFromENVsame pattern as other optionsTests
Added 3 new tests covering: