[pytest-dev] Changing the behavior of --junitxml

achartier at fastmail.fm achartier at fastmail.fm
Tue Jan 21 23:09:18 CET 2014


Hi,

I would like to propose a change to the behavior of the --junitxml
option.

Currently, if the same XML file path is specified for multiple
invocations of pytest, the file is overwritten. For our use case, we
would like the ability to append new test results to an existing JUnit
XML file so we don't lose previous results. This is important for us, as
we are automating calls to pytest and would like to avoid the need to
create a consolidated JUnit XML results file ourselves (i.e., by
specifying a different argument to --junitxml for each invocation and
then consolidating all the separate XML files into a single one for
consumption by our tool).

Is this behavior change something that could be considered for the next
release of pytest? If other pytest users are relying on the existing
overwriting behavior of --junitxml, perhaps another pytest option could
be added to toggle between overwrite and append behavior.

Best,

Alfonso


More information about the Pytest-dev mailing list