Advanced Action List Functions - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Advanced Action List Functions

Description:

Search the returned content for a dynamic ID (defined by a prefix and postfix) ... criteria with a specific prefix and postfix within which the data is to be matched. ... – PowerPoint PPT presentation

Number of Views:68
Avg rating:3.0/5.0
Slides: 26
Provided by: spirentcom
Category:

less

Transcript and Presenter's Notes

Title: Advanced Action List Functions


1
Advanced Action List Functions
2
Advanced 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

3
SST TracePlus (http//www.sstinc.com/webpro_spiren
t.html)
  • TracePlus captures HTTP stream and outputs action
    list compliant script

4
URLTrace 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)
5
Avalanche Analyzer
  • Run Analyzer in the results Tab to have full
    results of your testing
  • Analyzer provides summary and realtime results

6
Form Database
  • Sample Action List Login (WebAuth, SSL VPN,
    etc) without Form Database
  • Hard-coded user/pass

7
Form Database
  • Sample Action List Login (WebAuth, SSL VPN,
    etc) with Form Database
  • Dynamic user/pass

8
Variable ASSIGN APPLY
1. ASSIGN Variables in the Action List
  • 2. APPLY them in URLs

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
9
Variable 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
10
Variable 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
11
Content 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

12
Content 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
13
Content 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)

14
Search 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.

15
Search Criteria
  • Sample Action List

16
Search Criteria Configuration
  • 1. Find the dynamic ID with the URLTrace tool
  • 2. Define a Search Criteria to grab and re-use
    the value

17
Search 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
18
URL 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
19
Think Time
  • Sample ActionList with think times between each
    URL

Time (in ms) that the Simuser waits before
sending the next request
20
Think 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

21
Count 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

22
Nested 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

23
Timers
  • 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

24
Timer 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

25
Timer 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)
Write a Comment
User Comments (0)
About PowerShow.com