...
Note | ||
---|---|---|
| ||
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 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:
In the following example, all classes from the
While in this example, all classes from the
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
|
Verifying static coverage has been uploaded to DTP
...
Attaching the Coverage Agent to a microservice allows you to enable collecting dynamic (runtime) coverage for it. Typically, this is done as part of an automated deployment process coming from a CI/CD pipeline. . As part of this process, you will have the opportunity to review the agent's settings in the agent.properties file; while doing so, ensure that the include and exclude values that are used are the same as those defined in your static coverage process.
Attaching the Coverage Agent for Java
The agent.jar file for the agent as well as the agent.properties file for configuring it can be found in the downloaded java_agent_coverage zip, under the jtest_agent
directory.
An argument of the form:
...
Once started, you can check that the agent is running by going to the agent's status endpoint at http://<HOST>:<PORT>/status
, where host <HOST>
is where the microservice is running and port <PORT> is specified in in agent.properties; by default, it is 8050.
...
You can use the Coverage Wizard tool found in the dottest_agent
folder of the downloaded dotnet_agent_coverage zip to set up coverage agents. It can be invoked directly to provide agent configuration via a GUI, or alternatively run using the command line; see the documentation here for more details: Application Coverage for Standalone Applications (dotTEST) or Application Coverage for Web Applications (dotTEST).
...
Once started, you can check that the agent is running by going to the agent's status endpoint at http://<HOST>:<PORT>/status
, where host <HOST>
is where the microservice is running and port <PORT>
is specified in in agent.properties; by default, it is 8050.
...