Gatling scripts in StormRunner Load

StormRunner Load supports Gatling, an open-source load testing framework based on Scala, Akka, and Netty.

 

General requirements

  • StormRunner Load supports Gatling scripts that use HTTP requests.
  • Gatling version 2.1.7 is supported.
  • Upload a Gatling script to StormRunner Load in .zip format.
  • If there are multiple Gatling scenarios in a simulation, only the first scenario will be executed.

Back to top

Upload a Gatling script to StormRunner Load

  1. Create a storm.properties file that defines a simulation and transactions.

    The file is a standard Java properties file (key/value pairs). For example:

    simulation=gatlingtest.test1.gatlingTest001
    transactions=login,search,logout

    The simulation key specifies the class name for your simulation. This is identical to the ‘-s’ / ‘--simulation’ option when using the Gatling command line.

    The transactions key specifies the list of transaction names, separated by commas, which are displayed on the Load tests > SLA page.

  2. Create a .zip file that contains the storm.properties file, your .scala files and all other dependencies.

    Organize your files in sub-folders, however, the storm.properties file must be located in the root folder of the .zip file.

Back to top

Transaction definition

Transactions defined in the storm.properties file will appear in the Load tests > SLA page. In addition, all HTTP requests and groups in your script will be reported as transactions. During a test run, add transactions widgets for these transactions from the gallery to the dashboard to display real time data detailing the results of your load test.

HTTP request example

Transactions are: “list users” and “display user 1”

Example:
val scn0 = scenario("gatling1").exec(http("list users").get(" http://127.0.0.1:2333/users "))
.pause(2 seconds)
.exec(http("display user 1").get(" http://127.0.0.1:2333/users/1 ")
.check(status.is(200)))

Group example

Transactions are: "test", “test / list users” and “test / display user 1”

Example:
val scn1 = scenario("gatling1").group("test") {
exec(http("list users").get(" http://127.0.0.1:2333/users "))
.pause(2 seconds)
.exec(http("display user 1").get(" http://127.0.0.1:2333/users/1 ")
.check(status.is(200)))
}

Back to top

Vuser scheduling

Vuser scheduling is determined by the configuration you set on the Load tests > Scripts page.

This means that commands such as ‘atOnceUsers’, ‘rampUsers’, ‘rampUsersPerSec’, ‘rendezVous’, ‘throttle’ and ‘maxDuration’ are ignored.

Assertions APIs, used to verify global statistics for a whole simulation, and global pause configurations are also ignored.

Back to top

Pacing

The completion of one Gatling scenario corresponds to one iteration.

The pacing configured on the Load tests > Scripts page is applied between iterations.

Do not use scenarios that run endlessly, such as loop statements, which never exit, using forever or repeat with a large times parameter.

Back to top