You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `DslWebsocketSampler` class provides a Java DSL for creating WebSocket performance tests using JMeter. It supports the full WebSocket lifecycle including connection, data transmission, and disconnection operations. It is based on [WebSocket Samplers by Peter Doornbosch](https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/) plugin.
4
+
5
+
To use it, add the following dependency to your project:
Only `ws://` and `wss://` protocols are supported. Using any other scheme will throw an `IllegalArgumentException`.
54
+
:::
55
+
56
+
::: tip
57
+
You can use a non-blocking read if necessary in the following way:
58
+
59
+
```java
60
+
websocketRead().waitForResponse(false)
61
+
```
62
+
63
+
In this case, it is not recommended to add an assertion because the response could be empty.
64
+
:::
65
+
66
+
::: warning
67
+
The WebSocket plugin only supports one connection per thread at a time. If you want to change the WebSocket server during execution, you should add a disconnect sampler and then establish a new connection.
0 commit comments