I'm looking for a way to "listen" to server sent events (sse) within JMeter for a certain amount of time or a certain content.
I haven't found a proper way yet. There is no sampler I could use. I found a javascript library eventsource which would help me doing this put when I try to use the content of it I receive the error:
message:javax.script.ScriptException: ReferenceError: "require" is not defined
And then something like that to use the library:
var source = new EventSource('/events');
source.onmessage = function(e) {
log.info(e.data);
};
What can I do to listen to sse within JMeter with the least dependencies possible (SSH command? Groovy? Java? Javascript?)?
As an alternative I found Gatling.io but I would really like to keep the dependencies as less as possible and not introduce another tool.