Project Setup

Learn how to set up your project to use the Gatling GraphQL protocol.

Understand the license and limitations

The Gatling GraphQL component is distributed under the Gatling Enterprise Component License.

The Gatling GraphQL protocol can be used with both the Community Edition and Enterprise versions of Gatling.

Its usage is unlimited when running tests on Gatling Enterprise. When used with Gatling Community Edition, usage is limited to:

  • 5 users maximum
  • 5 minute duration tests

Limits after which the test will stop. This means that all locally executed tests using the GraphQL protocol are limited by these values. When the test stops, Gatling logs which limit it exceeded.

Get started with the demo project

A demo project is available for each supported language and build tool:

Add the Gatling GraphQL dependency

The Gatling GraphQL plugin isn’t included with Gatling by default. Add the Gatling GraphQL dependency, in addition to the usual Gatling dependencies.

The Gatling GraphQL plugin was introduced in Gatling 3.16 and isn’t compatible with older versions.

For Java or Kotlin:

<dependencies>
  <dependency>
    <groupId>io.gatling</groupId>
    <artifactId>gatling-graphql-java</artifactId>
    <version>3.16.1.1</version>
    <scope>test</scope>
  </dependency>
</dependencies>

Base Gatling setup for Maven is documented here.

dependencies {
  gatlingImplementation("io.gatling:gatling-graphql-java:3.16.1.1")
}

Base Gatling setup for Gradle is documented here.

For JavaScript/TypeScript:

npm install @gatling.io/graphql@3.16.102

For Scala:

<dependencies>
  <dependency>
    <groupId>io.gatling</groupId>
    <artifactId>gatling-graphql</artifactId>
    <version>3.16.1.1</version>
    <scope>test</scope>
  </dependency>
</dependencies>

Base Gatling setup for Maven is documented here.

dependencies {
  gatlingImplementation("io.gatling:gatling-graphql:3.16.1.1")
}

Base Gatling setup for Gradle is documented here.

libraryDependencies += "io.gatling" % "gatling-graphql" % "3.16.1.1" % "test,it"

Base Gatling setup for sbt is documented here.

Edit this page on GitHub