将试验输出转换为junit xml

ДМИ*_*КОВ 4 python junit report

如何将trial输出转换为JUnit xml格式?没有这种可能的报告格式trial.

$> trial --help-reporters
Trial's 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
Run Code Online (Sandbox Code Playgroud)

小智 7

我很难过.原来子单元有一个新版本的协议,这就是subunit2junitxml的版本所期待的.请参阅https://pypi.python.org/pypi/python-subunit

在管道到subunit2junitxml之前,我不得不通过subunit-1to2过滤器传递试验结果.所以我最终得到的命令是:

trial --reporter=subunit <mypackage> | subunit-1to2 | subunit2junitxml --no-passthrough --output-to=$WORKSPACE/temp/output.xml
Run Code Online (Sandbox Code Playgroud)

希望这有助于某人.