I am establishing websocket connection using Websocket sampler to the service and sending messages,I have to check whether the service running or crashed during load testing using JMeter
I have gone through OS sampler,but didn't get the proper articles on how to check the process running
My expectation is that if the service has crashed it will not be able to respond properly therefore JMeter will automatically mark your WebSocket Samplers as failed. You can also set a reasonable timeouts for the WebSocket Samplers so JMeter would not wait for the connection/response forever.
You can also add a Response Assertion to check whether your server returns expected data, absence of errors, etc.
With regards to checking the process it can be done either using OS Process Sampler in combination with Powershell Remoting if your server runs on Windows and SSH Command Sampler if it runs Linux or Unix-like system.
The commands you need to invoke are tasklist for Windows and ps for Unix and derivatives. Check out How to Run External Commands and Programs Locally and Remotely from JMeter article for above Samplers configuration examples for different operating systems.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments