JUnit XML report

cucumber crate provides an ability to output tests result as a JUnit XML report.

This requires output-junit feature to be enabled in Cargo.toml:

cucumber = { version = "0.17", features = ["output-junit"] }

And configuring output to writer::JUnit:

extern crate cucumber;
extern crate tokio;

use std::{fs, io};
use cucumber::{writer, World as _};

#[derive(cucumber::World, Debug, Default)]
struct World;

async fn main() -> io::Result<()> {
let file = fs::File::create(dbg!(format!("{}/junit.xml", env!("OUT_DIR"))))?;
    .with_writer(writer::JUnit::new(file, 0))