Convert test output to junit xml

How can I convert output trialto JUnit xml format? There is trialno report in this format.

$> trial --help-reporters
Trial output can be customized using plugins called Reporters. You can
select any of the following reporters using --reporter=<foo>

    subunit     subunit output
    bwverbose   Colorless verbose output
    text    terse text output
    verbose     verbose color output (default reporter)
    timing  Timing output
    summary     minimal summary output
+3
source share
2 answers

The easiest way to do this is to install the trial subunit reporter, and then convert the output to JUnit through the subunit2junitxmlone found in the subunit (under the filters in the trunk).

For example, we do:

trial --reporter=subunit | subunit2junitxml --forward --output-to=junitxml-result.xml
+2
source

It was hard for me to handle this. It turns out that the subunit has a new version 2 of this protocol and what the subunit2junitxml version expected. See https://pypi.python.org/pypi/python-subunit

subunit-1to2 , subunit2junitxml. , , , - :

trial --reporter=subunit <mypackage> | subunit-1to2 | subunit2junitxml --no-passthrough --output-to=$WORKSPACE/temp/output.xml

, -.

+6

All Articles