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

Junit retry tests formatting #32

Open
shreyanshp opened this issue Feb 3, 2022 · 3 comments
Open

Junit retry tests formatting #32

shreyanshp opened this issue Feb 3, 2022 · 3 comments

Comments

@shreyanshp
Copy link

We have a small issue wherein since we retry our tests for failure, how do we incorporate that with danger-junit, because junit.report would fail even for single test 😓

@orta
Copy link
Owner

orta commented Feb 3, 2022

Is there a special output format in junit for describing that? Otherwise that problem probably lives in you test runner

@sebskuse
Copy link

@orta there isn't, unfortunately. We faced the same issue using trainer to generate JUnit off the back of Xcode with test retries enabled - the JUnit simply has multiple entries for the same test. I did have a look at the JUnit spec and there doesn't seem to be a way to model this properly.

I actually added the functionality to parse this in a fork of danger-junit (the functionality is only enabled if you switch on a flag, otherwise it defaults to the standard behaviour of any-failure-is-a-failure). We wanted to maintain the full list of tests + retries inside the JUnit so it can be inspected by other parts of our build system.

I didn't open a PR as I wasn't sure it'd be accepted, as this doesn't feel like a "standard" JUnit thing, but if you'd be amenable I could. Changes are here: master...Gousto:feature/test-retries

@angelolloqui
Copy link

We are running into the exact same issue with some flaky tests. I think this addition makes total sense... is there any plan to merge it? if not, how should I use your fork? thanks!

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

4 participants