You can 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.
To enable collecting multi-user coverage for Java or IIS web applications, you need to:
- configure the Jtest or dotTEST coverage agent to collect multi-user coverage,
- modify the HTTP request header of the browser that will be used to interact with the tested web application,
- provide your User ID when connecting CAM to the coverage agent.
Configuring the Coverage Agent
The coverage agent that is attached to the Application Under Test (AUT) must be configured to enable collecting multi-user coverage. See the "Configuring the Coverage Agent" chapter of the Jtest or dotTEST documentation.
Configuring the coverage agent to collect multi-user coverage requires providing a User ID in the HTTP request header of your browser, as well as in CAM.
Adding the User ID to the HTTP header
Complete the HTTP request header of your browser with a Test-Operator-ID. Each user who is interacting with the AUT must add a unique Test-Operator-ID to their HTTP request header. This will enable the coverage agent attached to AUT to identify the users and assign coverage information to individual testers.
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
Connect CAM to the coverage agent as described in Using the CAM GUI and complete the User ID (for multi-user mode) field to assign test data to an individual user.
The User ID in CAM must be identical to the Test-Operator-ID provided to your browser.
Perform testing sessions and download the coverage and test results files, as described in Using the CAM GUI. The files contain coverage information and test results that have been associated with the specified User ID.
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.
- Merge the dynamic and static coverage information into a coverage.xml file and send it with the test results report to DTP. See "Generating a Dynamic Coverage Data File and Uploading it to DTP" chapter of the Jtest or dotTEST documentation for details. The CAM Tutorial shows an example of how the results can be merged and published to DTP (see Processing Test and Coverage Results and Publishing Test and Coverage Results to DTP).