DX Application Performance Management

Expand all | Collapse all

Make CEM generate LoadRunner scripts

Jump to Best Answer
  • 1.  Make CEM generate LoadRunner scripts

    Posted 01-16-2013 09:44 AM
    Is there anyone has worked on CEM to generate load runner scripts based on traffic capture? For example, CEM is able to capture whatever transactions generated by load runner script. My question is that is there a way in CEM side to convert those transactions to load runner script?
    If anyone does could you please share me the detailed info how you do that? Thanks.

  • 2.  RE: Make CEM generate LoadRunner scripts

    Posted 01-18-2013 09:10 AM
    We have thought about it but decided against it in the end. LR can be very sequential. For example, I would record my LR in the following order Login > search product1 > add product1 to shopping cart > search product2 > add to shopping cart > checkout > confirm payment > logout. LR uses correlation to keep track of the session id to replay the script from the beginning to end.

    CEM is more ad-hoc. Record one transaction at the beginning and one transaction at the end. Don't care about the session id, as long as the unique signatures match up, the transaction will be picked up.

  • 3.  RE: Make CEM generate LoadRunner scripts

    Posted 01-18-2013 09:50 AM
    Hi Vlu,
    My question is that if CEM is capable of converting the transaction it captures to LR script, which generates the transaction?

  • 4.  RE: Make CEM generate LoadRunner scripts

    Posted 01-22-2013 04:23 PM
    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).

    cd \wily\cem\scriptrecorder\bin
    scriptrecorder -file example-vugen-trace-file.txt -server
    scriptrecorder -file example-pcap-file.pcap -server


  • 5.  Re: RE: Make CEM generate LoadRunner scripts
    Best Answer

    Posted 01-02-2015 07:07 PM

    My previous answer, upon review, is incorrect.

    You cannot use CEM BT to generate LR scripts.


    You can use LR trace files as input to CEM Script Recorder to generate CEM Business Transactions.

  • 6.  Re: RE: Make CEM generate LoadRunner scripts

    Posted 01-05-2015 07:52 AM

    The APM CE Script Recorder does not import the Load Runner script (which would give more information than URLs) but only imports the information from the extended log of the LR script.

  • 7.  Re: RE: Make CEM generate LoadRunner scripts

    Posted 01-05-2015 03:15 PM
    You are correct. That is what I meant by the trace files.