I am trying to run gatling test where it logs in and checks and store the value of a cookie.
Here’s the code snippet that I have:
.pause(minWait, maxWait)
.feed(usernames)
.exec(
http("_pLoginForm_Basic")
.post("${postUrl}")
.headers(headers_0)
.formParam(“username”, “${username}”)
.formParam(“password”, “test123”)
.check(status.is(200),
headerRegex(“Set-Cookie”, “viafoura_session_id”)
.ofType[(String, String)]
.saveAs(“vf_sess_id”)
)
);
The login and status check part is working fine, but headerRegex always give me the following error during execution:
07:55:03.140 [main][ERROR][ZincCompiler.scala:141] i.g.c.ZincCompiler$ - /home/crengga/projects/vi-vinl/vinl-gatling/src/test/scala/nl/vi/gatling/simulation/OpenSessionsInitializer.scala:63: could not find implicit value for parameter extractorFactory: io.gatling.http.check.header.HttpHeaderRegexExtractorFactory
Am I missing some imports or declarations in my gatling (scala) class?