When a testcase have signal error, a population parameter in coverage view is different from other testcase.
Test View Coverage Display Policy
Function | Coverage of the body of the function under test |
---|---|
Test | Coverage displayed as the merged coverage of each test case |
Test Case | Coverage displayed as the merged coverage of all functions called during the test case execution |
Blue: Function Coverage
Black: Test Coverage
Yellow: Test Case Coverage
When a Runtime Error such as a Signal Error Occurs
However, in the case of test case coverage, if an abnormal termination such as a signal error occurs during the test execution, the test execution will stop without calling the necessary functions. Therefore, the denominator of the statement coverage that can be checked in the test case coverage window will be up to the executed statements.
Example
For example, in the following case, you can see that the denominators displayed in the test view are different.
In the first test case, the denominator of the test case is 13, which is 1 less than the other test cases. This is because a signal error occurred when referencing a null pointer at c = 2, and the function test3 was not covered. For the other test cases, since no signal error occurred, the function test3 was covered, resulting in a larger denominator compared to the first test case.
Need more help with this?
Don’t hesitate to contact us here.