Hi John,
Thank you so much for the reply.
I have tried embedding the code in the file as you said and I am trying to pass the values that I would like to change in the file for every user as parameters. I did it based on the post -https://groups.google.com/forum/#!searchin/gatling/Soap/gatling/gDhbjlQzof4/SwDwLEZ1xEwJ . When I record the script for one user using Gatling recorder, the resultant script contains only formParam(). So I presume I should go with the same. However I have tried using both formParam() and body() and the result is still the same. The script runs fine and no errors are displayed however the users are not getting created. I am sure I am missing out something here. I have tried to find out but no luck. Would like to seek your help with this.
My script looks like this
import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.request.Body
import xml._
import scala.io.Source
class getdecision extends Simulation {
val httpProtocol = http
.baseURL(“http://52.3.151.185:8004”)
.inferHtmlResources(BlackList("""..js""", “”"..css""", “”"..gif""", “”"..jpeg""", “”"..jpg""", “”"..ico""", “”"..woff""", “”"..(t|o)tf""", “”".*.png"""), WhiteList())
val uri2 = “http://52.3.151.185:8004”
val scn = scenario(“GetDecision”)
.exec(http(“request_0”)
.get("/"))
.pause(29)
.feed(csv(“UserDetails.csv”))
.exec(http(“request_1”)
.post("/")
.body(SAMLAuthenticationSoapRequest)))
// .formParam(“txtAK”,SAMLAuthenticationSoapRequest("${APPID}","${TIN}","${FirstName}","${LastName}"))
// .formParam(“PSButton”,“PS Value”))
def SAMLAuthenticationSoapRequest(APPID: String, TIN: String, FirstName: String, LastName: String) = “”"<?xml version="1.0" encoding="UTF-8"?>
0ef6468d-d44b-4466-b65c-71a5dfb020c6
1.0.0.80
${TIN}
$(FirstName}
P
${LastName}
19920820
168 WAVERLY ST APT 2
NULL
PROVIDENCE
DE
02909
US
168 WAVERLY ST APT 2
NULL
PROVIDENCE
DE
02909
US
................
.....................
.......................
"""
setUp(scn.inject(atOnceUsers(5))).protocols(httpProtocol)
}
My CSV is as follows
APPID, TIN, FirstName, LastName
72B4D4F6-EC4C-4BCE-85FB-8B69A446B958, 139933900, RyydvmZX, UgmpgLOn
9BB0D749-0F3B-4F63-84DF-BCA68D418742, 092201415, orfiGAlG, QeyygrTu
D8E4EE7D-5589-45CF-94D9-42CD0D076371, 082323492, kBopjfDF, PxqkxgsX
17332A53-EA86-44A2-AEA8-81C70F0A24F1, 866891404, eVbaSMWc, dgivSyxf
B5842E2A-C8EA-41AC-A989-D4861F0B7EBA, 334840342, kerqBUfC, muaqEdLU
Thanks in advance.
Regards,
Sowmeeya