pub struct TestSuite {
pub name: String,
pub settings: TestSuiteSettings,
pub test_settings: TestCaseSettings,
/* private fields */
}
Expand description
Test suite representing a group of tests.
Fields§
§name: String
Name of the test group.
settings: TestSuiteSettings
Settings to use for the test suite.
test_settings: TestCaseSettings
Test settings to use for all tests.
Implementations§
Source§impl TestSuite
impl TestSuite
Sourcepub fn new_with_settings(
name: String,
settings: TestSuiteSettings,
test_settings: TestCaseSettings,
) -> TestSuite
pub fn new_with_settings( name: String, settings: TestSuiteSettings, test_settings: TestCaseSettings, ) -> TestSuite
Create a new test suite with given suite and test settings.
Sourcepub fn push(&mut self, test: TestCase)
pub fn push(&mut self, test: TestCase)
Add a test to the suite.
Tests added to the suite will be run when the suite is executed.
Sourcepub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>
pub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>
Run all tests belonging to the test suite on given serial port.
Execution will stop early if stop_on_failure is set and a test fails.
Sourcepub fn run_and_print(&mut self, serial: &mut Serial, quiet: bool) -> bool
pub fn run_and_print(&mut self, serial: &mut Serial, quiet: bool) -> bool
Run all tests belonging to the test suite on given serial port and print the results.
Execution will stop early if stop_on_failure is set and a test fails.
Sourcepub fn successful(&self) -> usize
pub fn successful(&self) -> usize
Get the number of successful tests.
Will return 0 if not run before.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestSuite
impl RefUnwindSafe for TestSuite
impl Send for TestSuite
impl Sync for TestSuite
impl Unpin for TestSuite
impl UnwindSafe for TestSuite
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