Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • 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:

...

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.

For an explanation of how to create test apps see Creating a ClarionTest test DLL (DCL).