Create a PCAP file
PCAP (packet capture) files consist of network packet data, created by capturing live network activity through capture tools such as Wireshark.
Uses for PCAP files
The generated .pcap file can be used for packet sniffing and analyzing network activity. VuGen can parse .pcap files and convert them to a Vuser script.
The primary uses for the .pcap file are:
- Web Services scripts. For details, see Create a Script by Analyzing Traffic (Web Services).
- Mobile Applications scripts. For details, see Create a Vuser Script by Analyzing a Captured Traffic File.
Create a capture file
This task describes how to create a .pcap capture file of network or application traffic to use in the preparation of a Vuser script.
Tips for creating .pcap files
Use the following tips to ensure successful generation of your files:
-
To generate a smaller, more manageable script, try to capture the network traffic only for the time that you perform actions in your application.
-
When using external tools, make sure that all packet data is being captured and none of it is being truncated.
-
For command line capture utilities, make sure to provide all of the required arguments.
Troubleshooting missing packets
Issue: Your script is missing steps you recorded into a capture file.
You encounter the following warning in the Output Pane> Code generation tab:
Warning: One or more responses are missing or have missing packets. Therefore, a step may appear to be missing in the script. This issue can be caused if the recording was stopped before all the responses were received. If the script is generated from a .pcap file, check if the file has missing packets.
This error may be caused by unnecessary network activity on the recorded machine, which can cause the capturing application to drop packets.
Steps to Resolve: Ensure that the capturing machine has no unnecessary network traffic in the background.
Workaround for Mobile Applications - HTTP/HTML scripts: You can circumvent this issue using the Recording options. Select Recording Options > HTTP Properties > Advanced > Generate steps with missing responses to generate steps for HTTP requests that are missing server responses.