jpl
jpl

Reputation: 382

In Gatling can we insert variable in custom error message

In this exemple

check(
  status is 200,
  css("title").name("Expected page :: Member Home").is("Member Home")
)

How can we use a variable content specified in the session context in the custom error message?

Upvotes: 0

Views: 337

Answers (2)

Bruno Tineli
Bruno Tineli

Reputation: 1

It's possible by using .validate where you can define your custom error response using your variables and session values.

Documentation: https://docs.gatling.io/reference/script/core/checks/#validating

Upvotes: 0

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6623

That's not possible atm (Gatling 3.5.1), the name parameter is a static String, not an Expression[String]. Feel free to contribute.

Upvotes: 0

Related Questions