[−][src]Trait kevlar::AsyncTestCase
Implement the AsyncTestCase trait in order to run your test asynchronously. The run_async() method will be called by the Test Harness.
#[derive(Default)] struct MyTest; #[async_trait] impl AsyncTestCase for MyTest { async fn run_async(&mut self, test_config: TestConfig, test_record: &mut TestRecord) -> TestResult { info!("Do something interesting"); Ok(()) } }
Required methods
fn run_async<'life0, 'life1, 'async_trait>(
&'life0 mut self,
test_config: TestConfig,
test_record: &'life1 mut TestRecord
) -> Pin<Box<dyn Future<Output = TestResult> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
&'life0 mut self,
test_config: TestConfig,
test_record: &'life1 mut TestRecord
) -> Pin<Box<dyn Future<Output = TestResult> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Run the test case and return the TestStatus code.