Web performance testing“Your load testing solution”

LOGIN OR REGISTER
  • Performance testing
  • AgileLoad Features
  • Signup & Download
  • Learning Center
  • Online store
  • Support forum
  • Video center
  • pci

Getting started

  • Introduction
  • Capturing your first script
  • Script Editor
  • Videos
    • Run your first test
    • Capturing the Script

Advanced tutorials

  • Proxy recording mode
    • Recording in proxy mode
    • Recording with another browser or client program
    • Chaining Proxy
    • SSL/Client Certificate
  • Data driven tutorial
    • Extracting Data via ODBC
    • Using Data in a Script
    • Making a Script Data Driven
  • Modular Transactions
    • Modular Scenarios
    • Modular Scripts
  • Data Extraction & Parsing
    • Extract data from the script
  • Script Parametrisation
    • Performance test script parametrisation
    • Manual Script Parameterisation in AgileLoad
  • Script Automatic Parametrisation
    • Teaching Agileload
    • Parametrising Dynamic Data
    • Automatic script parametrization setup
  • Check Tutorial
    • Add check in script
    • Validate your check
    • Check Events and Statistics in Test
    • Check Details Option in Test
  • Mobile load test
    • Capturing a script from a mobile device
    • AgileLoad Mobile Capture
  • Videos
    • Data generation
    • Choosing a random link
    • Add Transaction Loop Boundaries
User manual
  • Script Editor
  • SCL Language

Buy Virtual users

Add check in script

  • Learning Center/
  • Test Scenario Creation/
  • Advanced Tutorials/
  • Check Tutorial/
  • Add check in script

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 request.

By default, the recording process adds a check option on every primary web request in order to verify the title of the page (this option can be changed in the recording options if desired).

This tutorial will show you how add a check on a request and use it to verify the availability of your application.

We add a check on a login request. This check will verify if our user John is well logged in the AgileLoad bookstore website.

In the script, go to the login request by placing the cursor on the line where the main request is (this will be denoted by having the word PRIMARY), and show request details by clicking on the Record Request Details button (), a yellow arrow will then appear in the left margin of the script editor to show that the HTTP Data window content is relating to that line in the script:

In the HTTP Data view (to the right of the script), in the Server tab (middle of the window), go to the HTML tab (at the bottom of the HTTP Data Window).

Select “Welcome John Smith” and right click on it. In the menu, select Insert Check Point.

insert check point

The Check assistant will appear with your selected text. Add a name to this check, “Login”.

check assistant

Click on the Apply button and the request in the script will be modified to include the code for the check (see highlighted text below)

apply check performance test

You can add multiple checks on a single request, use the Check assistant to help you add checks.

The Check Contains option tells the check to search for the presence of a character string in the HTTP response to the request (and its associated sub-requests) that is selected in the script. The Check Condition verifies either status return code, body size or enables you to create your own condition with SubStr parser, HTML parser, XML parser or other functions.

check condition

The excerpt above will behave as follows:

1st line example: If response contains a response code of 200 (HTTP OK) then continue and do not fail the check, if the response code is not 200 then continue anyway but raise the check as failed.

2nd line example: If the HTTP content is greater than 500 bytes then continue and fail the check, if <= 500 bytes then continue and do not fail the check.

3rd line example: In the HTTP content, Substr function go to “Shopping Cart” character string position and extract character string between first “title=”” character string and “””, if the extract character string is not “Les Mesirables” then continue and fail the check, the character string is “Les Miserables” then continue and do not fail the check.

The Check name is very important as it will help you to identify the failure. The check name will appear if the check fails in the Replay Details list in script editor, in the Audit Log message and in the Checks View in AgileLoad Test Center when running a test or analysing results.

Next Validate your check

Print this page  -  Go to top of page
  • How to start
  • Test Scenario Creation
  • Test Setup & Run
  • Reporting & Analysis
  • Exercises