cucumber-rs / cucumber

Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.
https://cucumber-rs.github.io/cucumber/main
Apache License 2.0
563 stars 69 forks source link

Is it possible to output both Json and Junit #285

Closed ecaponi3 closed 1 year ago

ecaponi3 commented 1 year ago

Looking into ways to use the built in writer's to produce both a json test report as well as a junit xml report from the same run.

Here is an example of how we are using .tee to produce our json file currently:

let world = world.with_writer(cucumber::writer::Basic::stdout() .summarized() .tee(cucumber::writer::Json::new(driver.raw_json_file()?)), ); world.run(products_dir).await;

Is it possible to call on tee again to produce the same report but in xml? Or is there another built in method that would be useful for this?