In my case I was trying to use variable from csv feeder to setup the name of the check:
sse.checkMessage("#{QUESTION_ID_FROM_CSV}")
OR sse.checkMessage(session -> session.getString("QUESTION_ID_FROM_CSV"))
Unfortunately, from what i case see i cannot use Gatling Expression Language nor session variable in this place. Is there any other way to make the name dynamic?
No, that’s not possible. And that’s probably not a good idea: if all your check names are different, Gatling won’t be able to aggregate the results and the stats will be meaningless.
Thank you for answer.
I think when the number of different message types is relatively small compared to the number of concurrent users or iterations, this functionality could be useful.
Nevertheless, this is not a blocker.
Here is my case:
Imagine we have an SSE chatbot and one user who is going to ask 2 questions (for the sake of simplicity). For each question SSE server will replay with messages. We are intrested to validate only specific 3. Once received expected messages, the user will close SSE session. Then, in a new iteration, will send next question (csv feeder uses circular strategy). Our aim is to check the response time for all 2x3 messages returned by SSE server when 10, 100 or X concurrent users ask the same set of quesions.
For single user it may look like this:
Iteration 1
Gatling client - sends POST request to SSE server with question A [REQUEST A]
Gatling client - closing SSE connection [REQUEST B - CLOSE]
For 100 users in a Gatling report we will see:
One statistical entry for all 100 users [REQUEST A]
One statistical entry for all 100 users [REQUEST A - CLOSE]
One statistical entry for all 100 users [REQUEST B]
One statistical entry for all 100 users [REQUEST B - CLOSE]
One statistical entry for all 100 users and 2 questions [CHECK MESSAGE 1]
One statistical entry for all 100 users and 2 questions [CHECK MESSAGE 2]
One statistical entry for all 100 users and 2 questions [CHECK MESSAGE 3]
I would rather need something like this:
One statistical entry for all 100 users [REQUEST A]
One statistical entry for all 100 users [REQUEST A - CLOSE]
One statistical entry for all 100 users [REQUEST B]
One statistical entry for all 100 users [REQUEST B - CLOSE]
One statistical entry for all 100 users [CHECK MESSAGE A1]
One statistical entry for all 100 users [CHECK MESSAGE A2]
One statistical entry for all 100 users [CHECK MESSAGE A3]
One statistical entry for all 100 users [CHECK MESSAGE B1]
One statistical entry for all 100 users [CHECK MESSAGE B2]
One statistical entry for all 100 users [CHECK MESSAGE B3]