I have read the following documentation on csv parsing. http://gatling.io/docs/2.0.1/session/feeder.html#feeder
I am still unable to capture the following implementation:
- How does one create variables in Scala, representing each column in the csv file?
- If I have 2 users running in sequence, how does Gatling parses the CSV file for both of the users? Does it automatically look up the next value after the first value have been parsed?
What I am trying to achieve:
- Gatling reads the CSV file which contains the SIM serial number and reason details, represented by variable "SimSerial" and "ReasonID"
The values of the CSV file are inserted into the parameters shown the code below
package sim_replacement import scala.concurrent.duration._ import io.gatling.core.Predef._ import io.gatling.http.Predef._ import io.gatling.jdbc.Predef._ import io.gatling.core.feeder._ class shakeout3a extends Simulation { val serialNumReasonID= csv("search2.csv") val scn = scenario("shakeout3") .group("5. Check SIM model"){ exec(http("request_24") .post("""/SimReplacement/CheckSimModel""") .headers(headers_24) .formParam("""sim""", """${SimSerial}""") .resources(http("request_25") .post(uri2 + """/SIMReplacement/GetReasonDetails""") .headers(headers_25) .formParam("""strReasonId""", """${ReasonID}""") }}
"""
for strings that don't take advantage of its features? - Electric Coffee)
in the code from what I can tell - Electric Coffee