Having a standard format for all or most of our ULC tests makes it possible to provide a flexible environment for running those tests. In addition, the format also allows us to maintain a growing suite of tests. Test cases should be simple and easy to use. The test controls should be grouped in a small units (see below) in one notebook, or they be implemented as separate test cases. All tests are expected to be subclasses of UlxAbstractTestComposite and generally conform to this layout:
testStarted("The name of the Test"); boolean result = callingTheTestRoutine(); testCompleted(result); return result;
Classes that have meaningful unattended tests to run should call the test methods after the #testStarted, but before the #testCompleted method. Those two methods will take (eventually) log the test(s), and update the Test Suite window's visual feedback widgets. The string passed to #testStarted names the test, and is added to the log entry. The boolean parameter of #testCompleted indicates the success of the test, with nil/null standing for no test run. Classes that cannot run unattended tests, should nevertheless log the fact that they do not have tests by passing "N/A" to the #testStarted method, and null to the #testCompleted method, while doing nothing between the two calls.