10. Code Coverage Analysis
10 Code Coverage Analysis
10.1 General
Although Common Test
was created primarily for black-box testing, nothing prevents it from working perfectly as a white-box testing tool as well. This is especially true when the application to test is written in Erlang. Then the test ports are easily realized with Erlang function calls.
When white-box testing an Erlang application, it is useful to be able to measure the code coverage of the test. Common Test
provides simple access to the OTP Cover tool for this purpose. Common Test
handles all necessary communication with the Cover tool (starting, compiling, analysing, and so on). The Common Test
user only needs to specify the extent of the code coverage analysis.
10.2 Use
To specify the modules to be included in the code coverage test, provide a cover specif