Script processing

When a Script is executed, the first command following the BEGIN keyword in the Script is executed, and then the commands are processed sequentially, unless a command that alters the flow of control is executed, in which case processing continues at the defined point in the Script.
A Script terminates when the end of the Script is reached, when an EXIT or STOP USER command is executed.

Transactions

When the script is run with several iterations, the commands which are located before the "TransactionBegin" command, are only executed during the first iteration. The commands which are located  between the "TransactionBegin" and the "TransactionEnd" commands are executed in all iterations. The commands which are located after the "TransactionEnd" are only executed during the last iteration.
The recording process does not automatically adds TransactionBegin and TransactionEnd commands in the scripts. They must be added manually.

Typical use of transaction commands:

Begin;
    Web site login commands...
    TransactionBegin;
        Transaction commands...
    TransactionEnd;
    Web site logout commands...
End;


Subrequests management:

When the "Manage subrequests" option is set in the Script Editor "Record settings", the generated script contains only the web requests (Navigate and Submit commands) which correspond to user actions. The Navigate and Submit commands automatically executes http requests and their http sub-requests like redirects, images or links (css, js files). Http requests  issued by a Javascript code are not automatically executed.

HTTP Commands:

When a browser loads an HTML page, it can open multiple connections to the web server to load embedded objects (images, frames, ...) in parallel. In order to simulate this behavior the AgileLoad Load engine processes HTTP GET, POST and HEAD commands in an asynchronous way; it does not wait for entire HTTP responses before executing next commands in scripts. The number of parallel connections opened to a web server can be modified in Replay options.

Some HTTP GET, POST or HEAD options and some other commands can modify the asynchronous behavior.
Below is a description of the Load engine actions when a command is encountered:

Context

Load Engine Action

Request with the PRIMARY option
  1. Wait for all previous requests to finish (wait for their entire responses to be loaded).
  2. Execute the current request.
  3. Wait for the HTTP header and the first HTTP body packet to be loaded.
  4. Execute next command in script.
Request with an associated variable assignement
  1. Execute the current request.
  2. Wait for the entire HTTP response (header + body) to be loaded.
  3. Execute next command in script.
Request with a RESPONSE_TIMER option
  1. Execute the current request.
  2. Wait for the entire HTTP response (header + body) to be loaded.
  3. Execute next command in script.
GET COOKIE
SET COOKIE 
DELETE COOKIE
DISCONNECT
END TIMER
END PAGE TIMER
SYNCHRONIZE REQUESTS
  1. Wait for all previous requests to finish (wait for their entire responses to be loaded).
  2. Execute the current command.
  3. Execute next command in script.
EXIT
END
  1. Wait for all previous requests to finish (wait for their entire responses to be loaded).
  2. Exit script.
DISCONNECT WITH CANCEL
CANCEL REQUESTS
  1. Execute the current command: Break all opened TCP connections to the web server (cancel pending requests).
  2. Execute next command in script.




Go back to the Learning center:


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