...
- The ClarionTest.exe test running utility
- A global template which must be added to each test .APP you create.
- A set of procedures to facilitate unit testing, including:
- AssertThat
- SetUnitTestFailed (usually only used if AssertThat isn't applicable)
- IsEqualTo (usually used as a parameter to AssertThat)
- IsNotEqualto (usually used as a parameter to AssertThat)
- A test procedure template
- A group procedure template
Running tests
There are several ways to execute unit tests. One is to have ClarionTest execute them automatically after each build. To do that you add a post-build command to the project:
ClarionTest.exe appname.dll /run
You may need to specify the absolute or relative path to ClarionTest for this to work. The /run parameter tells ClarionTest to execute all the tests immediately.
When I first created ClarionTest I used the /run approach almost exclusively. But lately I've gone away from that technique in favor of leaving ClarionTest running and letting it monitor the directory for DLL changes. That way I can select individual tests and have just those tests re-run every time I make a change.
Other info
For an example of how to use ClarionTest please see The problem with embeds, part 3: Testing the TXA parser.
...