Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titleA Note About Includes and Excludes

Defining includes and excludes is an important part of controlling how much your system processes, which can greatly affect how long it takes to generate your static coverage files. In many cases, there is no need to measure code coverage of third-party library code, so it is preferrable preferable to limit code coverage to project code using these settings. Includes and excludes should be expressed as comma-separated lists of patterns that specify classes to be instrumented. The following wildcards are supported:

* matches zero or more characters
** matches multiple directory levels

In the following example, all classes from the com.myapp.data package and all classes from package and subpackages that start with com.myapp.common will be instrumented:

-include com/myapp/data/*,com/myapp/common/**

While in this example, all classes from the com.myapp.transport package and all classes from package and subpackages that start with com.myapp.autogen will be excluded from instrumentation:

-exclude com/myapp/transport/*,com/myapp/autogen/**

If you are outside of development, working with the application binaries, and not sure what the appropriate include/exclude settings should be, reach out to your colleagues in development to make sure you use the correct patterns. There is usually a standard pattern for packaging company code, like com.myapp.**, that should help you determine the right setting to use.

...