>
Using the script recorder
The script recorder enables you to generate transaction signatures from network packet capture files or VUGen quality assurance test script output files. The output of the script recorder is a recording session.
The script recorder can generate transaction recording files from these input formats:
VUGen trace files (VUGen files)
libpcap packet capture files (pcap files)
The recording session can be viewed from the Administrator > Recording Sessions page.
Installing the script recorder
To install the script recorder:
1.Select Tools > Script Recorder.
2.Click Install Script Recorder.
3.Click Run to install the script recorder or Save to save the executable to your hard disk (and then run the script recorder installer from your hard disk).
Input script file types
If you have HP LoadRunner software, you generate VuGen trace files to use with the script recorder.
If you have the tcpdump, ethereal, or tethereal tools, you can use libpcap packet capture files to generate input for the script recorder. Any protocol analyzer that can produce output in libpcap format can be used to create an input file for the script recorder.
VuGen trace files
HP LoadRunner software can generate synthetic transactions. HP LoadRunner comes with a Virtual User Generator called VuGen. You can use VuGen in a verbose mode which generates a detailed VuGen trace file.
Tip: To create a verbose VuGen trace file in LoadRunner 8, choose the run-time settings for the log as follows:
Always send messages
Extended log and Advanced trace
VuGen trace files (output.txt) usually start like this:
Virtual User Script started
Starting action vuser_init.
Web Turbo Replay of LoadRunner 8.1.0 for WINXP; WebReplay81 build 5495
[MsgId: MMSG-27143]
Run-Time Settings file: "M:\TRX_2008\Scripts\Query\TRX_Query_1_UPDATED_05072008\\default.cfg"
[MsgId: MMSG-27141]
Vuser directory: "M:\TRX_2008\Scripts\Query\TRX_Query_1_UPDATED_05072008"
[MsgId: MMSG-27052]
Vuser output directory: "M:\TRX_2008\Scripts\Query\TRX_Query_1_UPDATED_05072008"
[MsgId: MMSG-27050]
Operating system's current working directory: "M:\TRX_2008\Scripts\Query\TRX_Query_1_UPDATED_05072008"
[MsgId: MMSG-27048]
UTC (GMT) start date/time : 2008-06-12 20:23:49
[MsgId: MMSG-26000]
LOCAL start date/time : 2008-06-12 16:23:49
[MsgId: MMSG-26000]
Local daylight-Savings-Time: Yes
[MsgId: MMSG-26000]
Some of the Run-Time Settings:
[MsgId: MMSG-27142]
Use the VuGen trace file as input to the script recorder.
Pcap files
Pcap files are packet capture files in libpcap format. The libpcap format provides a system-independent interface for user-level packet capture and a portable framework for low-level network monitoring.
Pcap files are usually captured using one of these tools:
tcpdump — a TCP/IP protocol analyzer that captures and analyzes TCP packets.
ethereal — a protocol analyzer that has an open source license and is able to capture and analyze a variety of network protocols.
tethereal — a command line version of ethereal.
Note: The script recorder only handles pcap files with clear text HTTP traffic. It does not support HTTPS and does not handle pcap files with missing or out-of-order packets.
Command line instructions
The script recorder runs from a command prompt. It takes input from a script file that you specify and produces a file that can be read by CA CEM.
To run the script recorder from the command line:
1.Select Windows Start > Run.
2.Type cmd and click OK.
3.Navigate to the c:\wily\cem\scriptrecorder\bin directory: c:
cd \wily\cem\scriptrecorder\bin
4.Type scriptrecorder to see help for the tool.
5.Specify the script file name to run and the server to run the script on.
6.Type the input file name and client computer to run the script on in this format: scriptrecorder -file [set the File Name variable] -server <IP_Address>:CA Portal
where [set the File Name variable] is the name of a VUGen trace file or a pcap file, <IP_Address> is the IP address of the MOM, and CA Portal is the port number
(8081 is the default port number).
Examples:
c:
cd \wily\cem\scriptrecorder\bin
scriptrecorder -file example-vugen-trace-file.txt -server 192.168.1.50:8081
scriptrecorder -file example-pcap-file.pcap -server 192.168.1.50:8081
-Hiko