Checking Script Validity

Your Script is written to run multiple concurrent users. But how can you make sure that all users are logged on successfully? We have to check the validity of the pages that are loaded for each virtual user executing the script. This can be done by adding a check option on a web requests. By default, the recording process adds a check option on every primary web requests in order to verify the title of the page (this option can be changed in the recording options).

In our sample, the “Welcome to FMStocks” page is loaded when a user has successfully logged on.

  1. Select the "Edit/Find & Replace/Find In HTTP Responses" menu option or click the icon ().

  2. Type “Welcome to FMStocks” in the opened dialog box:



    The HTTP request which loads the “Welcome to FMStocks” page is listed in the Find in HTTP tab of the Output panel
    (http://demo.fmstocks.com/fmstocks/home.asp.)



  3. Double-click the item in the Find In HTTP tab: The associated web request is automatically located in the Script panel, the subrequest which contains the "Welcome to FMStocks" character string (demo.fmstocks.com/fmstocks/home.asp) and the “Welcome to FMStocks character string are highlighted in the HTTP Data window (upper right side.)


  4. Right click in the HTTP Data window and select the "Insert Check Point..." entry from the contextual menu. The Check view (bottom part of the HTTP Data window) will appear as follows.



    Specifiy the "Welcome" name in the "Name" field.

  5. Click the "Apply" button; the CHECK option is added to the web request.

    SUBMIT POST PRIMARY "http://demo.fmstocks.com/fmstocks/default.asp" IDENTIFIER 11
        URLENCODED_FORM F
        CHECK
    "Home" CONTAINS "Home" ON_FAILED CONTINUE
        CHECK
    "Welcome" CONDITION (Substr(GetSubRequestContent("http://demo.fmstocks.com/fmstocks/home.asp", 1, NOCASE), "Welcome to FMStocks"
    , 0) != "") ON_FAILED CONTINUE;
     

  6. Launch a Job with 10 Virtual Users executing this Script and open the Checks View. It displays statistics about the checkpoints which are in the script.


See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap