-
Notifications
You must be signed in to change notification settings - Fork 187
Features
WebSocket Sampler supports ws and wss protocols which represents http and https respectively.
WebSocket protocol allows for COMET-like connections which could remain open for a long period of time. By enabling streaming connection JMeter will maintain the WebSocket session after receiving the response. The same connection could be referenced by different samplers by means of Connection Id field.
Connections are not shared between threads so that if two virtual users execute the same script both will create their own WebSocket connection.
Streaming connection will be closed when a response matching connection termination pattern is received or when the test is stopped.
WebSocket connection might send more than one response and in some cases the connection will never be closed by the server. In order to allow JMeter to capture correct response message you can specify response message pattern. When the response is received matching the pattern the sampler will return response.
In case no response matching the pattern is received within the predefined timeout the last response (or responses) is returned.
WebSocket sampler will keep number of last messages cached and return all of them when the last response is matching the response pattern or the timeout period has elapsed.