Question
5
Replies
336
Views
ING Bank NV
Posted: July 5, 2019
Last activity: April 1, 2020
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)
}
Have you verified the Pega log? HTTP 500 errors are mostly the result of an error resulting in a stacktrace being logged, which in turn could explain the problem.