This website requires JavaScript.
Explore
Help
Sign In
OrgZephyr
/
zephyr
mirror of
https://github.com/zephyrproject-rtos/zephyr.git
Watch
1
Star
0
Fork
You've already forked zephyr
0
Code
Issues
Releases
Wiki
Activity
6d56988e43
zephyr
/
samples
/
subsys
/
testsuite
/
integration
/
prj.conf
3 lines
38 B
Plaintext
Raw
Normal View
History
Unescape
Escape
ztest: Add documentation Origin: Original Change-Id: I0927c25fbbba5d4863f199d058d311c10d52d784 Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-08-26 18:26:10 +08:00
CONFIG_ZTEST=y
ztest: Update ztest with more powerful testing APIs 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>
2021-10-21 04:01:43 +08:00
CONFIG_ZTEST_NEW_API=y