Need Help understanding the creation of scenarios for high load

Hi,

Can anyone understand what this is going to do ?
playRockPaperScissors = A scenario to play using REST api

Trying to understand what this does ? → separatedByRampsLasting

setUp(
playRockPaperScissors.inject(
incrementUsersPerSec(5)
.times(5)
.eachLevelLasting(10.seconds)
.separatedByRampsLasting(10.seconds)
.startingFrom(10) // Double
).protocols(applicationRootHttp)
).assertions(
global.responseTime.max.lt(50),
global.successfulRequests.percent.gt(95)
).maxDuration(10 minutes)

Thanks,
G

Hi,

See the comment in the Meta DSL documentation

// generate an open workload injection profile
// with levels of 10, 15, 20, 25 and 30 arriving users per second
// each level lasting 10 seconds
// separated by linear ramps lasting 10 seconds
setUp(
  scn.inject(
    incrementUsersPerSec(5) // Double
      .times(5)
      .eachLevelLasting(10.seconds)
      .separatedByRampsLasting(10.seconds)
      .startingFrom(10) // Double
  )
)

Cheers!


Hey Sebastien,

Thanks for the reply. Sorry I was not clear in my question.
What does it mean "separated by linear ramps lasting 10 seconds " ?

  • Is that it gives a boost of 5 users in 10 seconds, so 1 user for every 2 seconds is being added ?
    I have been having trouble understand the terminology, maybe due to my limited experience with load testing.

Regards,
Gaurav

`More or less.

The key idea is that this ramp is on the value usersPerSecond.

From the example code:

  • it starts with a value equal to 10 (from startingFrom).
  • during 10 seconds, this usersPerSecond will stay at the same value (eachLevelLasting)
  • 10 seconds after, it will increment to a value of 15 (original 10 + 5 from incrementUsersPerSec)

But does the number increase at once, or more and more users are added each second?
The ramp suggests that it should increase continually.
from 10 to 15 during 10 seconds

Roughly, it can be seen as :

time value comment

0 10 from startingFrom)
1 10
⋮ ⋮ ⋮
10 10 end of first level
11 10
12 11
13 11
14 12
15 12
16 13
17 13
18 14
19 14
20 15 start of second level
21 15
⋮ ⋮ ⋮
30 15 end of second level

Note: keep in mind that this is an injection profile. That means that the value is the count of NEW users injected into the system. The actual total number depends on this, but on the duration of your scenario.

Cheers!