Skip to content

Converts cargo's json output (from stdin) to JUnit XML (to stdout).

License

Notifications You must be signed in to change notification settings

jstarks/cargo2junit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

cargo2junit

[WORK IN PROGRESS] Converts cargo's json output (from stdin) to JUnit XML (to stdout).

To use, first install:

cargo install cargo2junit

Then, run cargo test and convert:

cargo test -- -Z unstable-options --format json | cargo2junit > results.xml

Or, use tee for streaming output to console as the tests run:

cargo test -- -Z unstable-options --format json | tee results.json
cat results.json | cargo2junit > results.xml

Once you have your XML, publish it (e.g. for Azure Pipelines):

  - task: PublishTestResults@2
    inputs: 
      testResultsFormat: 'JUnit'
      testResultsFiles: 'test_results.xml'
    condition: succeededOrFailed()

About

Converts cargo's json output (from stdin) to JUnit XML (to stdout).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Rust 100.0%