-
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:
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? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@ecaponi3 yes, you can use .with_writer(
writer::Basic::stdout()
.summarized()
.tee(writer::Json::new(json.reopen().unwrap()))
.tee(writer::JUnit::new(junit.reopen().unwrap(), 1)),
) You can also speed up computations a bit by using non-normalized .with_writer(
writer::Basic::raw(io::stdout(), Coloring::Auto, 0)
.summarized()
.tee(writer::Json::for_tee(json))
.tee(writer::JUnit::for_tee(junit, 1))
.normalized(),
) |
Beta Was this translation helpful? Give feedback.
@ecaponi3 yes, you can use
WriterExt::tee()
to chain any number ofWriter
s:You can also speed up computations a bit by using non-normalized
Writers
inWriterExt::tee()
and lift a single normalization: