You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ws("Subscribe for updates")
.sendText("")
.await(10.seconds)(check1, ..., checkN)
In other words, you can create many checks with a method and a loop, but it has to be a finite loop with a fixed number of iterations.
A typical scenario for a websocket test is to subscribe to an infinite stream of updates on some event type (e.g. account update) and then perform checks on the received messages - something akin to
ws("Subscribe for updates")
.sendText("")
.during(10.seconds)(check) // keep consuming messages for 10 seconds, perform check
This is currently not possible.
The text was updated successfully, but these errors were encountered:
slandelle
changed the title
Add possibility to consume and check against an undefined number of websocket messages
HTTP: Add possibility to consume and check against an undefined number of websocket messages
Sep 7, 2023
Currently, Gatling's WebSocket DSL expects you to define the number of expected messages: https://gatling.io/docs/gatling/reference/current/http/websocket/#set-a-check.
In other words, you can create many checks with a method and a loop, but it has to be a finite loop with a fixed number of iterations.
A typical scenario for a websocket test is to subscribe to an infinite stream of updates on some event type (e.g. account update) and then perform checks on the received messages - something akin to
This is currently not possible.
The text was updated successfully, but these errors were encountered: