How to design load test with SSO Login?

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
image

user num 2 report
image

I can make normal requests when I use one user, but two users have failed to log in

Are you sure the second entry in your credentials CVS file is correct?

I think Gatling’s session is isolated

They are.

but why is the second user logged in but not logged in properly.

Most likely a error on your side.
You should lower the logging level and check the payload to figure it out.

1 Like

first. Let Me Thank you for your kind reply.
and yes, this error on me. some password are incorrect.
I’m so silly :melting_face: how can i forgot to check this.
Shame on me :disappointed: :disappointed:

Glad that was it.
No problem, sometimes what you need is just another pair of eyes :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.