junitxml not picking up user_properties in case of failure in call and error in teardown #6826
Labels
plugin: junitxml
related to the junitxml builtin plugin
type: bug
problem that needs to be addressed
JunitXML is not picking up user_properties for the new test case that's created when there is a failure in call and error in teardown.
Here is where it opens a new test case.
https://github.com/pytest-dev/pytest/blob/master/src/_pytest/junitxml.py#L561
We need to do what's done here
https://github.com/pytest-dev/pytest/blob/master/src/_pytest/junitxml.py#L583
after line 561 to add user_properties to close_report as well.
To reproduce the issue
conftest.py
test_sample.py
run
pytest test_sample.py --junitxml=test.xml
You will see that in the first test case in test.xml, there is no property set, where as the second one has it.
I am using pytest 5.3.5
The text was updated successfully, but these errors were encountered: