Skip to main content

Test Automation

The %UnitTest package and the xUnit frameworks all support test automation. When a unit test finishes executing it reports whether the test passed or failed. You do not need to interpret the results of the tests. This is very important. You may execute a large number of unit tests for each code change. If you had to constantly read and interpret the results, the process would quickly become very tedious and error prone.

Many of the xUnit frameworks provide graphical user interfaces (GUIs) that summarize the test results.%UnitTest generates a Caché Server Page (CSP) that displays the test results. It displays information concerning tests that passed in green and displays information concerning failed tests in red. Developers can tell at a glance whether or not any of the tests failed.

Here is a CSP test report generated by a %UnitTest unit test. Notice that it reports that the “Test Suite failed”. The user can drill down by clicking the hyperlinks on the page and see pages that provide more detail about the test failure.

generated description: testreport fail 20131

FeedbackOpens in a new tab