Running unedited recorded traffic fails to actually reproduce the action.


I’m using Gatling to do performance testing on a authenication page that uses the Keycloak framework. In other words I’m recording the traffic that is generated when one attempts to login to a HTTP (not HTTPS at this point) that asks for a username & password. So I run the recorder, attempt a (failed) login, and save the RecordedSimulation. On the Keycloak Events list, I see the failed login.

NOW I run the gatling runner, and select what I just recorded. The run finishes fine, but on the Keycloak events list I see nothing. As if no one has tried to login at all.

The login attempt is made with a POST operation, and I can see that POST if I run a network trace with Wireshark. Yet the login attempt is not registered on the server.

The options I use on the recorder are:

Follow Redirects: ON
Remove cache headers: ON
Infer HTML resources: ON
Automatic referrers: ON
Save & check response bodies:OFF

What am I missing? Is there something special about login attempts via POST? Is Keycloak special in some way? Is anyone here familiar with Keycloak, I wonder…

Here is the recorded simulation (that I execute and the server doesn’t even log). There is some exchange with token and key that is probably complicating things…

package accounts_http_6_full

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

class RecordedSimulation extends Simulation {

val httpProtocol = http
.inferHtmlResources(BlackList("""..css""", “”"..js""", “”"..ico"""), WhiteList())
.acceptEncodingHeader(“gzip, deflate”)
.userAgentHeader(“Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0”)

val headers_0 = Map(“Upgrade-Insecure-Requests” → “1”)

val headers_1 = Map(“Accept” → “application/json”)

val headers_4 = Map(
“Accept” → “/”,
“Pragma” → “no-cache”)

val headers_5 = Map(“Content-Type” → “application/ocsp-request”)

val uri1 = “
val uri2 = “
val uri3 = “

val scn = scenario(“RecordedSimulation”)
.formParam(“username”, “foo”)
.formParam(“password”, “foobar”)
.formParam(“login”, “Log in”))
.get(uri3 + “”)
.post(uri2 + “/”)


Thanks for any advice,



Please provide an actionable reproducer (assuming we don’t know much about keycloack) so we can investigate.
We can’t do much without one.