LoadRunner script development: installation and recording (a)

一. LoadRunner

The performance benchmark testing software, it almost defines the whole performance testing industry practices

HP loadrunner is a commercial software company, closed source, pay

More releases for domestic use: loadrunner 11, loadrunner 12

loadrunner 12 (2014 released in), the current latest major version (the latest version v12.63), which offers a free trial version up to 50 concurrent users, the domestic non-cracked version, supports the new version of the browser, but requires the fiddler tools

loadrunner 11 domestic crack version, after the break, you can use a very large number of concurrent users, does not support the latest version of the browser

loadrunner generated script, the script language is C, provides a number of functions, a lot of charts (eight chart)

二. WM + Windows Server 2008 + LoadRunner 12

1. Install according to installation documentation loadrunner 12

  After you install the desktop display:

    virtual user generator: writing administration scripts (equivalent jmeter sampler)

    controller: set design and operation control (equivalent jmeter thread group)

    analysis: Data analysis of operating results chart (equivalent jmeter listeners, can integrate multiple charts into a chart)

2. Install the Google browser (double click ChromeSetup.exe file)

3. Installation Fiddler (double click Fillder5.exe)

4. remove the browser windows server 2008 annoying security prompts (Add a trusted Web site), click  Configure IE ESC

三. Go (VirtualUserGenerator)

Double-click : virtual user generator

Menu bar : help> Get Help

Toolbar : switching window display

Workspace :

The bottom tab bar :

Create a script (new script)  

  Select the protocol:

    Single Protocol: a single protocol

    Multiple Protocol: multiple protocols

  Script Name

  Location

 

 

 

 

 

 

 

Recoding Options (Ctrl + F7): Recording Configuration

  General

    Recoding

      > HTML-based script

      > URL-based script

 

  HTML-based Script URL-based Script
Objects Browser application B / S Non-browser C / S application HTTPS
script Recording only the script, no recording resources Record all the resources obtained from the server (images, css, js, etc.)
difference Script is simple and easy association Content is very large, fine

 

 

 

 

 

 

 

 

 

 

 

 

Record : Ctrl + R, before recording must first open the fiddler, fiddler plays the role of forwarding agents

 

 

Notes recording a script analysis script is //

web_url ( " www.lemonban.com " , // web_url used to get requests, the first parameter is the name of
         " the URL of = HTTP: //www.lemonban.com/ " ,         
         " Resource = 0 " , 
         " RecContentType = text / HTML " , // the ContentType request
         " the Referer = " , 
         " the Snapshot = t1.inf " , 
         " Mode = the HTML " , // Mode to HTML, fixed wording
        EXTRARES, // EXTRARES behind them, you can not write back to write the script
        "Url=/weixin/ajax/share?url=http%3A%2F%2Fwww.lemonban.com%2F", ENDITEM, 
        "Url=/images/upload/course/20190221/1550743143401.jpg", ENDITEM, 
        "Url=/images/upload/course/20190222/1550817400051.jpg", ENDITEM, 
        "Url=/images/upload/course/20190219/1550558518503.jpg", ENDITEM, 
        "Url=/images/upload/course/20190218/1550492545202.png", ENDITEM, 
        LAST); // function to the end of LAST
web_custom_request("getloginUser",                 //web_custom_request是post请求的方法
        "URL=http://www.lemonban.com/user/ajax/getloginUser", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=application/json", 
        "Referer=http://www.lemonban.com/", 
        "Snapshot=t2.inf", 
        "Mode=HTML", 
        "EncType=", 
        extras 
        "Url=/static/inxweb/img/icon.png", "Referer=http://www.lemonban.com/static/inxweb/css/global.css?v=1", ENDITEM, 
        LAST);

Playback : F5

 

 

 

Using URL-based Script, I found a few more png, js and other requests

    web_url("1562823838981.png", 
        "URL=http://www.lemonban.com/images/upload/websiteLogo/20190711/1562823838981.png", 
        "Resource=1", 
        "RecContentType=image/png", 
        "Referer=http://www.lemonban.com/", 
        "Snapshot=t13.inf", 
        LAST);

    web_url("index.js", 
        "URL=http://www.lemonban.com/static/inxweb/front/index.js", 
        "Resource=1", 
        "RecContentType=application/javascript", 
        "Referer=http://www.lemonban.com/", 
        "Snapshot=t14.inf", 
        LAST);

 

Guess you like

Origin www.cnblogs.com/my_captain/p/11774605.html