pub trait Plugin: Send {
// Required methods
fn name(&self) -> &str;
fn version(&self) -> &str;
fn on_event(&mut self, event: &TestEvent) -> Result<()>;
fn on_result(&mut self, result: &TestRunResult) -> Result<()>;
// Provided method
fn shutdown(&mut self) -> Result<()> { ... }
}Expand description
A plugin that hooks into the test execution lifecycle.
Plugins receive events as they occur and can act on the final result. They are registered with a PluginManager before the test run starts.
Required Methods§
Sourcefn on_event(&mut self, event: &TestEvent) -> Result<()>
fn on_event(&mut self, event: &TestEvent) -> Result<()>
Called for each event during test execution.
Sourcefn on_result(&mut self, result: &TestRunResult) -> Result<()>
fn on_result(&mut self, result: &TestRunResult) -> Result<()>
Called once the test run is complete with the final result.