135375f98Sopenharmony_ci# Unity Fixtures 235375f98Sopenharmony_ci 335375f98Sopenharmony_ciThis Framework is an optional add-on to Unity. 435375f98Sopenharmony_ciBy including unity_fixture.h in place of unity.h, you may now work with Unity in a manner similar to CppUTest. 535375f98Sopenharmony_ciThis framework adds the concepts of test groups and gives finer control of your tests over the command line. 635375f98Sopenharmony_ci 735375f98Sopenharmony_ciThis framework is primarily supplied for those working through James Grenning's book on Embedded Test Driven Development, or those coming to Unity from CppUTest. 835375f98Sopenharmony_ciWe should note that using this framework glosses over some of the features of Unity, and makes it more difficult to integrate with other testing tools like Ceedling and CMock. 935375f98Sopenharmony_ci 1035375f98Sopenharmony_ci## Dependency Notification 1135375f98Sopenharmony_ci 1235375f98Sopenharmony_ciFixtures, by default, uses the Memory addon as well. 1335375f98Sopenharmony_ciThis is to make it simple for those trying to follow along with James' book. 1435375f98Sopenharmony_ciUsing them together is completely optional. 1535375f98Sopenharmony_ciYou may choose to use Fixtures without Memory handling by defining `UNITY_FIXTURE_NO_EXTRAS`. 1635375f98Sopenharmony_ciIt will then stop automatically pulling in extras and leave you to do it as desired. 1735375f98Sopenharmony_ci 1835375f98Sopenharmony_ci## Usage information 1935375f98Sopenharmony_ci 2035375f98Sopenharmony_ciBy default the test executables produced by Unity Fixtures run all tests once, but the behavior can be configured with command-line flags. 2135375f98Sopenharmony_ciRun the test executable with the `--help` flag for more information. 2235375f98Sopenharmony_ci 2335375f98Sopenharmony_ciIt's possible to add a custom line at the end of the help message, typically to point to project-specific or company-specific unit test documentation. 2435375f98Sopenharmony_ciDefine `UNITY_CUSTOM_HELP_MSG` to provide a custom message, e.g.: 2535375f98Sopenharmony_ci 2635375f98Sopenharmony_ci #define UNITY_CUSTOM_HELP_MSG "If any test fails see https://example.com/troubleshooting" 27