Gatling version: 3.10.3 (must be up to date)
Gatling flavor: java kotlin scala
Gatling build tool: maven gradle sbt bundle
I read the guidelines and how to ask a question topics.
I provided a SSCCE (or at least, all information to help the community understand my topic)
I copied output I observe, and explain what I think should be.
hi commuity, I am trying to design a load test with an SSO login.
After exporting the following code from the HAR file, I modified the feed section for multi-user logins.
I can make normal requests when I use one user, but two users have failed to log in
I think Gatling’s session is isolated, but why is the second user logged in but not logged in properly.
Some of the blogs I read said it was incorrect to log in from Gatling. But I need to log in and give the user back some authorization parameters like token saved in the Cookie.
So How am I supposed to design this scene. Let me know if you need more information to judge
FeederBuilder<String> useraccount = csv(Paths.get("user/user_account.csv").toString()).queue();
private ScenarioBuilder scn = scenario("DemoSimulation")
.feed(useraccount)
.exec(
http("MAIN")
.get("/wfm/sso/login")
.headers(headers_2)
.check(css("form#kc-form-login", "action").saveAs("actionUrl")),
http("SSO")
.post(session -> session.getString("actionUrl"))
// .post(uri1 + "/realms/LDAP/login-actions/authenticate?session_code=oSsatDorbalFIfdLfV1X6Kt18JOejnJG-KZdnE3Mmjg&execution=4597658d-a0dd-4a1c-b66c-25275cda270f&client_id=fswfm-uat&tab_id=MtI9Ug_IXoo")
.headers(headers_4)
.formParam("username", "#{username}")
.formParam("password", "#{encrypt}")
.formParam("credentialId", ""),
http("JobEquipmentTabSR")
.get("/wfm/wm/JobEquipmentTabSR.action?jobId=123456&bundleId=0")
.headers(headers_info)
.check(status().is(200)).disableFollowRedirect()
);
{
setUp(scn.injectOpen(atOnceUsers(2))).protocols(httpProtocol);
}
user num 1 report
user num 2 report