I'll start with I'm new to both Gatling and Scala, and I'm using Gatling-1.5.3
I'm having two issues with a scenario I'd like to create. The basic setup is this:
val divisionScn = scenario("Division CRUD")
.exec(
http("Create Division")
.get("/division/add")
.queryParam("parameters", java.net.URLEncoder.encode("""[{"divisionName":"Perf Test Division","divisionCode":"DivCode-${id}"]""", "UTF-8"))
)
.pause(0 milliseconds, 5 milliseconds)
.exec (
http("Update Division")
.get("/division/update")
.queryParam("parameters", java.net.URLEncoder.encode("""[{"divisionName":"Update name","divisionCode":"DivCode-${id}"]""", "UTF-8"))
)
.pause(0 milliseconds, 5 milliseconds)
.exec (
http("Delete Division")
.get("/division/delete")
.queryParam("parameters", java.net.URLEncoder.encode("""[{"divisionCode":"DivCode-${id}"]""", "UTF-8"))
)
For each user, I'd like to increment an ID that becomes part of the division identifier "divisionCode". I've found some examples of using AtomicInteger for that, which I am trying to use on the session, but I can't figure out if it is working because it seems that encode method is executed at compile time and not at runtime, so I end up with requests that look like this:
522DivCode-%2524%257Bid%257D%2522%255D
instead of the id being replaced.
I've tried so many things and I can't tell if I'm getting hung up on Scala or Gatling. Any advice greatly appreciated.
Annie