Code coverage filters
Code coverage filters can be used to include or exclude modules, parts or compile units, and files from results during collection.
You can specify filters in a file, and specify that filter list file with
-r,filterlist=<path>
in headless mode or in launch configurations with an
Eclipse IDE. Only .txt files are supported. In an Eclipse IDE, you can use the
Edit Code Coverage Filters window to view and edit the filters in the specified
filter list file.
In headless mode, you can also specify the filters directly with
-R,filter=<filters>
.
Filtering parameters can be specified in the following format:
<filter_type> <module_filter> <part_filter> <file_filter>
where:- <filter_type>
- Specifies the filter type: include filter (+) or exclude filter (-).
- <module_filter>
- Specifies the name or regular expression for modules.
- <part_filter>
- Specifies the name or regular expression for parts.
- <file_filter>
- Specifies the name or regular expression for files.
+ .* .* .*
, which includes everything.The following filter types are supported:
- Comment line:
#
- Starts a comment line.
- Exclude filter:
-
- Excludes specific modules, parts, or files. Regular expressions are supported in the filter.
- Include filter:
+
- Includes only specific modules, parts, or files. Regular expressions are supported in the filter.