In order for CTP to gather coverage information related to your manual tests, you will need to configure the components in your environment to use one of your deployed application coverage agents. This section assumes that you have already configured coverage agents for the application under test (AUT) using Parasoft dotTEST or Jtest (the recommended method), or using one of the command line coverage tools shipped with SOAtest or CTP that you can use to analyze application binaries when you don't have access to the project's source code. If you have not, please see Configuring the Application Under Test for Coverage for more information. When configuring your coverage agent, keep in mind that while you can use the coverage agent in single-user mode, it's not recommended for web applications with more than one tester. See Coverage Agents in Multi-User Mode below for more information.

Connecting Coverage Agents to CTP Components

You can confirm that the components in your environment have been connected to coverage agents easily. Open the Manual Testing module where you'll see your systems and their environments, as defined in the Environment Manager, listed alphabetically there. Choose the environment you want and you'll see its components in a table, including the coverage agents they are connected to.

 

If you need to connect coverage agents to components, or change the ones they're currently connected to, go to the Environment Manager and edit your environment diagram, then do the following:

  1. Either create a new Component Instance for the desired component or edit an existing one. For more information, see Adding Component Instances or Modifying a Component Instance's Settings.
  2. With component instances that are connected to a coverage agent, it is recommended that you include the coverage agent as part of the Name and/or Description.
  3. Click Coverage and enter the following:
    • Agent URL: Specify the URL where the application under test and coverage agent are hosted. Include the protocol (HTTP/HTTPS) and port number of the agent.
      • To test the connection to the coverage agent, click Test Connection.
    • DTP Project: This value must match the dtp.project value set for dotTEST or Jtest when collecting the static and dynamic coverage files. Multiple components can publish to the same DTP project. CTP will generate a unique session tag for each component when publishing coverage to DTP based on the session tag provided in the REST API and the component name to ensure that coverage data from multiple components published to the same project in DTP will be merged.
    • Filter: Specify a filter for this coverage agent. Filters are provided by the DTP server and associate tests in DTP, which will help identify tests affected by a test impact analysis. The field will autocomplete as you enter text. You cannot create filters from here; if there is a filter you want that is not available, go to DTP and create it there.
    • Build ID: Set to the build ID with which to correlate coverage results. If you want to merge SOAtest coverage results with results from other types of testing—such as unit testing and manual testing of the same application—they must all use the same build ID. The build ID set here must match the build ID set for dotTEST or Jtest when collecting the static and dynamic coverage files and uploading the coverage data.
    • Coverage images: Specify a set of tags that are used to create coverage images in DTP. A coverage image is a unique identifier for aggregating coverage data from runs with the same build ID. Separate multiple entries with a semi-colon ( ; ). For details, see the Parasoft DTP user guide.
  4. Click Finish.

Coverage Agents in Multi-User Mode

If you have multiple testers working on a web application at the same time, it is recommended that you run your coverage agents in multi-user mode. When a component in an environment is configured to a coverage agent running in single-user mode, you will only be able to run one test at a time in that environment. How you run your coverage agent in multi-user mode depends on which coverage agents you're using.

  • Jtest: Be sure both jtest.agent.enableMultiuserCoverage and jtest.agent.autoloadMultiuserLibs are enabled in the agent.properties.
    • Note: When jtest.agent.enableMultiuserCoverage is enabled, jtest-otel-ext.jar and opentelemetry-javaagent.jar will be automatically loaded from the agent.jar directory. All three are included in the coverage agent download and should be deployed to the same directory when the coverage agent is installed.
  • dotTEST: Invoke the agent with the command agent_client.exe -multiuser.

See Application Coverage for more information about configuring coverage agents.

Regardless of which coverage agent you are using, each tester's browser needs to be set up to inject the following HTTP header (where <USER> is the tester's CTP username): 
baggage: test-operator-id=<USER>

If this header is not injected, you will not capture any coverage data. You can inject this header using a browser extension.

  • No labels