3.27.1 Configuring code coverage for an AUT

You can activate code coverage for an AUT configuration with the following steps:

  1. Open the AUT configuration dialog from the Project properties 3.5.2.
  2. Select the Expert configuration.
  3. Select the code coverage agent you wish to use (JaCoCo is available out-of-the-box).
  4. You can then enter the AUT installation directory and the AUT source directory for the code coverage:
    The AUT installation directory
    is the directory containing the class files (compiled Java files) for your AUT . You must enter this directory to make code coverage possible for your test run.
    The AUT source directory
    is the directory where the source files (i.e. the program code) for your AUT are kept. Entering a directory for the source files is optional, however, if you do not enter one, then you will not be able to view your code coverage results at the source file level. The AUT source directory must contain the source files in their Java package structure. The class files must have been compiled with debug information to make the lines of code executed visible in the code coverage report.
    \includegraphics[height=2cm]{lightbulb} You can enter relative paths for the AUT installation and AUT source directories. The paths are relative to the working directory.
  5. To make sure you only monitor your own code, enter a package pattern to specify which packages should be monitored. The pattern must be a valid regular expression. If you do not enter a package pattern, all classes in the virtual machine will be considered for the code coverage value.
    \includegraphics[height=2cm]{danger} Not entering a package pattern can result in extremely large messages being sent from the AUT Agent , which may cause memory problems 3.27.1.1.
  6. Select whether you want the code coverage value to be reset when a new Test Suite starts 3.27.2.



Subsections

Copyright BREDEX GmbH 2014. Made available under the Eclipse Public License v1.0.