Developing a Charging Station Management System (CSMS) without access to real charging hardware is like trying to build a website without a browser. However, real EV chargers are expensive, bulky, and difficult to automate for testing.
This is where OCPP Simulators come in. They allow developers, QA engineers, and DevOps teams to simulate thousands of chargers, edge cases, and error conditions that would be impossible to reproduce with physical hardware alone.
What is an OCPP Simulator?
An OCPP Simulator is a software tool that mimics the behavior of a physical EV Charging Station (Charge Point). It speaks the Open Charge Point Protocol (OCPP) to communicate with a CSMS, just like a real charger would.
Unlike real hardware, a simulator:
- Can be instantiated instantly (no shipping or installation).
- Can generate errors on demand (e.g., "Simulate a broken cable").
- Can run thousands of instances on a single laptop for load testing.
They are essential for CI/CD pipelines, giving developers rapid feedback on their code changes.
Types of OCPP Simulators
1. GUI-Based Simulators
These tools provide a visual interface with buttons to "Plugin Cable", "Swipe Card", or "Unplug". They are excellent for initial learning and manual debugging but cannot be automated.
2. CLI / Headless Simulators
Running from the command line, these tools are designed for automation. They take a configuration file (like a script) and execute a scenario (e.g., "Boot → Authorize → StartTransaction").Mockpoint is a prime example of this category, built specifically for modern developer workflows.
3. Cloud-Hosted Simulators
SaaS platforms that simulate chargers from the cloud. They are easy to setup but often introduce latency and cost, and can't always test your localhost environment easily.
4. Hardware-in-the-Loop (HIL)
The most advanced form, connecting real charger controllers (EVSE controllers) to a simulated grid or vehicle interface. This is used by hardware manufacturers to test firmware, rather than CSMS developers.
Key Features to Look For
When choosing an OCPP testing tool, consider these critical features:
- Protocol Support: Does it support OCPP 1.6J and the newer OCPP 2.0.1?
- Message Coverage: Can it send every message type, including obscure ones like
DataTransferorUpdateFirmware? - Scenario Scripting: Can you define complex test flows in a readable format?
- Determinism: Will the test run exactly the same way every time? (Crucial for CI/CD).
- CI/CD Readiness: Does it return proper exit codes (0 for success, 1 for fail) to break the build on error?
Comparison of Popular Tools
| Tool | Protocol | Scripting | CI/CD Ready | License |
|---|---|---|---|---|
| Mockpoint | 1.6J | YAML | ✅ Excellent | Evaluation |
| SteVe | 1.6J | Limited | ❌ No | Open Source |
| OCPP.js | 1.6J, 2.0 | JavaScript | ⚠️ Manual | MIT |
Why Choose Mockpoint?
Mockpoint was built to solve the "flaky test" problem in CSMS development.
- Deterministic Simulation: No random delays or race conditions.
- YAML Scenarios: Define your test cases in simple, readable YAML files.
- Zero Dependencies: Distributed as a single binary. No need to install Java, Node.js, or Docker just to run a test.
- Fast Execution: Written in Rust for blazing speed.
Why Determinism Matters
A flaky test that sometimes passes and sometimes fails is worse than no test at all. It destroys trust in your deployment process. Mockpoint guarantees the exact same message sequence and timing every single run.
Example Scenario
charger:
id: "CP001"
vendor: "TestVendor"
model: "TestModel"
scenario:
- boot_notification:
expect_status: Accepted
- heartbeat:
interval: 60Getting Started with Simulation
- Download the Mockpoint binary for your OS.
- Create a scenario file (like the example above) named
scenario.yaml. - Run the simulator against your local CSMS:
mockpoint run scenario.yaml --csms ws://localhost:9000/ocpp/CP001See our Quick Start Guide for more detailed instructions.
Conclusion
Choosing the right OCPP charge point simulator depends on your needs. For manual testing, a GUI tool might suffice. But for building a robust, enterprise-grade CSMS, you need the reliability and automation capabilities of a CLI tool like Mockpoint.
Ready to take control of your testing? Download Mockpoint today and stop worrying about hardware edge cases. For a deeper dive into testing strategies, read our CSMS Testing Guide.