feat: render results to HTML page after a CLI test run
This commit is contained in:
parent
01844ed321
commit
c293b46490
1 changed files with 7 additions and 1 deletions
|
@ -41,6 +41,7 @@ mod docker;
|
|||
mod docker_compose;
|
||||
mod errors;
|
||||
mod git;
|
||||
mod pages;
|
||||
mod runner;
|
||||
mod settings;
|
||||
mod utils;
|
||||
|
@ -114,11 +115,16 @@ async fn main() -> std::io::Result<()> {
|
|||
suites: suite_results,
|
||||
init_containers,
|
||||
};
|
||||
let results_file = path.join("resuts.json");
|
||||
let results_file = path.join("results.json");
|
||||
println!("Writing results to: {:?}", path.canonicalize());
|
||||
std::fs::write(results_file, serde_json::to_string(&content).unwrap()).unwrap();
|
||||
let results_html_file = path.join("results.html");
|
||||
let contents = pages::ViewResult::new(pages::Payload { results: content }).render();
|
||||
std::fs::write(results_html_file, contents).unwrap();
|
||||
println!("Writing results to: {:?}", path.canonicalize());
|
||||
|
||||
crate::runner::suite::SuiteRunnerState::stop_proxy(ctx.as_ref());
|
||||
|
||||
serv.stop(true).await;
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue