rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.76k stars 2.42k forks source link

junit support #9360

Closed tschuett closed 3 years ago

tschuett commented 3 years ago

It would be great if cargo test could output the result as an junit xml file.

There are some hacks like https://github.com/CWood1/cargo-junit, but integrated support would be awesome.

ehuss commented 3 years ago

Thanks for the suggestion! The test output is driven by libtest, also known as the test harness. It already supports JSON on nightly. There's more discussion of support for formats such as junit at https://github.com/rust-lang/rust/issues/49359, so closing in favor of that. Also, custom test frameworks are another approach for supporting junit output via a custom runner.