An extension to Gatling 2 to help send JWT-signed requests. Early stages, currently only supports GET requests.


Create a Gatling Project

For example, use the Gatling Maven archetype. Note that gatling-jwt is built against Gatling 2.0M3a.

Add gatling-jwt as a dependency

First, make sure your project is configured to look for libraries in repository

Next, ensure your scenario can see the gatling-jwt library. For example, if you're using sbt:

libraryDependencies += "com.atlassian.gatling" %% "gatling-jwt" % "0.1"

Or with Maven:


Invoke gatling-jwt from your Scenario

Just swap your http("request-name") for httpWithJwt("request-name"), and call .sign("consumerKey", "userKey", "sharedSecret") after adding all your querystring parameters.

For example:

import scala.concurrent.duration.DurationInt

import com.atlassian.gatling.jwt.Predef.httpWithJwt

import io.gatling.core.Predef.{Simulation, UserNumberImplicit}
import io.gatling.core.Predef.{checkBuilder2Check, extractorCheckBuilder2MatcherCheckBuilder, ramp, scenario,     stringToExpression, value2Expression}
import io.gatling.http.Predef.{http, httpProtocolBuilder2HttpProtocol, requestBuilder2ActionBuilder, status}

class SimpleJwt extends Simulation {

  val httpProtocol = http.baseURL("")

  val simpleJwtScenario = scenario("Send a JWT signed request")
        .queryParam("param_1", "value_1")
        .queryParam("param_2", "value_2")
        .sign("${host}", "${user}", "${secret}")

  setUp(simpleJwtScenario.inject(ramp(5 users) over (5 seconds)))



Hack away, then sbt clean publish to get a snapshot in your local repo.

To release a new version: sbt release.