OCPP CLI
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 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.