Skip to main content

TestEvent

Enum TestEvent 

Source
pub enum TestEvent {
Show 15 variants RunStarted { adapter: String, framework: String, project_dir: PathBuf, }, SuiteStarted { name: String, }, TestStarted { suite: String, name: String, }, TestFinished { suite: String, test: TestCase, }, SuiteFinished { suite: TestSuite, }, RunFinished { result: TestRunResult, }, RawOutput { stream: Stream, line: String, }, WatchRerun { changed_files: Vec<PathBuf>, }, RetryStarted { test_name: String, attempt: u32, max_attempts: u32, }, RetryFinished { test_name: String, attempt: u32, passed: bool, }, FilterApplied { pattern: String, matched_count: usize, }, ParallelAdapterStarted { adapter: String, }, ParallelAdapterFinished { adapter: String, result: TestRunResult, }, Warning { message: String, }, Progress { message: String, current: usize, total: usize, },
}
Expand description

Events emitted during test execution, enabling decoupled output rendering.

Variants§

§

RunStarted

Test run is starting.

Fields

§adapter: String
§framework: String
§project_dir: PathBuf
§

SuiteStarted

A test suite has started executing.

Fields

§name: String
§

TestStarted

A single test has started.

Fields

§suite: String
§name: String
§

TestFinished

A single test has completed.

Fields

§suite: String
§

SuiteFinished

An entire suite has completed.

Fields

§

RunFinished

The entire test run has completed.

Fields

§

RawOutput

Raw output line from the test process.

Fields

§stream: Stream
§line: String
§

WatchRerun

Watch mode: files changed, triggering re-run.

Fields

§changed_files: Vec<PathBuf>
§

RetryStarted

Retry: a failed test is being retried.

Fields

§test_name: String
§attempt: u32
§max_attempts: u32
§

RetryFinished

Retry: attempt completed.

Fields

§test_name: String
§attempt: u32
§passed: bool
§

FilterApplied

Filter applied to test run.

Fields

§pattern: String
§matched_count: usize
§

ParallelAdapterStarted

Parallel: an adapter run started.

Fields

§adapter: String
§

ParallelAdapterFinished

Parallel: an adapter run finished.

Fields

§adapter: String
§

Warning

A warning message (non-fatal).

Fields

§message: String
§

Progress

A progress tick (for long-running operations).

Fields

§message: String
§current: usize
§total: usize

Trait Implementations§

Source§

impl Clone for TestEvent

Source§

fn clone(&self) -> TestEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TestEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.