pub struct Runner<'a> { /* private fields */ }Expand description
Runs test cases against a provider using a configuration.
Implementations§
Source§impl<'a> Runner<'a>
impl<'a> Runner<'a>
Sourcepub fn run_all(&self, cases: &[TestCase]) -> Result<Report>
pub fn run_all(&self, cases: &[TestCase]) -> Result<Report>
Run every supplied case across the full platform × model matrix and
collect a Report.
§Errors
Propagates the first crate::Error from loading a skill or a provider
failure. Eval failures are not errors — they are recorded in the report.
Sourcepub fn run_all_streaming(
&self,
cases: &[TestCase],
on_event: &mut dyn FnMut(&StreamEvent<'_>) -> ControlFlow<()>,
) -> Result<Report>
pub fn run_all_streaming( &self, cases: &[TestCase], on_event: &mut dyn FnMut(&StreamEvent<'_>) -> ControlFlow<()>, ) -> Result<Report>
Like Runner::run_all, but drives each turn through
Provider::respond_streaming and delivers each skill tool event to
on_event the instant it is observed. on_event returns
ControlFlow::Break to short-circuit: the current run is torn down (the
provider kills the harness), no further runs start, and the partial
Report built so far is returned.
§Errors
As Runner::run_all.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Runner<'a>
impl<'a> !Send for Runner<'a>
impl<'a> !Sync for Runner<'a>
impl<'a> !UnwindSafe for Runner<'a>
impl<'a> Freeze for Runner<'a>
impl<'a> Unpin for Runner<'a>
impl<'a> UnsafeUnpin for Runner<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more