Home

Awesome

Scala Steward badge Continuous Integration

A Giter8 template for the Gatling performance test project.

About

The Gatling-template.g8 is a handy tool that allows you to quickly create SBTs for Gatling. The template allows you to create projects for HTTP (default), JDBC, AMQP, and Kafka protocols. The template supports Windows and Unix OS.

How to use

sbt new galax-io/gatling-template.g8

Confirm your operating system in the os_windows field. Set this field to "y" if you use Windows OS. Default value for Unix OS is "n".

Enter the name of your service in the name field.

Enter your domain in the package field to form the project structure, e.g. when the value of the packaging field is set to "org.galaxio.performance" the project structure will be org.galaxio/performance/

Parameters "name" and "package" are required. Leave the default or specify yours.

How to install sbt https://www.scala-sbt.org/1.x/docs/Setup.html.

Parameters

Use the following parameters to create a template

ParameterDescriptionDefault value
os_windowsIf you are using Windows OS, set this parametern
packagePackage nameorg.galaxio.performance
nameService namemyservice
httpProtocol used in scriptsy
jdbcPluginProtocol used in scriptsn
amqpPluginProtocol used in scriptsn
kafkaPluginProtocol used in scriptsn
scala_versionVersion dependencies in project2.13.8
sbt_versionVersion dependencies in project1.7.1
gatling_versionVersion dependencies in project3.8.4
sbt_gatling_versionVersion dependencies in project4.2.3
sbt_scalafmt_versionVersion dependencies in project2.4.6
gatling_picatinny_versionVersion dependencies in project0.11.2

By default, a project will be created with the org.galaxio.performance package and the name myservice, for the HTTP protocol, with the specified dependency versions

Overriding variable environment

In Gatling version 3.4.2, the typesafe.config library was updated, where, for security reasons, they removed the loading of all variables from ENV into the config. To override a variable from simulation.conf you need:

  1. By setting the JVM property -Dconfig.override_with_env_vars=true;
  2. Pass the variable in the CONFIG_FORCE_variablesName format, for example CONFIG_FORCE_intensity=100.

More details here.

Other info

Known bugs

At the moment, when working in Windows using SBT version lower than 1.4.1 there is a problem - the temporary .gitignore file is not deleted. This does not affect project creation.

Template license

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/.