Gatling JWT Atlassian plugin

Hello,
I am trying to use the Atlasssian JWT-signed requests Gatling plugin.
However, my simulation code reports error when stating the following:

cannot resolve the symbol httpWithJwt

I have build the maven project and I have this in my POM:

<dependency>
   <groupId>com.atlassian.gatling</groupId>
   <artifactId>gatling-jwt_2.10</artifactId>
   <version>0.1</version>
</dependency>

`

package com.moc

import io.gatling.core.Predef._
import scala.concurrent.duration._

class SomeSimulation extends Simulation {

  val httpConf = http
    .baseURL("https://app.site.com")
    .acceptEncodingHeader("gzip,deflate")
    .headers(Map("Content-Type" -> "application/json", "charset" -> "UTF-8",  "User-Agent" -> "Android(4.4)/Sweet(0.4)/0.1"))

  val simpleJwtScenario = scenario("Send a JWT signed request")
    
    .exec(
      httpWithJwt("my-jwt-request")
        .get("/some-resource")
        .queryParam("param_1", "value_1")
        .queryParam("param_2", "value_2")
        .sign("${host}", "${user}", "${secret}")
        .check(status.is(200)))

  setUp(simpleJwtScenario.inject(ramp(5 users) over (5 seconds)))
    .protocols(httpConf)
    .assertions(global.successfulRequests.percent.is(100))

}

`

See sample on plugin page: https://bitbucket.org/atlassianlabs/gatling-jwt

You have to add the proper import

com.atlassian.gatling.jwt.Predef.httpWithJwt

I have copied the sample into my simulation. It complains about the import with: cannot resolve symbol ‘atlassian’

`

import io.gatling.core.Predef._
import scala.concurrent.duration._
import com.atlassian.gatling.jwt.Predef.httpWithJwt._

class OAuthSimulation extends Simulation {

  val httpConf = http
    .baseURL("https://xxxxx")
    .acceptEncodingHeader("gzip,deflate")
    .headers(Map("Content-Type" -> "application/json", "charset" -> "UTF-8",  "User-Agent" -> "Android(4.4)/Balle(0.4)/0.1"))

  val simpleJwtScenario = scenario("Send a JWT signed request")

    .exec(
      httpWithJwt("my-jwt-request")
        .get("/some-resource")
        .queryParam("param_1", "value_1")
        .queryParam("param_2", "value_2")
        .sign("${host}", "${user}", "${secret}")
        .check(status.is(200)))

  setUp(simpleJwtScenario.inject(ramp(5 users) over (5 seconds)))
    .protocols(httpConf)
    .assertions(global.successfulRequests.percent.is(100))

}

`

I have build the project with maven and have this:

<dependency>
   <groupId>com.atlassian.gatling</groupId>
   <artifactId>gatling-jwt_2.10</artifactId>
   <version>0.1</version>
</dependency>

But why does it not understand the import in the beginning?

Anyway, the page states “Note that gatling-jwt is built against Gatling 2.0M3a.” so it might be not compatible.

ok.

I guess the Atlassian people stopped their effort once they had load test their own products.