Debug Java Scripts
Note: This topic applies to the Java Record Replay and Java over HTTP protocols only.
This task describes how to debug Java scripts by comparing the request and response data from the record and replay stages.
Add arguments to the VM Param Node
Select Replay > Runtime Settings > Java VM node. In the Additional VM Parameters field, enter the following string:
Compare record and replay data
In the Solution Explorer, right-click the script name and select Open Script Folder. The data from the recording phase is in the main folder. The data from the replay phase is in the replay folder.
The files that follow the format RequestBodyX contain the request data. The files that follow the format ResponseBodyX contain the response data.
To compare the record and replay data for the purposes of debugging, compare the files with identical names from the recording and replay phases. For example, compare the RequestBody1 file from the main folder (recording phase) to the RequestBody1 file from the replay folder. Normally, the files should be identical. Cases where the files are not identical may indicate problems in the script.
Remove arguments before load testing
Return to the Java VM node and the items you added to the Additional VM Parameters field.