-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Double reporting teardown failure #9909
Comments
teardowns are always associated with the most recent test which ran in some cases this results in multiple statuses for a single test everything shown in the issue is expected |
perfect, thanks for the quick response :-) |
@asottile as this one is about sometimes doublse, sometimes single entries in the junit report, |
@RonnyPfannschmidt there isn't a sometimes doubling if you look at the xml -- op was just confused by which test the teardown failure was associated with |
Hmm, I think the doubling doesn't always occur. In example 1, |
@asottile as im reading this again on a computer, its clearly doing something wrong it should report the teardown errors in the junit and it shouldnt have double reports blindly so either we are missing a report or something else is completely amiss |
Hello @RonnyPfannschmidt , I think we hit the related issue to this (see my comment here) and then our report which we are uploading to Report Portal is missing some of the properties for duplicate case. Not sure how to W/A or fix this different way to at least have our properties reported in all of the occurrences of failures in junit XML report? Thanks |
@petr-balogh a workaround could be to preprocess the report to merge the items manually, I haven't investigated this any further so far |
This is still an issue with the pytest 8.3.3. What's really odd is that the XML has an extra test entry versus the output of pytest |
Looks like we need to deal with test design principles because setup and teardown are steps to instrument your system but not test itself. I suggest move the bug to Discuss section. |
When the teardown fails, the last test case gets reported twice, both with it's own verdict, and with the error of the teardown.
This also happens in the junitxml, but only if the last test case fails (example 2).
My main question is: is this behavior intended (especially the double reporting within the junit-xml where the same test case shows up twice)?
There is a related issue reporting that the test number is wrong if the teardown fails, which also shows up here.
Example 1: Last test case passes
In the junit-xml, the test shows up only once.
Example 2: Last test case fails
If we switch the order of the test cases, the double reporting also shows up in the junit-xml.
My setup
The text was updated successfully, but these errors were encountered: