Forum Discussion

MPunsky's avatar
MPunsky
SmartBear Alumni (Retired)
12 years ago

[LoadUIWeb] Parameterizing Your Tests

In WebLoadUI you parameterize requests with data generated with WebLoadUI’s built-in generators.



To access the test data, you use variables. WebLoadUI includes specific types of variables that provide access to the generated data.



In order for WebLoadUI to use variable values in place of request parameters, you modify your user scenario in the Scenario editor and specify the variable that will replace the parameter value during test run.



The Parameterization procedure is rather easy and includes the following steps:



1. Prepare test data.



2. Create a variable that will provide access to the test data.



3. Open your user scenario for editing and replace a parameter value with the created variable.



Depending on the test data you are going to use, the 1st and the 2nd steps can be combined.

You can insert variables into user scenarios in the Scenario editor.



Full details are available in the help files and in online help.
  • zaorski's avatar
    zaorski
    New Contributor
    Hi,

    I don't have "New Variable button on the toolbar of the Scenarios Editor" or "New Variable from the context menu of the Scenarios editor"

    I can't create any variables.



    win7 64-bit SP1

    WebLoadUI ver 2.80.2974.23
  • MPunsky's avatar
    MPunsky
    SmartBear Alumni (Retired)
    Hello Krzysiek,



    There are different instructions depending on what you want to parameterize:



    To parameterize requests in WebLoadUI, you use variables that provide access to the desired data (see Parameterizing Requests - Overview). You need to assign these variables to the desired parameters in order for WebLoadUI to use the variable values during the test run. You assign a variable to a request parameter in the Scenario editor.



    You also use variables to store data extracted from server responses. To insert the extracted data into subsequent requests, you open your user scenario in the Scenario editor and assign a variable to the desired parameter.



    The way in which you specify a variable depends on the parameter type. You can use variables in various parts of requests:



    -----Query string parameters in request URLs.



    -----Parts of request URLs.



    -----Request header fields.



    -----Form field values in POST requests.



    -----Parameter values in Rich Internet Application (RIA) requests, such as JSON, AMF or XML.



    -----Arbitrary parts of textual requests. For example, parameter names, partial parameter values, and so on.



    Each of these parameter types have different instructions for parameterization. Please use the help file to obtain the instructions for the parameter type you need to employ.



    Please let me know if you are successful.


  • Anumakonda_mahe's avatar
    Anumakonda_mahe
    Frequent Contributor
    Hi Michael

     

    I am getting warning message like “The variable index is out of range. Available items: 143. Requested index: 146” for few records. Pls. let me know how to overcome this.

     

    I have recorded one scenario for registering record (Same is Parameterized using database variable). So total records I have 200 pending in a list to register. So I have taken 200 Vuser at test and executed test. Then Report is generated with Warnings with above message, even my Available Items and Vusers are same.

    Pls. check Scenario Parameterized Screen Shots in attached Document

  • MPunsky's avatar
    MPunsky
    SmartBear Alumni (Retired)
    Hello Mahesh,



    This message is more informational in nature than an actual warning.   It happens when LoadUIWeb reaches the end of the list of parameters and starts over again at the beginning.  It is expected behavior, and nothing to worry about.