Question

5
Replies
364
Views
charanjeet pall (charanjeetp)
ING Bank NV

ING Bank NV
NL
charanjeetp Member since 2017 3 posts
ING Bank NV
Posted: July 5, 2019
Last activity: April 1, 2020
Posted: 5 Jul 2019 6:07 EDT
Last activity: 1 Apr 2020 20:42 EDT
Closed

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)
}
DevOps Testing Applications
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.