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

Jason R. Coombs jaraco at jaraco.com
Tue Jan 21 23:46:01 CET 2014


Surely some depend on the expectation to overwrite. Most of our tests run under Jenkins where the junitxml file is left around to be processed by Jenkins later. I believe that's the expected behavior for most testing frameworks that generate jUnit XML.

> -----Original Message-----
> From: Pytest-dev [mailto:pytest-dev-
> bounces+jaraco=jaraco.com at python.org] On Behalf Of
> achartier at fastmail.fm
> Sent: Tuesday, 21 January, 2014 17:09
> To: pytest-dev at python.org
> Subject: [pytest-dev] Changing the behavior of --junitxml
> 
> 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
> _______________________________________________
> Pytest-dev mailing list
> Pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev


More information about the Pytest-dev mailing list