Transaction

Name

Transaction -- Check a set of Web pages in sequence

Synopsis

{ 'type'      : 'Transaction' , 
  'subents'   : [ 
                 {
                  'status'   : 'on' ,
                  'name'     : 'cart',
                  'startUrl' : 'http://www.example.com/store.html',
                  'seconds'  : '120',
                  'steps'    : [
                      # step 1
                      {
                      'action':'/cgi/buy.cgi',
                      'method':'get',
                      'fields': {
                         'id':'12',
                         },
                      'errorPhrase': 'Temporarily unavailable',
                      },
                      # step 2
                      {
                      'action':'/cgi/checkout.cgi',
                      'method':'get',
                      'fields': {
                         'ccnum':'999900000000',
                         'expdate':'99/99',
                         'shipToName':'Monitoring User'
                         },
                      'errorPhrase': 'Temporarily unavailable',
                      },
                      # step 3
                      {
                      'action':'/cgi/thanks.cgi',
                      'method':'post',
                      'errorPhrase': 'Temporarily unavailable',
                      },
                  ],
                  'triggers' : [{ 'level' : 'warn'}, ],
              }
            ]
}

Description

The Transaction Entity accesses a series of webpages to verify that a transaction flow is working according to specifications. This Entity can be used to verify that sites that require logins and use cookies to track sessions are working properly. The sequence starts at startUrl and performs each of the steps in steps in turn, checking for error conditions along the way.

The Transaction Entity's underlying engine is fairly unsophisticated. It cannot execute JavaScript or CSS and can be confused by heavy use of redirects.

Fields

name

A descriptive name for this subentity.

startUrl

The URL of the page to access first in the transaction sequence.

steps

A list of the steps to perform in the transaction. See below for a description of the fields.

seconds

The total amount of time the transaction should take to complete. The Trigger fires if the Transaction takes longer than this value to traverse. Defaults to 10 seconds.

errCode

(Optional) The HTTP response code that indicates that a page was successfully accessed. Defaults to 200 (OK).

auth

(Optional) A dictionary with the key as the username and the value as the password to pass to the server if it requests HTTP Basic authentication.

agentString

(Optional) The string to pass to the server as the User-Agent header. Defaults to the User-Agent string used by Internet Explorer 4.01.

Step Fields

action

URL to access for this step in the transaction. This field can be specified as an absolute or relative path and the hostname is optional. Do not specify form fields in this field. The following are valid values for this field:

  • http://www.example.com/store.asp

  • /store.asp

  • ../store.asp

method

HTTP method to use to access the URL in action. Valid values are get and post.

fields

(optional) A dictionary of HTML form fields to send to the server when performing this step.

errorPhrase

(optional) A string that fires the Trigger if found in the page accessed in this step.

goodPhrase

(optional) A string that fires the Trigger if not found in the page accessed in this step.

Trigger

The Trigger fires if: