snapsocket-cli
v1.0.2
Published
WebSocket Load Testing Tool
Downloads
6
Maintainers
Readme
SnapSocket CLI
WebSocket Load Testing Tool
Installation
npm install -g snapsocket-cliUsage
snapsocket run <yaml-filepath> -c <number-of-clients> -a <ws/socketio> -e <json/csv>-c --clients <number>, "Number of clients", 100
-a --adapter <type>, "ws/socketio", ws
-e --export <format>, "json/csv", jsonexample
snapsocket run samples/chat-flow.yaml --clients 200 --adapter socketio --export csvSample Workflow
flow:
- connect: "ws://localhost:3000"
- send: '{"event":"auth","token":"abc"}'
- wait_for: '{"event":"auth_success"}'
- send: '{"event":"join","room":"general"}'
- wait_for: '{"event":"joined"}'
- disconnectFeatures
- Simulate 100-500 concurrent clients
- Execute custom YAML workflows
- Measure latency and error rates
- Export results to JSON/CSV
- Supports raw WebSocket and Socket.IO
Run Test Server (Local)
To simulate a WebSocket server with fake auth:
node examples/test-server.js