Monday, September 16, 2013

Performance Test Scenarios Designing


Types of Scenarios

 

The Scenarios may be different types based on the features provided by the components of load testing tools. The scenario types available in loadrunner controller are:

 

Ø  Manual scenario

Ø  Manual scenario by percentage

Ø  Goal oriented scenario

 

2       Manual Scenarios

Manual scenario is one of the types of load runner scenarios. This will be used for simulating the real time load tests.

The manual scenario can be built by creating groups and specifying the script, the load generator, and the number of Vusers included in each group

Manual Scenarios can be different types they are like,

Ø  Basic Schedule Scenarios

Ø  Schedule by Group Scenarios

Ø  Real World Scenarios

Basic Schedule Scenarios:

These scenarios are two types

Ø  Run Until Completion

Ø  Run For Duration

Example Scenarios:

 

Load test current application with 100 Vusers using run until completion.

 

Scenario1: Load distribution for the identified modules for the current application

 

Script1: 10 Vusers

Script2: 30 Vusers

Script3: 60 Vusers

 

Ramp Up: Start All Vusers in 05 min

 

Steady State: Run until completion

 

Note: For any kind of load test scenario we need to give pace time in runtime settings pace time is mandatory for scenario design.

 

Give min 60 sec pace time for Run until completion type scenarios.

 

There is no ramp down option for run until completion based load test scenarios.

 

Pace Time: Pace time is the user waiting time after completion of iteration

 


 

Scenario2: Execute the load test for current application using the run for duration using Basic Scenario mode

 

Script1: 10 Vusers

Script2: 30 Vusers

Script3: 60 Vusers

 

Ramp up: 5 Min time to ramp up all the Vusers on to Server

Steady State: 30 Min time to Steady State run all the Vusers concurrently

Ramp Down: Ramp Down all the Vusers at a time

 

 

Elapsed Time
Ramp Up
User Load
0:00:00
Simultaneous
0
0:05:00
Simultaneous
100
0:10:00
Steady State
100
0:15:00
Steady State
100
0:20:00
Steady State
100
0:25:00
Steady State
100
0:30:00
Steady State
100
0:35:00
Steady State
100
0:00:00
Steady State
100
0:05:00
Steady State
100
0:10:00
Steady State
100
0:15:00
Steady State
100
0:20:00
Steady State
100
0:25:00
Steady State
100
0:30:00
Steady State
100
0:35:00
Ramp Down
0

 

Calculate Think Time and Pace Time:

 

Load test scenario with 100 Vusers 35 Minutes of time

 

Assumption: 

 

20 Vusers 5 Iterations

1 Vuser = 35 min * 60 Sec / 5 Iterations

                                        = 2100 Sec / 5 Iterations

                                        = 420 Sec

 

Vuser Execution Time =  3 Sec

Vuser Think time         = 40 Sec

Pace Time                     = 377Sec 

 

Define all the calculated values into runtime setting of a tool while execution of the scenario.     

 

Think Time: Think time is a user waiting time between the web pages.

 

 

 

 

 

 


 

Group by Scenarios:

By using group by scenarios we can design individual scenario for each script under the group.

 

Example:

In our example we are having 3 business scripts for scenario designing and the table below ramp up and ramp down pattern.

 

Script1: 30 Vusers

Script2: 50 Vusers

Script3: 20 Vusers

 

Ramp Up: every 5 sec 10 Users

 

Ramp Down: Down all Vusers at a time

 

Ramp Up and Elapsed Time pattern Table for Individual Scenarios:

 

Elapsed Time
Ramp Up
User Load
0:00:00
--
0
0:00:05
Every 5 Users in 5 sec
5
0:00:10
Every 5 Users in 5 sec
10
0:00:15
Every 5 Users in 5 sec
15
0:00:20
Every 5 Users in 5 sec
20
0:00:25
Every 5 Users in 5 sec
25
0:00:30
Every 5 Users in 5 sec
30
0:00:35
Steady State
30
0:00:40
Steady State
30
0:00:45
Steady State
30
0:00:50
Steady State
30
0:00:55
Steady State
30
0:01:00
Steady State
30
0:01:05
Steady State
30
0:01:10
Steady State
30
0:01:15
Steady State
30
0:01:20
Steady State
30
0:01:25
Steady State
30
0:01:30
Steady State
30
0:01:35
Steady State
30
0:01:40
Steady State
30
0:01:45
Steady State
30
0:01:50
Steady State
30
0:01:55
Steady State
30
0:02:00
Steady State
30
0:02:05
Steady State
30
0:02:10
Steady State
30
0:02:15
Steady State
30
0:02:20
Steady State
30
0:02:25
Steady State
30
0:02:30
Ramp Down
0

 

Graph for individual Scenarios:

 

Real World Scenario:

 

Real world scenario is nothing but we can design the scenario with multiple ramp up’s and multiple ramp down by using the scenario option called real world scenario.

 

 

 

Users Ramp up Pattern:

 

Elapsed Time
Ramp Up
User Load
0:00:00
Simultaneous
0
0:05:00
Simultaneous
100
0:10:00
Steady State
100
0:15:00
Steady State
100
0:20:00
Steady State
100
0:25:00
Steady State
100
0:30:00
Steady State
100
0:35:00
Ramp Down
50
0:40:00
Ramp Up
200
0:45:00
Steady State
200
0:50:00
Ramp Up
300
0:55:00
Steady State
300
1:00:00
Steady State
300
1:05:00
Ramp Down
200
1:10:00
Ramp Up
500
1:15:00
Ramp Down
0

 

Graph:

 


 

 

 

 

 

3       Percentage Distribution Scenarios

 

Percentage Based Scenarios:

 

Scenario3: Performing Load testing on the below scenarios with 100 users, with the load distribution shown below.

Script 1: with 33 % load of 100 Virtual users

Script 2: With 55% load of 100 Virtual users

Script 3: With 12% load of 100 Virtual users with the below scenario settings

Ramp up: Slow Ramp up

Ramp down: Ramp down simultaneous

Duration: 1.50 Min

Think time: 40 Sec

Pacing: -- sec

 

With the following ramp-up and ramp-downs:

Ø  Ramp up and stay at max users for few hours

Ø  Single hump, ramp up, stay at max users for few hours, and then ramp down

Ø  Multiple humps during ramp up / ramp down (slowly)

Ø  Spikes, multiple ramp up / down within short interval of time

 

Scenario with 33% and 55% and 12% Load of 100 Vusers:

 

Elapsed Time
Script1 User Mix
Script2 User Mix
Script3 User Mix
Ramp Up
0:00:00
0
0
0
Slow Ramp up
0:05:00
33%
55%
12%
Slow Ramp up
0:10:00
33%
55%
12%
Steady State
0:15:00
33%
55%
12%
Steady State
0:20:00
33%
55%
12%
Steady State
0:25:00
33%
55%
12%
Steady State
0:30:00
33%
55%
12%
Steady State
0:35:00
33%
55%
12%
Steady State
0:40:00
33%
55%
12%
Steady State
0:45:00
33%
55%
12%
Steady State
0:50:00
33%
55%
12%
Steady State
0:55:00
33%
55%
12%
Steady State
1:00:00
33%
55%
12%
Steady State
1:05:00
33%
55%
12%
Steady State
1:10:00
33%
55%
12%
Steady State
1:15:00
33%
55%
12%
Steady State
1:20:00
 
33%
55%
12%
Steady State
1:25:00
33%
55%
12%
Steady State
1:30:00
33%
55%
12%
Steady State
1:35:00
33%
55%
12%
Steady State
1:40:00
33%
55%
12%
Steady State
1:45:00
33%
55%
12%
Steady State
1:50:00
0%
0%
0%
Ramp Down

 

Graph:

 


 

Ramp up and stay at max users for few hours:

 


4       Goal Oriented Scenarios

We can set required goals to execute the load test manually using runtime setting on controller component. The new goal profile will be created by following the below mentioned steps:

1) From controller Select menu option File -> New
2) New Scenario Dialog box pops up
3) Select the goal oriented scenario radio button
4) Add the appropriate scripts
5) Click OK button
6) New scenario opens in the controller
7) Click on "Edit scenario goal" button in scenario goal
8) Edit scenario goal pops up
9) Click on New button
10) New Goal profile dialog opens
11) Enter the name and press OK
12) Now, you can set the new profile settings

 

 

No comments:

Post a Comment