The goals of testing are to ensure that code does what it was designed to do for all target experiments, that it meets quality expectations in reliability, performance, interoperability, etc. and that it meets customer expectations. The software should produce the desired physics results. There are two basic types: unit testing and integration testing which includes regression testing.
Unit testing improves the efficiency of the development process by finding problems early especially if users write the unit tests as they develop the code. The best time to understand the code is when it is first written. Every logical piece of code should be tested during unit testing. The test results should always be the same, so the tests can be used indefinitely. Unit testing provides a set of working examples and allows a developer to change code with confidence.
Integration testing identifies problems when units are combined. It includes tests of multiple modules and services, tests of reconstruction or simulation chain and tests that check readability of data changes. The LArSoft integration testing includes regression testing where existing tests are run against modified code to check whether code changes break anything that worked prior to the change.
Anywhere LArSoft is installed, including on an individual machine, the LArSoft CI system can be used to provide a framework with automated tools that make testing easy. Tests can be arbitrary scripts or use built-in features of the system. Tests can run everything or just parts of the system locally. There are many ways to trigger tests.
The LArSoft Continuous Integration (CI) system provides integration builds of LArSoft and related tools, and reports on current and past builds, along with detailed information on pre- and post-install tests of the software. For the most part, users don’t need to do anything special to take advantage of the system. If code is made available in the development branch, users can automatically trigger a continuous_integration build. An overview of the LArSoft CI system can be found here.
For more information, please see: Erica Snider’s Introduction to LArSoft CI System