Cucumber JSON format

cucumber crate provides an ability to output tests result in a Cucumber JSON format.

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

cucumber = { version = "0.20", features = ["output-json"] }

And configuring output to writer::Json:

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(format!("{}/report.json", env!("OUT_DIR")))?;