junit-report-rs icon indicating copy to clipboard operation
junit-report-rs copied to clipboard

Is there any way to include this using cargo test?

Open christopher-wilke opened this issue 3 years ago • 4 comments

christopher-wilke avatar Mar 04 '22 09:03 christopher-wilke

@christopher-wilke I'm not sure what you are asking?

bachp avatar Mar 04 '22 15:03 bachp

@bachp: Sorry for being a bit too unclear here! A typical tests looks like this.

#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}

You can then run cargo test to see if your tests succeeded or failed.

Is there any way to include junit-report-rs using the approach above?

christopher-wilke avatar Mar 05 '22 08:03 christopher-wilke

If I understand correctly you like to format the output of cargo test into a junit compatible format.

This is outside of the scope of this crate, but there is another project called cargo2junit that might do what you want.

bachp avatar Mar 05 '22 09:03 bachp

If I understand correctly you like to format the output of cargo test into a junit compatible format.

This is outside of the scope of this crate, but there is another project called cargo2junit that might do what you want.

Thanks for your reply! Unfortunately, cargo is not available on our target platform, we only have the compiled binary.

christopher-wilke avatar Mar 09 '22 13:03 christopher-wilke