Manual tests with wscat / websocat
Two CLI tools dominate manual WebSocket testing. wscat (Node.js) is the friendliest. websocat (Rust) is the most powerful — supports custom headers, TLS, subprotocols, binary framing. Keep both in your toolbox.
Load tests with k6
k6 has a first-class WebSocket module. Write a JS test, ramp up virtual users, push thousands of concurrent connections to your server. The output covers connection rate, message throughput, error rate, and latency percentiles. Run it before every production change.
Five metrics to monitor in production
Active connections (count, by server). Messages per second (in/out). Connection duration distribution. Close-code histogram (1006 spikes = trouble). Heartbeat round-trip latency p95. Wire these into Prometheus or whatever your stack uses. Alarm on anomalies, not absolute thresholds.