0
votes

So I am attempting to create a basic gatling test for load balancing and I'm getting a NullPointerException when I attempt to create a session. It seems to fail when I create the "get" and attempt to check it afterwards. Any help would be highly appreciated.

class CurrencySimulation extends Simulation{
  def run(): Unit = {
    val x = 5
    val scn = scenario("My scenario").repeat(10) {
      exec(
        http("My Page")
            .get(session => "https://www.google.com")
            .check(status.is(200))
      )
    }

    setUp(scn.inject(atOnceUsers(1))).assertions(global.successfulRequests.percent.is(50))
  }
}
1

1 Answers

1
votes

What you're doing is definitively not a "basic Gatling test". There isn't such run method in Gatling, that's something that you've introduced, but Gatling doesn't work this way.

Stick to supported usages, ie to Gatling documented launchers: bundle+script, maven, sbt.