You can collect coverage information during unit test execution by running Jtest goals (Maven) or tasks (Ant and Gradle).
Unit Tests
built-in test configuration:The Unit Tests test configuration automatically sends the results to DTP. To ensure the coverage data is properly merged, you must specify one or more coverage image tags in the command line or .properties settings file. The coverage image(s) is automatically sent to the connected DTP server where it can be associated with a filter.
You can specify a set of up to three tags that can be used to create coverage images in DTP Server with the report.coverage.images
property:
report.coverage.images=[tag1; tag2; tag3] |
Associate coverage images in DTP in the Report Center administration page (administration> Projects> Filters> [filter]).
You can also use the report.coverage.limit
property to specify a lower coverage threshold:
report.coverage.limit=[value] |
Coverage results lower than this value are highlighted in the report. The default value is 40
.