Testing your CSMS against a simulated OCPP 1.6J charger

Short answer: To test a CSMS without a room full of chargers, connect a simulated OCPP 1.6J charge point to it and run scripted scenarios: boot and heartbeat, transactions, remote commands, offline replay, smart charging and error handling. Each check should be able to fail, so a pass means your back office really handled the case.

If you build or run a charging management system (CSMS), every new charger model that joins your network is a test you did not plan. Real chargers are slow to set up, expensive to keep in a lab, and hard to push into fault conditions on demand. You cannot easily make a physical charger lose its connection in the middle of a session, replay three hours of offline transactions, or send a malformed message at exactly the wrong moment. A simulated charger can do all of that, every time, in a few minutes.

This guide explains what to test on the CSMS side of OCPP 1.6J, how a simulated charger helps, and what to look for in a test tool.

Why test the back office, not only the charger

Charger makers test their firmware, but the CSMS is the other half of every conversation. When a session is not billed, the cause is just as often a back office that reused a transaction id, rejected a late offline message or sent a charging profile the charger could not accept. CSMS teams that test only with the two or three chargers on their desk find these problems in production, from operator complaints.

What to test on the CSMS side

Area What a good CSMS does
Boot and heartbeat Accepts BootNotification with a sensible heartbeat interval; answers Heartbeat with the correct UTC time
Authorization Answers Authorize for valid and invalid idTags with a valid status and a sane expiry date; rejects oversized idTags
Transactions Gives every StartTransaction a unique transactionId, including two sessions at once on two connectors; answers StopTransaction for every stop reason
Meter values and status Accepts MeterValues with many measurands, and StatusNotification for every connector status, including Faulted and connector 0
Remote commands Sends well-formed RemoteStart, RemoteStop, Reset, UnlockConnector, ChangeConfiguration and TriggerMessage requests
Offline replay Accepts transactions with past timestamps after a reconnect and closes the right session
Smart charging Sends charging profiles with the right purpose on the right connector
Firmware, diagnostics, reservations, local lists Sends valid requests and handles every status the charger reports back
Error handling Answers bad messages with the correct OCPP 1.6J CallError code and keeps the session open

Five scenarios that catch real bugs

1. Two sessions at the same time

Start transactions on two connectors of the same charger within a second of each other. A CSMS that builds ids from a timestamp, or reuses the last id, gives both sessions the same transactionId, and one of them is billed wrongly or never closes.

2. The offline replay

Disconnect the simulated charger, run a session while it is offline, then reconnect and send the queued StartTransaction and StopTransaction with their original, past timestamps. The CSMS must accept them, not reject them as stale, and link the stop to the right start.

3. Every stop reason

Stop sessions with each reason the protocol allows, from a local stop to a power loss or an emergency stop. Some back offices only handle the reasons they have seen in the field and fail on the rest.

4. A broken message

Send a frame that is not valid JSON, a call with the wrong field type and an action the CSMS does not support. The CSMS should answer with the right CallError (for example NotImplemented or TypeConstraintViolation) and keep the WebSocket open, not drop every session on that charger.

5. The reconnect

Close the socket from the charger side without warning and reconnect. The CSMS should accept the new connection for the same identity straight away and not keep a ghost session that blocks it.

A test you cannot fail is not a test

A test suite is only useful if its checks can fail. A check that always passes looks good on a dashboard and proves nothing. The way to be sure is to prove every case against a deliberately faulty back office: for each test there is a known fault, such as a reused transaction id or a missing heartbeat time, and the test must catch it. If the faulty version passes, the test is broken, not the CSMS.

What to look for in a CSMS test tool

  • A simulated charger that connects to your CSMS, over your real WebSocket URL, with your charge point identity and password, so you test the same path a real charger uses.
  • Automated cases, so a full run can be repeated on every release of your back office.
  • Clear failures: what was sent, what came back, why it is wrong and how to fix it.
  • Reports you can share with charger makers and operators.
  • Vendor neutrality: the tool should not be tied to a competing CMS.

Testing your CSMS with ChargeBench

ChargeBench by Tecell tests both sides of OCPP 1.6J. For CSMS testing you enter your back office’s WebSocket URL, a charge point identity and, if you use one, a password. ChargeBench’s simulated charge point connects to your CSMS and runs about 100 automated cases across boot, authorization, transactions, meter values, status, remote commands, configuration, offline replay, smart charging, reservations, local authorization lists, firmware, diagnostics, security notifications and error handling. Every case is paired with a fault that proves it can fail, and every failure comes with a likely root cause and a fix hint for your developers. Each run produces a report your team can share.

CSMS testing is part of the paid CSMS plans, set up with the Tecell team: see the ChargeBench pricing page and choose Contact sales to get started. ChargeBench is an independent compatibility test and is not tied to any CMS, including Tecell’s own.

Frequently asked questions

Can a simulated charger replace testing with real chargers?

No, it complements it. A simulator covers the protocol flows and fault cases quickly and repeatably; real chargers still show you their firmware’s own habits. Use the simulator on every release and real chargers for onboarding new models.

Does my CSMS need to be reachable from the internet?

A hosted test tool connects to your CSMS over WebSocket, so the endpoint you test must accept connections from the test service, for example a staging environment with a public wss:// URL.

Which protocol version does ChargeBench test?

OCPP 1.6J (JSON over WebSocket), for both charger and CSMS testing.

How often should a CSMS be tested?

On every release that touches charger communication, billing or session handling, and whenever you change the libraries that handle WebSocket or JSON.

Will a passing run guarantee every charger works with my CSMS?

No test can promise that. A passing run shows your back office handles the protocol flows and fault cases in the suite, which removes most surprises when a new charger model is connected.

Scroll to Top