SystemTests
SystemTests are sets of scripts and small comparison programs that use the SctRodDaq software and tests to automatically run system-wide tests. They can be run using the make command. Mostly these consist of automated comparisons to SCTDAQ, but not exclusively.These could be thought of as acceptance tests, though they are not always implemented in a simple pass/fail way.
SctTest
SctTest consists of 2 systems for testing the software.- The low-level test system is a sub-class of SctApi that pretends to talk to hardware, and when asked to do a Scan, returns raw data from SCTDAQ runs. It is useful for testing the logic in SctApi as well as the whole of the rest of the system.
- The high-level test system injects SCTDAQ raw data at into the system. Thus it bypasses the CalibrationController and SctApi stages of the dataflow. This is most useful for testing the correctness of the analysis algorithms.
Test Programs
These are small programs that are intended to show how to use a library and attempt therefore to do minimal testing. These are mostly how the C++ code is tested. In many cases they could easily be replaced by UnitTests?.Unit Tests
The Java code uses Wiki:UnitTest to ensure that class internal logic is correct. There are tests for almost all the classes.A start has been made on using the Boost::Test framework to do unit-testing on the C++ code. This needs to be extended to key applications and critical functions. The developers are asked to code UnitTests? whenever they come across a bug.