Question

5
Replies
279
Views
charanjeetp Member since 2017 3 posts
ING Bank NV
Posted: 1 year ago
Last activity: 5 months 3 weeks ago

Login session gives 500 internal error when calling from Gatling

Hi,

I am performing load test for Pega application so in my simulation script the Login script getting response from pega server as 500 Internal error.Below mentioned is the code please help.

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import java.util.concurrent.ThreadLocalRandom
class AdvancedSimulationStep01 extends Simulation {
val testServerUrl = "https://url"
val username = "user"
val password = "pwd"
val userCount = 10
val httpProtocol = http
.baseUrl(testServerUrl)
val scn = scenario("Scenario1")
.exec(
http("Login and Post Data")
.post("/prweb/")
.basicAuth(username, password)
.check (currentLocation.transform (s => {
val pattern = """.*/prweb/(.*)/.*""".r
val pattern(temp) = s
temp
}
).saveAs ("magictoken"))
)
.pause(10)
setUp(scn.inject(atOnceUsers(10))).protocols(httpProtocol)
}
Low-Code App Development Testing Applications
Share this page LinkedIn