ABSTRACT

It is critical to test software to reassure people that the software is correct enough and to make tolerances on “enough” explicit. There are several layers to testing software: adding assertions to code so that it checks itself as it runs; writing unit tests to check individual pieces of code; writing integration tests to check that those pieces work together correctly; and writing regression tests to check if things that used to work no longer do. Fortunately, there are many excellent test frameworks to aid with these tasks. A test framework finds and runs tests written in a prescribed fashion and reports their results. In addition to test failures, these reports often include the tests' coverage, which is the fraction of lines of code that are checked. Continuous Integration can be used to automate test execution as it runs tests every time a change is made to the code, so that breaking changes are noticed immediately.