Gatling Options

Gatling scenarios have various options available. This document describes each option in detail.

Scenario

General Settings

Includes the basic setup to define your scenario:

  • Source: Either upload all files to Testable or choose to link with a Git repository. If you link to a repository the contents will be cloned onto the test runner when the test starts.

  • Concurrent Users: Number of users each Gatling instance will simulate. Your simulation can access this value as the users system property (Integer.getInteger("users")). While your Gatling scenario is not forced to use this system property, it is highly encouraged so that the test can be distributed appropriately across the test runner infrastructure.

  • Gatling Version: Which version of the Gatling binary to use. Currently versions 3.9.0, 3.8.2, 3.7.6, 2.3, and 2.2.4 are supported. Please contact us to request other version added.

  • Simulation Name(s): One or more simulation class names to run (full name including package name). Multiple names should be comma separated. If a single simulation is provided it will be passed as the -s parameter to Gatling. If multiple are provided in a comma-separated list they will be distributed across the Gatling instances that are part of a test configuration. For example if you have two simulations and set the value to ‘com.mypackage.Simulation1,com.mypackage.Simulation2’ and a test configuration with Gatling Instances = 4, then two of the Gatling instances will run com.mypackage.Simulation1 and two will run com.mypackage.Simulation2. If you have less Gatling instances in your test configuration than simulations listed in this field, then not all the simulations will be run. If left blank Gatling will run all simulations it finds.

  • Repository: If you chose to link the scenario to a repository, select the repository here.

  • Branch: Which branch or tag to use when cloning the repository. Only available if Source = Repository.

Advanced

  • Simulations Directory: Directory within the linked repository or uploaded files that contains the simulations. Note that any simulations in the root directory will be automatically copied to this directory. If you are uploading files remember that you cannot directly create a directory but that any uploaded zip files will be unzipped on the test runner and preserve any directory structure. Defaults to user-files/simulations.
  • Bodies Directory: Applicable for v2.x only. Directory containing any request bodies for the simulation. Defaults to user-files/bodies.
  • Data Directory: Applicable for v2.x only. Directory containing any feeder data for the simulation. Defaults to user-files/data.
  • Additional Libs: Directory containing any additional jar files to include on the Gatling classpath.
  • Java Options: Any additional options to include when executing Gatling. This can include system properties, memory settings, etc.

Files

Upload all files required to run your Gatling simulations including simulations, CSVs, data files, etc. If you upload a zip file it will be unzipped automatically at runtime on the test runner.

Check the “split CSVs across test runners” to have any uploaded CSV split up across test runners when running your test.

Parameters

Parameters are a way to specify values when defining your Test Configuration or via API and then utilizing these within your scenario.

Parameters are passed to your Gatling simulation as system properties. For example to pass an Environment parameter to your scenario:

  1. Add an Environment parameter in the Declared Params section of the scenario.
  2. Use this value within you code via the System.getProperty("Environment") syntax.
  3. When you create your Test Configuration it will ask you to specify a value for Environment. This value will then be passed down into your simulation as defined above. Alternatively use a trigger URL or our Simple API to pass a parameter via API.

Read more about scenario parameters here.