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