[−][src]Crate egress
A super simple, extremely bare-bones regression test library.
This is very minimal and currently doesn't support all that much in the way of API, but if all you want is some super basic regression testing, here it is.
Example
let mut egress = egress!(); let artifact = egress.artifact("basic_arithmetic"); let super_complex_test_output_that_could_change_at_any_time = 1 + 1; // using `serde::Serialize`: artifact.insert_serialize("1 + 1 (serde)", &super_complex_test_output_that_could_change_at_any_time); // or using `fmt::Debug`: artifact.insert_debug("1 + 1 (fmt::Debug)", &super_complex_test_output_that_could_change_at_any_time); // or using `fmt::Display`: artifact.insert_display("1 + 1 (fmt::Display)", &super_complex_test_output_that_could_change_at_any_time); // More options available; please check the docs. egress.close().unwrap().assert_unregressed();
To see the artifacts produced by this example, check egress/artifacts/rust_out/basic_arithmetic.json
.
Macros
egress | Shorthand macro for opening an Egress context, keyed by the |
Structs
Artifact | An |
Egress | A testing context. You can open as many as you want, but make sure their |
Report | Comparison report for newly generated artifacts versus the artifacts stored in
|
Enums
Entry | Artifacts are maps from string keys to |
ErrorKind | Possible failure modes for creating and closing |