Skip to content

Syntax for combining multiple heterogoneous writers #234

Answered by ilslv
thomasmathews01 asked this question in Q&A
Discussion options

You must be logged in to vote

@thomasmathews01

What version of cucumber are you on? I can't reproduce this on the latest 0.15.1. Probably the issue you've encountered is already fixed in #232

use std::{fs::File, io};

use cucumber::{writer, World as _, WriterExt as _};

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

#[tokio::main]
async fn main() -> io::Result<()> {
    let junit_output_file = File::create(format!("junit.xml"))?;
    let json_output_file = File::create(format!("cucumber.json"))?;

    World::cucumber()
        .with_writer(
            writer::Libtest::or_basic()
                .tee::<World, _>(writer::JUnit::for_tee(
                    junit_output_file,
                    writer::Verbo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@thomasmathews01
Comment options

Answer selected by thomasmathews01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants