1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! # Reporter Module
//!
//! Generates test reports in multiple formats from test execution results.
//!
//! ## Supported Formats
//!
//! - **Markdown**: Human-readable summary with tables
//! - **JSON**: Machine-readable structured data
//! - **HTML**: Interactive web-based reports with filtering
//! - **JUnit**: CI/CD compatible XML format
//!
//! ## Example Usage
//!
//! ```no_run
//! use cli_testing_specialist::reporter::MarkdownReporter;
//! use cli_testing_specialist::types::TestReport;
//! use std::path::Path;
//! use std::time::Duration;
//! use chrono::Utc;
//!
//! let report = TestReport {
//! binary_name: "curl".to_string(),
//! binary_version: Some("8.7.1".to_string()),
//! suites: vec![],
//! total_duration: Duration::from_secs(5),
//! started_at: Utc::now(),
//! finished_at: Utc::now(),
//! environment: Default::default(),
//! security_findings: vec![],
//! };
//!
//! MarkdownReporter::generate(&report, Path::new("report.md"))?;
//! # Ok::<(), cli_testing_specialist::error::CliTestError>(())
//! ```
//!
//! ## Multi-Format Generation
//!
//! ```no_run
//! use cli_testing_specialist::reporter::{MarkdownReporter, JsonReporter, HtmlReporter};
//! use cli_testing_specialist::types::TestReport;
//! use std::path::Path;
//! use std::time::Duration;
//! use chrono::Utc;
//! # let report = TestReport {
//! # binary_name: "curl".to_string(),
//! # binary_version: Some("8.7.1".to_string()),
//! # suites: vec![],
//! # total_duration: Duration::from_secs(0),
//! # started_at: Utc::now(),
//! # finished_at: Utc::now(),
//! # environment: Default::default(),
//! # security_findings: vec![],
//! # };
//!
//! // Generate all formats
//! MarkdownReporter::generate(&report, Path::new("report.md"))?;
//! JsonReporter::generate(&report, Path::new("report.json"))?;
//! HtmlReporter::generate(&report, Path::new("report.html"))?;
//! # Ok::<(), cli_testing_specialist::error::CliTestError>(())
//! ```
// Re-export reporters
pub use HtmlReporter;
pub use JsonReporter;
pub use JunitReporter;
pub use MarkdownReporter;