While I as executing below scala code as Gatling script from Intellij IDEA Ultimate
import java.net.URI
import java.util
import java.util.{Collections, Optional}
import com.tools.RequestSigner
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class CheckResponseCode extends Simulation {
val httpConf = http.baseUrl("https://localhost:8080/")
.header("Accept", "application/json")
val jsonFileFeeder = jsonFile("data\\request.json")
val scn = scenario("get data")
.feed(jsonFileFeeder)
.exec(http("Get data")
.put("/test1")
.sign(new com.tools.RequestSigner()
.check(jsonPath("$..operation").saveAs("operationId"))
.check(status.is(202))
.check( bodyString.saveAs( "RESPONSE_DATA" ) ))
.exec( session => {
println("Some Restful Service Response Body:")
println(session("RESPONSE_DATA").as[String])
session
})
setUp(
scn.inject(atOnceUsers(1))
).protocols(httpConf)
}
I get to see below in the result :
---- Errors --------------------------------------------------------------------
> j.l.NullPointerException 1 (100.0%)
What can be reason behind these and where can I find th detailed stack trace ?