pub struct TestRunner { /* private fields */ }Expand description
Test runner for executing tests with framework detection
Implementations§
Source§impl TestRunner
impl TestRunner
Sourcepub fn new(project_root: impl AsRef<Path>) -> Self
pub fn new(project_root: impl AsRef<Path>) -> Self
Create a new test runner for the given project root
Sourcepub fn current_dir() -> ExecutionResult<Self>
pub fn current_dir() -> ExecutionResult<Self>
Create a test runner for the current directory
Sourcepub fn detect_framework(&self) -> ExecutionResult<TestFramework>
pub fn detect_framework(&self) -> ExecutionResult<TestFramework>
Detect the test framework based on project structure
Sourcepub fn run_tests(&self, pattern: Option<&str>) -> ExecutionResult<TestResults>
pub fn run_tests(&self, pattern: Option<&str>) -> ExecutionResult<TestResults>
Sourcepub fn build_test_command(
&self,
framework: &TestFramework,
pattern: Option<&str>,
) -> ExecutionResult<(String, Vec<String>)>
pub fn build_test_command( &self, framework: &TestFramework, pattern: Option<&str>, ) -> ExecutionResult<(String, Vec<String>)>
Build test command for the detected framework
Auto Trait Implementations§
impl Freeze for TestRunner
impl RefUnwindSafe for TestRunner
impl Send for TestRunner
impl Sync for TestRunner
impl Unpin for TestRunner
impl UnwindSafe for TestRunner
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