Does gatling follows JMeter regular expressions ?

I have tried few regular expressions for Gatling that work in JMeter to capture dynamic values.
Here’s is response data :

userSession value=113711.964682058fitQAfQpViDDDDDDDfAQtpDffV>

I wanna capture value tha is in bold above.

My trials :

1.) .check(regex(""“userSession value=(.?)>""").saveAs(“account_id”))
2.) .check(regex("""userSession value=([0-9]{6}.[0-9a-zA-Z]
3.) .check(regex(""“userSession value=(.*)>”"").saveAs(“account_id”))

Its throwing value(…).exists didn’t match : found nothing

After sometime, the place where i replaced value with variable name(here,account_id) , throwing account_id is not defined.

Please do needful

Here is my code :

val scn = scenario(“Scenario Name”)//place where i captured
.check(regex(""“userSession value=(.*)>”"").saveAs(“account_id”))

.exec(http(“request_11”)//place where i replaced
.param(""“userSession”"", “”"${account_id}""")
.param(""“username”"", “”“user1"”")
.param(""“password”"", “”“user1"”")
.param(""“login.x”"", “”“67"”")


Could you lower logging level to debug in logback.xml and check that the response you get is indeed what you expect?

Interesting thing is that,

Am seeing only default lines of xml code that come up after unzipping of gatling.
logback file is not storing any debug info here.



This is my logback.xml file content . Please show me where i can debug ??

<?xml version="1.0" encoding="UTF-8"?> %d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx false

Where it says “Uncomment for logging ONLY FAILED HTTP request and responses”, uncomment the line underneath it (remove the , in case you’re not familiar with the syntax). This will log the request and response for any failed requests to stdout.

Hi Michelle,

Thanks for your reply.
This file is still not logging request and response for any failed requests.
I did uncomment that line what you showed but still not log the failed requests.


Are there any warnings when you start Gatling about invalid content in logback.xml? And you’re still getting the “didn’t match: found nothing” error during execution, but nothing extra is being printed to the console?