[WARN] i.g.h.a.AsyncHandlerActor - Request 'DisplayLogin' failed: regex(Log On).find(0).exists, found nothing

hi,
when i run parallel users i got this error in the any first check regex for example: .check(regex(“Log On”).exists)

what is the reason and how i fix it ?

i think i know why it is happening: something in the cash is not clear so i am automatically enter to the page in the second iteration and up.
how do i clear all on every cycle?
i have tried all of those but not helped:

exec(flushHttpCache)

If you want a close model and trick the tool to recycle virtual users (improper model from other tools) you have to clean the cookies too.

okay but how? i didn’t see any function for it in gatling

You can .disableCaching globally

Something like:

`
val httpProtocol = http
.baseURL(“http://myComp.myApp.org”)
.disableCaching

`

``

i already did disablecashing

Can you share your simulation and html response?

this is the main code concept:
as i understand, i need something that clear the cash/cookies at all for evert iteration.
for now, instead of the the DisplayLoginPage i got directly the page after it.
something like redirect automatically even i do disableredirect that works for one user but not parallel.

import java.util.concurrent.ThreadLocalRandom
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration

class saml2login extends Simulation{

  var randomNumber = 1000
  var randomUser = ""

  val durationSeconds = 1
  var userNumber = 0

  val httpConf = http
    .acceptEncodingHeader("gzip,deflate,sdch")
    .acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
    .connection("keep-alive")
    .disableCaching
    .disableAutoReferer

  val RequestToSpJavaUi = {
    http("RequestToSpJavaUi").get("/spc/")
      .disableFollowRedirect
      .check(status.is(302))
     .check(header("Location").find.saveAs("redirectURL"))
 }

  val DisplayLogin = {
    http("DisplayLogin").get("${redirectURL}")
      .check(regex("Log On").exists)
      .check(regex("Remember me").exists)
  }

  val AuthenticateUser = {
      http("AuthenticateUser").post("${redirectURL}")
      .check(regex("You have now been authenticated").exists)
}
  
  val scn = scenario("FullCycle")
   .repeat(2) {
    exec(flushHttpCache)
    .pause(3)
    .exec(RequestToSpJavaUi)
      .pause(3)
      .exec(DisplayLogin)
      .exec(AuthenticateUser)
  }
  
    setUp(
      scn.inject (
        atOnceUsers(1)
    ).protocols(httpConf)
    )
}

I sais clear, not disable. Please search the documentation’s HTTP section.

http://gatling.io/docs/2.1.4/http/http_helpers.html?highlight=cookies#flushing-session-cookies

Thanks all, everything is working now perfect.
Conclusion: using flushSessionCookies or flushCookieJar solved the problem.
It is so great that we can have such a developer tool like GATLING that enable us to debug and run like any other code.
yes, it is deferent than doing it by UI and xml files.
Thanks for Gatling

Thanks for your kind words!