pub struct RunResult {
pub total_tests: usize,
pub passed: usize,
pub failed: usize,
pub skipped: usize,
pub flaky: usize,
pub not_run: usize,
pub duration: Duration,
pub results: Vec<TestResult>,
}Expand description
Aggregated results of an entire test run.
Contains summary statistics and individual test results. This is the
return value of [Orchestrator::run] and is passed to reporters
for final output.
§Exit Codes
The exit_code method returns conventional exit codes:
| Code | Meaning |
|---|---|
| 0 | All tests passed |
| 1 | Some tests failed or weren’t run |
| 2 | All tests passed but some were flaky |
Fields§
§total_tests: usizeTotal number of tests discovered.
passed: usizeNumber of tests that passed.
failed: usizeNumber of tests that failed (assertions or errors).
skipped: usizeNumber of tests that were skipped.
flaky: usizeNumber of tests that were flaky (passed on retry).
A flaky test is one that failed initially but passed after retrying.
not_run: usizeNumber of tests that couldn’t be run.
Typically due to sandbox creation failures or infrastructure issues.
duration: DurationWall-clock duration of the entire test run.
results: Vec<TestResult>Individual test results for all executed tests.
Implementations§
Source§impl RunResult
impl RunResult
Sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Returns true if the test run was successful.
A run is successful if no tests failed and all scheduled tests were executed. Flaky tests are considered successful (they passed on retry).
§Example
use offload::orchestrator::RunResult;
use std::time::Duration;
let result = RunResult {
total_tests: 100,
passed: 95,
failed: 0,
skipped: 5,
flaky: 2,
not_run: 0,
duration: Duration::from_secs(60),
results: vec![],
};
assert!(result.success());