Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retries and flaky tests #62

Open
pandoras-toolbox opened this issue Nov 7, 2023 · 0 comments
Open

Retries and flaky tests #62

pandoras-toolbox opened this issue Nov 7, 2023 · 0 comments

Comments

@pandoras-toolbox
Copy link

Does the open-test-reporting format support to display that a test has been retried?

The legacy XML test output supports it, for instance Maven Surefire produces:

<testcase name=".." classname=".." time="0.1">
  <flakyFailure message="exception message" type="assertion exception">
    <stackTrace>flaky failure stack trace</stackTrace>
    <system-out> flaky failure System.out log message </system-out>
  </flakyFailure>
  <system-out> success </system-out>
</testcase>

Tools like Allure Report can identify flaky tests with that information and correctly display retries of a whole test.

I am not sure where the specification for flakyFailure originates from, and if there is also a flakySuccess, meaning that after several retries the test finally succeeded. But these are good test reporting features, not so much for unit tests, more for higher level tests.

Of course retrying a whole tests should not be done in normal circumstances, but sometimes it is good to retry them automatically, especially for end-to-end tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant