How to receive messages in websockets client

584 views
Skip to first unread message

Tom Lichtenberg

unread,
Jul 1, 2014, 7:24:19 PM7/1/14
to gat...@googlegroups.com
Is there an example of how to handle receiving a message from the websockets server using the gatling websockets plugin (https://github.com/gilt/gatling-websocket). The "complete" example shows:
  open
  sendMessage
  close

but what can be done in the case when the client is expecting one or more responses?

Thank you

Stéphane Landelle

unread,
Jul 2, 2014, 12:22:13 AM7/2/14
to gat...@googlegroups.com
This plugin is a third party that Andrew/Gilt contributed to Gatling 2.
It has been almost completely rebuilt since, and it ships with current snapshots:


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Lichtenberg

unread,
Jul 2, 2014, 12:10:27 PM7/2/14
to gat...@googlegroups.com

Fantastic. And it's working wonderfully -
thanks very much

Stéphane Landelle

unread,
Jul 2, 2014, 12:16:44 PM7/2/14
to gat...@googlegroups.com
Glad to hear!
You're one of the first users of this new feature, so feel free to tell what you think about it (features, design, etc). 

Tom Lichtenberg

unread,
Jul 2, 2014, 12:44:26 PM7/2/14
to gat...@googlegroups.com
I will. I have an immediate need for this, where the websocket server will be expected to send a certain number of responses within a certain period of time, and this implementation provides for exactly that check.

One thing, though - a separate issue - but using the snapshot build from July 1, 2014, my test runs are not producing any stats.tsv output files. Everything else seems ok.

Stéphane Landelle

unread,
Jul 2, 2014, 1:21:21 PM7/2/14
to gat...@googlegroups.com
We ditched stats.tsv as the format was not convenient for the stats we export, and we also export a stats.json.

Tom Lichtenberg

unread,
Jul 2, 2014, 1:29:29 PM7/2/14
to gat...@googlegroups.com
json sounds fine, but I'm not seeing that either, only html files, the simulation.log, and the style and js folders in results. Is the json file supposed to be output by default? 

Stéphane Landelle

unread,
Jul 2, 2014, 2:08:14 PM7/2/14
to gat...@googlegroups.com
The exact name is global_stats.json and it's supposed to be in the js directory.

Tom Lichtenberg

unread,
Jul 2, 2014, 3:43:02 PM7/2/14
to gat...@googlegroups.com
ok. found it. definitely an improvement
thanks!

Stéphane Landelle

unread,
Jul 2, 2014, 4:56:57 PM7/2/14
to gat...@googlegroups.com
You're welcome.
Have fun!
Reply all
Reply to author
Forward
0 new messages