...
- Deploying the AUT to the application server.
- Extract the contents of the monitor.zip package you generated (see Generating Static Coverage with Jtest) to the server machine. The package contains the agent.sh/agent.bat script.
Run the agent.sh/agent.bat script to print the Jtest Java agent VM argument to the console:
Code Block Jtest Agent VM argument: -javaagent:"[path to agent dir]\agent.jar"=settings="[path to agent properties file]\agent.properties",runtimeData="[path to monitor dir]\monitor\ runtime_coverage"
- Add the
-javaagent
argument to the application server’s startup script. - Restart the server.
Go to the following address to check the status of the coverage agent:
http://host:8050/status
. If the Coverage Agent is attached, you should receive the following response:Code Block {"test":null,"session":null,"testCase":null}
Anchor | ||||
---|---|---|---|---|
|
You can connect to either CAM or SOAtest to the Coverage Agent. CAM provides an interface for starting and stopping test sessions during manual test execution. Connecting SOAtest enables you to collect application coverage during automated functional test execution.
...
The
-publish
option is required to send the merged coverage data to DTP. Alternatively, you can configure the report.dtp.publish=
true
option in the .properties file where you configure dotTEST or Jtest.
Collecting Application Coverage from Multiple Users with CAM
CAM allows you to collect coverage information for multiple users that are simultaneously accessing the same Java or IIS web application server. This allows QA engineers to perform parallel testing sessions and associate coverage with individual users.
Collecting coverage data from multiple users requires additional configuration steps before you start your testing session. You need to:
- Configure the Coverage Agent to enable the multi-user mode.
- Add your User ID to the HTTP request header of the browser you will use to interact with the tested web application
- Provide your User ID when connecting CAM to the Coverage Agent.
Configuring the Coverage Agent
Enabling the Multi-user Mode with dot TEST
You can enable the multi-user mode by modifying the invocation of the dotTEST IIS Manager tool (see Step 2: Attach the Coverage Agent to the Application Under Test (AUT)). Launch the tool with the -multiuser
switch:
Code Block |
---|
dottest_iismanager.exe -multiuser |
Enabling the Multi-user Mode with Jtest
You can enable the multi-user mode by modifying the options in the the agent.properties file, which is included in the monitor.zip package (see Generating Static Coverage with Jtest). Open the file and configure the following option:
Code Block |
---|
jtest.agent.enableMultiuserCoverage=true |
Adding the User ID to the HTTP header
Modify the the HTTP request header of your browser by configuring the Test-Operator-ID option with a unique User ID. This will enable the Coverage Agent attached to the AUT to identify and assign coverage information to individual users who are simultaneously interacting with the AUT.
A convenient way to add a Test-Operator-ID is to install one of the browser plugins that allow you to easily modify HTTP headers. The following example shows a Test-Operator-ID specified in Chrome with the ModHeader plugin.
Connecting CAM to the Coverage Agent in the Multi-user Mode
Provide your User ID when connecting CAM to the Coverage Agent (see Step 3: Connect CAM or SOAtest to the Coverage Agent). The User ID must be identical to the Test-Operator-ID provided to your browser.
Testing in the Multi-user Mode
Perform testing sessions, download the results, and mergee the coverage data, as described in steps 4-7 above. When downloading the results from CAM, ensure that the Session Tag field is completed with a tag unique to each user. We recommend that the session tag include the User ID.