You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
record_xml_attribute not visible in JUnit XML when using pytest-xdist #8654
I run this this test twice using following command: py.test test_example.py --junit-xml=without_xdist.xml and then py.test test_example.py --junit-xml=with_xdist.xml -n auto
@RonnyPfannschmidt it seems that i can update existing attributes but can't add new ones.
another note, although i use xdist in my project - i've tried to update the xml with a single test running
Same issue for me as well. pytest-xdist does not add record_xml_attribute to the xml output file.
I tried with all of these, but none of them working: py.test test.py --junitxml=test.xml --no-header -o junit_family=xunit1 py.test test.py --junitxml=test.xml --no-header -o junit_family=xunit2 py.test test.py --junitxml=test.xml --no-header -o junit_family=legacy
Activity
raphaelcastaneda commentedon Jul 22, 2020
Does the
record_propertyfixture fail in the same way?raphaelcastaneda commentedon Jul 22, 2020
To answer my own question: no it does not.
record_propertywas updated to add pytest-xdist support here: 8b49ddfgs202 commentedon May 10, 2021
I've encountered the same issue, will it be resolved?
RonnyPfannschmidt commentedon May 10, 2021
just took note on this again
@raphaelcastaneda thanks for the analysis, moved to the main repo as we have to fix this inside of pytes
gs202 commentedon May 11, 2021
@RonnyPfannschmidt it seems that i can update existing attributes but can't add new ones.
another note, although i use xdist in my project - i've tried to update the xml with a single test running
RonnyPfannschmidt commentedon May 11, 2021
@gs202 im not sure what you are referring to here
the issue is primarily about the
record_xml_attributefixture not using a storage/transport mechanism that that transfers via xdistgs202 commentedon May 11, 2021
I'll use an example for this test:
Here is the junit xml file without using
record_xml_attribute:After adding
record_xml_attributeto the test:The xml file will be:
As you can see the
classnameattribute was overridden but theassertionsdoesn't existRonnyPfannschmidt commentedon May 11, 2021
@gs202 at first glance that is a different issue, please open a new one
gs202 commentedon May 11, 2021
@RonnyPfannschmidt #8662
nicoddemus commentedon May 18, 2021
Perhaps this is the same issue as #8662 (comment)?
rom1011 commentedon Jan 12, 2022
I would like to follow up on this issue when using xdist like mentioned in the subject:
Running
py.test test.py --junitxml=test.xml --no-header -o junit_family=xunit1generates
While enabling xdist
py.test test.py --junitxml=test_xdist.xml --no-header -o junit_family=xunit1 -n=1does not generate the assertion and does not update the classname attribute:
ChintanDonda commentedon May 12, 2022
Same issue for me as well. pytest-xdist does not add
record_xml_attributeto the xml output file.I tried with all of these, but none of them working:
py.test test.py --junitxml=test.xml --no-header -o junit_family=xunit1py.test test.py --junitxml=test.xml --no-header -o junit_family=xunit2py.test test.py --junitxml=test.xml --no-header -o junit_family=legacyAny solution?
nicoddemus commentedon May 12, 2022
Unfortunately
record_xml_attributedoes not work with xdist under the current design/implementation.I think we should at least raise an error/warning if
record_xml_attributeis used with xdist.