I am writing a small program and my test classes should produce error or success output and debug output. I use cargo test -- --nocapture but it prints output from println!()in between the output from cargo.
Is there another way to only see this generated output from the tests?
I'm not sure whether this is what you meant, but to get less intermixed output, use --show-output instead of --nocapture. This captures output like the normal mode, but prints it even if the tests pass.