Search code examples
groovywebsocketjmeterload-testing

Can I run socket and http test In parallel and change http request body depend last socket message used Jmeter


I need to write a load test for a web application which uses the WebSocket protocol for sending some server states to users and in parallel users send requests with data from this server state. I need a socket client which will listen to the socket and update the current server state and at the same time need to send HTTP requests with data from the current state.

Can implement it on Apache JMeter? If yes may you know some useful articles (not about BlazeMeter parallel controller) or examples? Or can you advise some tools which better for this target and which can generate a concurrent load of at least 20k users (currently use Jmeter cluster)? Thank you in advance!


Solution

  • One JMeter thread (virtual user) can only execute one Sampler at a time, if you need to run 2 requests at the same moment you need to either need to use 2 different Thread Groups or if you prefer to stay with 1 thread group you can use i.e. If Controller so "even" users would run HTTP requests and "odd" WebSocket or vice versa.

    If you need to pass data between threads (virtual users) either use JMeter Properties or Inter-Thread Communication Plugin