[][src]Struct serial_unit_testing::tests::test_suite::TestSuite

pub struct TestSuite {
    pub name: String,
    pub settings: TestSuiteSettings,
    pub test_settings: TestCaseSettings,
    // some fields omitted
}

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.

Methods

impl TestSuite[src]

pub fn new(name: String) -> TestSuite[src]

Create a new test suite.

pub fn new_with_settings(
    name: String,
    settings: TestSuiteSettings,
    test_settings: TestCaseSettings
) -> TestSuite
[src]

Create a new test suite with given suite and test settings.

pub fn push(&mut self, test: TestCase)[src]

Add a test to the suite.

Tests added to the suite will be run when the suite is executed.

pub fn run(&mut self, serial: &mut Serial) -> Result<bool, String>[src]

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.

pub fn run_and_print(&mut self, serial: &mut Serial, quiet: bool) -> bool[src]

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.

pub fn len(&self) -> usize[src]

Get the number of tests belonging to the test suite.

pub fn is_empty(&self) -> bool[src]

Check if any test belongs to the test suite.

pub fn failed(&self) -> usize[src]

Get the number of failed tests.

Will return 0 if not run before.

pub fn successful(&self) -> usize[src]

Get the number of successful tests.

Will return 0 if not run before.

Trait Implementations

impl ToString for TestSuite[src]

impl Debug for TestSuite[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]