Attribute to mark test or test suite as passed.
Attribute to mark test or test suite as failed.
Attribute to mark test or test suite as skipped.
Attribute to mark test or test suite as errored. It indicates that an unexpected error has happened while testing the test suite.
Name of a test case.
test_configuration
, embedded/test_mqtt_connection
, etc.
Instance of TestStatus
class.
TestStatus.PASSED
Message that explains the reason why a test failed.
Available only when TestCase.status == TestStatus.FAILED
.
Extra output when running a test case.
Test case duration in seconds.
Unexpected happened when running a test case.
Should be an instance of the Python Exception
class.
Instance of TestCaseSource
(see below) that contains
details of the source file and a test case line.
CustomTestRunner class must inherit TestRunnerBase
or
the already implemented runners for supported Testing Frameworks.
See the source code of
already implemented runners.
- Source Code:
Method called to prepare the test runner. This is called
immediately before calling self.stage_building()
.
The default implementation does nothing.
Method called immediately after the self.stage_testing()
method has been called and the result recorded. This is called
even if the test method raised an exception, so the implementation
in subclasses may need to be particularly careful about checking
the internal state. The default implementation does nothing.
Method called to build source code of a particular test.
Method called to upload a testing firmware to the target embedded device. This method is ignored on the Native development platform.
Method called to run test cases and record test results via
calling self.test_suite.add_case(TestCase(...))
.
You can implement your own testing method depending on the
target where tests are running. For example, connecting to the
“BoardFarm/Remote CI Runner” via HTTT/TCP, gathering results,
parsing them, and recoding via self.test_suite.add_case(TestCase(...))
.
Method called to configure a SCons build environment in the testing mode. It is uesfult to provide extra runtime configuration for a testing framework (macros, includes, dynamic configs).
See Unity Test Runner.
Method called on receiving data when running tests
at the stage_testing
. data
can be the
complete test result output, line, or part of a line.
When data are chunked, on_testing_data_output
will be called
multiple times until testing is completed.
data (str) – testing output data
Method called on each line split from data received
by on_testing_data_output
method.
line (str) – testing output line