Automated regression testing catches bugs before they reach production. For CSMS development, that means running OCPP scenarios automatically: creating virtual charging stations, driving transactions, and verifying your CSMS responds correctly. With a simulator that exposes a REST API, it is straightforward to set up, and it reaches bugs that unit tests cannot.

Why OCPP regression tests matter

A CSMS is a stateful, protocol-heavy system. A change to authorization logic can silently break smart charging. A refactored meter value handler can corrupt billing records. A reconnect fix can introduce a race condition in session recovery. None of these surface until a charging station actually connects and exchanges messages, so unit tests miss them.

Running OCPP integration tests in CI gives you a fast feedback loop: every merge to main verifies that the core charging flows still work correctly.

What you need

To run OCPP tests in CI you need three things:

The REST API is what makes the rest practical. Without it, you end up writing a custom WebSocket client for every test, which is enough overhead that the tests usually never get written.

A typical CI test scenario

An automated OCPP test with a REST-driven simulator looks like this:

  1. Create a virtual charging station pointed at your staging CSMS URL
  2. Wait for BootNotification to complete (poll station info until status is online)
  3. Connect a virtual EV to connector 1
  4. Send RemoteStartTransaction from your CSMS
  5. Let the session run, collecting MeterValues
  6. Send RemoteStopTransaction
  7. Assert your CSMS recorded the correct session energy
  8. Delete the station

Each step is a single REST call. The full scenario takes seconds. Run 10 stations in parallel and you have a meaningful load test in under a minute.

What to test beyond happy path

Happy-path transactions catch the obvious regressions. The more valuable tests cover edge cases: network disconnect mid-transaction and reconnect, authorization with an expired id_tag, RemoteStart before an EV is connected, fault injection during active charging. Those are the scenarios that break CSMS systems in production, and they are hard to reproduce reliably with real hardware.

SimItNow provides the REST API that makes all of this scriptable. Sign up, get your API key, and point your test script at the SimItNow API. Your CSMS URL is the only other thing you need.

Get your free API key and run your first OCPP CI test.