Testing & Simulation
Tools for simulating Charge Points and stress-testing your infrastructure.
ocpp simulate
An interactive, automated Charge Point simulator. It allows you to manually trigger OCPP messages and observe responses in real-time.
Usage
ocpp simulate [options]Options
| Option | Alias | Default | Description |
|---|---|---|---|
--identity | -i | Simulator001 | The unique Identity of the simulated CP. |
--endpoint | -e | ws://localhost:3000/ocpp | The WebSocket URL of your CSMS server. |
--protocol | -p | ocpp1.6 | OCPP subprotocol to use. |
--report | - | Export metrics on exit (json, md, txt) | |
--report-dir | - | Custom directory to save the report |
Commands (Interactive Mode)
Once connected, you can type the following keys:
B: SendBootNotificationH: SendHeartbeatS: SendStatusNotificationM: SendMeterValuesQ: Quit simulation
ocpp load-test
A distributed load testing engine capable of simulating thousands of concurrent Charge Point connections.
Usage
ocpp load-test [options]Options
| Option | Alias | Default | Description |
|---|---|---|---|
--endpoint | -e | ws://localhost:3000/ocpp | The WebSocket URL of your CSMS server. |
--clients | -c | 100 | Number of concurrent simulated clients. |
--ramp-up | -r | 10 | Time in seconds to ramp up connections (staggered connect). |
--report | - | Export load test statistics (json, md, txt) | |
--report-dir | - | Custom directory to save the report |
Use Case
Validate your infrastructure's scalability, Redis clustering performance, and WebSocket connection limits.
ocpp bench
Benchmark your OCPP server's throughput and round-trip latency with precise percentile tracking and a live terminal dashboard.
Usage
ocpp bench [options]Options
| Option | Alias | Default | Description |
|---|---|---|---|
--endpoint | -e | ws://localhost:5000/ocpp | The WebSocket URL of your CSMS server. |
--duration | -d | 30 | How long to run the benchmark in seconds. |
--concurrency | -c | 1 | Number of parallel benchmark clients. |
--protocol | -p | ocpp1.6 | OCPP subprotocol to use. |
--report | - | Export benchmark results (json, md, txt) | |
--report-dir | - | Custom directory to save the report |
Metrics
- Throughput: Sustained messages per second.
- Latency: Round-trip min / avg / p50 / p95 / p99 / max using sub-millisecond
performance.now()precision. - Connection Time: WebSocket handshake + BootNotification round-trip.
- Error Rate: Percentage of failed or timed-out calls.
Use Case
Establish baseline performance numbers, compare deployments, and validate optimizations with reproducible benchmarks.
ocpp fuzz
A protocol fuzzer that sends malformed, invalid, or unexpected payloads to your CSMS to test its resilience and error handling.
Usage
ocpp fuzz [options]Options
| Option | Alias | Default | Description |
|---|---|---|---|
--endpoint | -e | ws://localhost:3000/ocpp | The WebSocket URL of your CSMS server. |
--workers | -w | 5 | Number of concurrent fuzzing worker threads. |
--flood | -f | - | Enable Flood Mode (Blast anomalies with 0ms delay) |
--report | - | Export chaos engine results (json, md, txt) | |
--report-dir | - | Custom directory to save the report |
What it tests
- JSON Parsing: Sends invalid JSON strings.
- Schema Validation: Sends payloads missing required fields or with incorrect types.
- Protocol Compliance: Sends messages out of sequence or with invalid MessageType IDs.