3.28.5. Troubleshooting code coverage
Prev | 3.28. Working with code coverage with Java tests | Next

### 3.28.5. Troubleshooting code coverage

When using code coverage, please bear the following in mind:

- Code Coverage is only possible with AUTs started via an AUT configuration (Section 3.8.1, “Configuring AUTs to be started from the ITE”) (i.e. not using the autrun command), and which use Java 1.5 or higher.

- JaCoCo manipulates the byte code of your AUT at runtime to be able to measure code coverage. It is therefore highly sensitive to other byte code manipulations that take place at the same time (e.g. cglib).

- If you wish to analyze the Code Coverage at the source code level, as well as entering the Source Directory in the AUT configuration, you must also ensure that your class files have been compiled with debug information.

- Running Code Coverage analyses can become memory-intensive for larger AUTs. A pattern can be used to reduce the code analyzed. You can also increase the heap space for the ITE to ensure that enough memory is available. We have successfully performed code coverage analysis with JaCoCo on an AUT with 72,000 classes.

- Users working with the embedded database may run into memory problems sooner than users working with an Oracle database. Please remember that we do not recommend working with the embedded database for productive use.

The Test Result Summary View displays the monitoring agent as JaCoCo, but the coverage value is 0
If you can open the HTML report for the Code Coverage, but it shows ”NaN”, then this could mean that the class files for the analysis were not found. Check the path to the Installation Directory in the AUT configuration. It could also be the case that other byte code manipulations were running at the same time as JaCoCo.