ab1caef8c3
1. Test suites in prior ztest serve no purpose other than logical ordering of tests into a named-group. Move the construct of setup and teardown into the test suite and away from individual tests. Additionally, add the constructs of before/after to the test suites. This model more closely resembels other testing frameworks such as gTest and Junit. 2. Test can be added to a suite by using ZTEST() or ZTEST_F() where _F stands for fixture. In the case where _F is used, the argument `this` will be provided with the type `struct suite_name##_fixture*`. Again, this models other modern testing frameworks and allows the test to directly access the already set up data related to the test suite. 3. Add the concept of test rules (from Junit). Rules are similar to the before/after functions of the test suites but are global and run on all suites. An example of a test rule can be to check that nothing was logged to ERROR. The rule can cause the test to fail if anything was logged to ERROR during an integration test. Another example would be a rule that verifies that tests ran within some defined timeout. Signed-off-by: Yuval Peress <peress@google.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj_verbose_0.conf | ||
prj_verbose_1.conf | ||
prj_verbose_2.conf | ||
testcase.yaml |