Title: Advanced Action List Functions
1Advanced Action List Functions
2Advanced Action List Functions
- Primarily used for WebAuth and SSL VPN testing
but can be used for other test cases as well - Tools
- SST Trace Plus
- URL Trace Tool (installed with Avalanche)
- Analyzer (installed with Avalanche)
- Functions
- Form Database
- Variables
- Content Validation
- Search Criteria
- URL Encoding
- Think Time
- Loops
- Timers
3SST TracePlus (http//www.sstinc.com/webpro_spiren
t.html)
- TracePlus captures HTTP stream and outputs action
list compliant script
4URLTrace Tool
- Run URL TraceTool in the results Tab to have
detailled HTTP results (automatically created
when doing a Trial Run)
Enable Detailed HTTP status Codes when
troubleshooting to have full transactions
content in real tests (Run Tab)
5Avalanche Analyzer
- Run Analyzer in the results Tab to have full
results of your testing
- Analyzer provides summary and realtime results
6Form Database
- Sample Action List Login (WebAuth, SSL VPN,
etc) without Form Database - Hard-coded user/pass
7Form Database
- Sample Action List Login (WebAuth, SSL VPN,
etc) with Form Database - Dynamic user/pass
8Variable ASSIGN APPLY
1. ASSIGN Variables in the Action List
Use a FormDatabase (discussed later) to define
variables
users refers to the FormDatabase name 1 refers
to the first field of users 2 refers to the
second field users etc
9Variable Concatenation
- ASSIGN several variables and join them to build a
string representing either GET data or full URL
By joining several variables it is possible to
rebuild and use data. Combining with Forms
Database enables you to test wide range of
possibilities.
Then APPLY the variable in the ActionList
10Variable Random Number
- Define a random number with explicit range
- Define a random number by its length
Will produce from 0 to 99
Will produce from 0 to 50
Will produce from 0 to 9999
Will produce from 10 to 50 as Avalanche does not
recognize the negative bounds as negative numbers
Then APPLY it as think time in the Actionlist
11Content Validation
- Use
- To search body and/or headers of an HTTP response
to confirm user is receiving correct page - Example Look for the word Sign-in Error in the
HTML response to indicate user login as failed - Syntax
- MATCHNOT lt"Sign-in Error" 1 BODYgt
- MATCH ltSuccessful Login 1 BODYgt
- Possible response actions
- Either STOP USER, STOP TEST or nothing
- Results collection
- On validate, variable matching is shown in the
URL Trace Tool - On load, number of matches is collected in
Analyzer and trace files
12Content Validation
- Sample Action List with MATCH command
After POST with username/password, Avalanche will
parse the body of each server response searching
for Authentication Successful
13Content Validation
- Avalanche will show whether each MATCH or
MATCHNOT succeeded in the URL Trace - Tool (for Trial Run) and give the summary results
for all users in Analyzer (for Full Run)
14Search Criteria
- Used to look for a dynamic value or ID in the
returned header or body - Example Capturing and reusing session IDs from a
server response - Usage
- Search the returned content for a dynamic ID
(defined by a prefix and postfix) - If a valid match is found, apply matched content
to variable - Reuse variable later (to subsequent requests to
that same server) - Example
- ASSIGN VARIABLE ltwsname,GetName,1,Bodygt
- GetName is the search criteria with a specific
prefix and postfix within which the data is to be
matched.
15Search Criteria
16Search Criteria Configuration
- 1. Find the dynamic ID with the URLTrace tool
- 2. Define a Search Criteria to grab and re-use
the value
17Search Criteria Configuration (cont.)
- 3. Update the Action List
- ASSIGN VARIABLE with Search Criteria name
(Find_session) - Enter ASSIGN VARIABLE line after the URL that you
want to search
4. APPLY variable (Session_ID) in subsequent
URLs
18URL encoding
- Some characters need special encoding to be
passed in the URL (RFC1738) - space ? 20 ? 26
- _at_ ? 40 tab ? 09
-
- The URLENC command does this replacement to
variables of the ActionList
Passphrase value will be Sentence20with20bl
ank20spaces
19Think Time
- Sample ActionList with think times between each
URL
Time (in ms) that the Simuser waits before
sending the next request
20Think Time
Global fixed Think time
Variable think time
Global think time is assigned in the User
Profiles/Behavior Tab. If define, it will be
applied between each level 1 URL.
- Use the random variable assignement to randomize
think time
21Count and Time-Based Loops
- Count-based loops
- LOOP 1 START COUNT100
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.2/index.html
- LOOP 1 STOP
- Time-based loops
- LOOP 3 START TIME1000
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.45.1/index.html
- LOOP 3 STOP
22Nested Loops and Loops with Variables
- Nested loops
- LOOP 1 START COUNT10
- 1 get http//192.168.44.1/index.html
- LOOP 2 START COUNT1000
- 1 get http//192.168.44.1/index.html
- LOOP 2 STOP
- LOOP 1 STOP
- Loops with Variables
- LOOP 3 START COUNT ltapply_count_variable_1gt
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.45.1/index.html
- LOOP 3 STOP
23Timers
- Provide stop-watch functionality
- Timer syntax
- TIMER X START
- One or more Actions here
- TIMER X STOP
- Note Timer names are numeric only and require
quotes around the number
24Timer Examples
- Complex Timers
- TIMER 1 START
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.1/index.html
- TIMER 2 START
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.1/index.html
- TIMER 2 STOP
- 1 get http//192.168.44.1/index.html
- TIMER 3 START
- 1 get http//192.168.44.1/index.html
- TIMER 3 STOP
- TIMER 1 STOP
- TIMER 2 START
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.1/index.html
- TIMER 2 STOP
- Single Timer
- TIMER 1 START
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.1/index.html
- TIMER 1 STOP
- Nested Timers
- TIMER 2 START
- 1 get http//192.168.44.1/index.html
- 1 get http//192.168.44.1/index.html
- TIMER 3 START
- 1 get http//192.168.44.1/index.html
- TIMER 3 STOP
- 1 get http//192.168.44.1/index.html
- TIMER 2 STOP
25Timer Statistics
- The Timers report Min/Max/Avg response times
in summary.csv under User profile User Statistics
(aka URLs section.) They also provide a simple
counter with the number of executions (Attempted
transactions)