Conditions consists of so-called scopes and matchers. Scopes extract data from a source - like the path of a URL, or the HTTP status or HTML from a HTTP response. Matchers run tests against the extracted data.
Detailed documentation on
In the following example, the scope is
Path, the matcher is
Starts With, taking
"/user" as an argument.
It will become
TRUE, if the path of the URL starts with
Path Starts With "/users"
Some more examples of scopes and matchers:
HTML Contains "No Products Found"
HTTP Header Contains "Last-Modified"
Response Time Less Than 700
Meta Description Word Count Greater Than 10
Conditions can be combined with
Path Starts With "/users" AND HTTP Status Equals 200
Response Time Greater Than 700 OR Compressed Content Size Greater Than 40000
) can be used to group logical expressions.
Path Starts With "/users" AND (HTTP Status Equals 200 OR HTTP Status Equals 302)
OR are combined,
brackets should be used to avoid ambiguities.
Without brackets, expressions are evaluated from left to right.
Conditions can be defined using the condition editor, which offers a drop down box containing all available scopes. Depending on the scope, it shows a list of all possible matchers, and an according input field for the argument.
This is how the visual editor looks:
You can use
+ Rule to add a new condition.
+ Group creates a new logical group,
which keeps several conditions together.
XOR changes the logic applied on the set of rules.
The Audisto Scripting Language is case insensitive regarding keywords. It also ignores white space like spaces or new lines. The following two statements are identical:
CLUSTER "Product Pages" IS: Path Starts With "/products"
cluster "Product Pages" iS : PATH starts wITh "/products"
Code is formatted automatically upon saving.
Whenever strings are used, either as names or as arguments, they must be quoted using double quotes.
Inside double quotes, double quotes itself must be escaped using the backslash character
A backslash must be replaced by two backslashes:
The following code will scan HTML for
CLUSTER "Has Mail Link" IS: HTML Contains "href=\"mailto:"
Note that quoting and escaping is only required in text editing mode, not when using the visual editor.
Escaping can be prevented by enclosing a text in three quotes.
CLUSTER "Has Mail Link" IS: HTML Contains """href="mailto:"""
This makes entering text containing quotes or backslashes more easy. It will get converted to single quotes and escaped content on storing, though.