If you are building or integrating a CSMS, a Charging Station Management System, the most annoying blocker is hardware. A physical charge point is expensive, slow to ship, awkward to power, and impossible to keep on your desk in the ten variations you actually need to test. The good news: for almost all backend testing, you do not need one. A charge point, from your server’s point of view, is nothing more than a WebSocket client that sends and receives JSON. You can reproduce every message it would ever send, in software, from a laptop.

This article walks through how to test an OCPP charge point without any hardware: what you can validate this way, what you genuinely cannot, and how to build a repeatable integration-testing workflow. If you want to see it immediately, this site covers both halves for free: the walkthrough in the charging session guide replays a full session in your browser so you can learn the sequence, and Rey, the virtual charge point, opens a real OCPP connection to your own backend so you can fire messages at it and watch the responses on the wire. Everything below explains what those messages mean and how to turn ad-hoc poking into a real test suite.
Why software simulation actually works
OCPP 1.6 and 2.0.1 both run over WebSocket, and both carry JSON payloads. There is no proprietary binary framing, no special radio, no magic. When a real charge point boots, it opens a WebSocket connection to a URL like wss://csms.example.com/ocpp/CP-0001, then sends a BootNotification. Your backend has no way to know whether the bytes on that socket came from a €4,000 DC fast charger or a 40-line script. As long as the messages are well-formed and arrive in a plausible order, the CSMS processes them identically.
That is the whole trick. If you want a refresher on what these messages are and how the charge-point-to-backend relationship works, the What Is OCPP explainer covers the fundamentals. Here we assume you know the basics and want to exercise them.
The practical upshot: you can validate authorization logic, transaction accounting, meter-value ingestion, smart-charging profiles, remote commands, connector-state tracking, and error handling entirely in software. That is the overwhelming majority of what a CSMS actually does.
The minimum viable test session
A simulator does not need to be clever. It needs to reproduce a real charger’s message sequence. The canonical happy-path session looks like this:
- Open the WebSocket to the CSMS endpoint, negotiating the
ocpp1.6orocpp2.0.1subprotocol in the connection headers. - Send
BootNotificationwith a vendor and model. Wait forAcceptedplus a heartbeat interval. - Send
StatusNotificationto report the connector asAvailable. - Start heartbeating on the interval the backend returned, so the CSMS considers the charger online.
- Send
Authorizewith an RFID or token ID and confirm the backend accepts or rejects it. - Start a transaction with
StartTransactionin 1.6, orTransactionEventcarryingeventType: Startedin 2.0.1, including a start meter reading. - Send periodic
MeterValues(orTransactionEvent (Updated)) climbing in energy, so you can check the backend’s session accounting. - Stop the transaction with
StopTransactionorTransactionEvent (Ended), carrying the final meter reading. - Return the connector to
Available.
If your backend handles that sequence correctly, accepting the boot, tracking connector state, authorizing the token, opening a session, accumulating energy, closing the session, and producing a correct total, then you have validated the core of your integration without touching a charger. Rey runs exactly this flow against its built-in Demo CSMS, or against yours, so you can watch each request and response.
What you can test with no hardware
Once the basic session works, the same approach scales to the harder cases, which are the ones actually worth testing:
- Authorization edge cases. Send an unknown token, an expired token, a blocked token. Confirm the CSMS returns the right
idTagInfo/idTokenstatus and that the charger-side logic (which you are simulating) would refuse to start. - Remote start and stop. Have your simulator sit idle, then trigger a
RemoteStartTransaction(1.6) orRequestStartTransaction(2.0.1) from the backend and confirm your simulated charger responds correctly. This is exactly the app-initiated flow covered in OCPP remote start and stop, and it is much easier to iterate on in software than by tapping a phone against a real unit. - Meter-value fidelity. Send
MeterValueswith different measurands, includingEnergy.Active.Import.Register,Power.Active.Import,SoC, and temperature, then confirm each lands in the right place in your data model. - Connector-state machines. Walk through
Available → Preparing → Charging → SuspendedEV → Finishing → Availableand confirm dashboards and availability logic follow along. - Error and fault handling. Report a
StatusNotificationwith aFaultedstate and an error code. Many integration bugs live here, and they map directly to the failure modes in common OCPP errors explained. - Security profiles. Point the simulator at a
wss://endpoint with Basic auth headers (Profile 1/2) or a client certificate (Profile 3) and confirm your backend enforces what it should. The mechanics of each profile are laid out in OCPP security profiles. - Scale. Because a simulated charger is cheap, you can spin up hundreds of WebSocket connections at once to load-test your CSMS’s connection handling, heartbeat processing, and database write throughput.
A starter test plan
Here is a first suite to run against your CSMS with any charge point emulator. Each row is one scenario with a pass condition you can assert automatically. Message names are given for 1.6, with the 2.0.1 equivalent where it differs.
| # | Scenario | The emulator sends | Pass if the CSMS |
|---|---|---|---|
| 1 | Known station boots | BootNotification | Answers Accepted with interval above 0 and currentTime within a few seconds of UTC |
| 2 | Unknown station id | BootNotification from an unprovisioned id | Refuses the WebSocket upgrade, or answers Pending or Rejected; never Accepted |
| 3 | Valid token | Authorize | Returns status Accepted |
| 4 | Unknown token | Authorize with a token not in the CSMS | Returns Invalid (1.6) or Unknown (2.0.1) |
| 5 | Blocked or expired token | Authorize | Returns Blocked or Expired, not Invalid |
| 6 | Token already charging elsewhere | Start a second session with the same token | Returns ConcurrentTx, if your policy forbids it |
| 7 | Full session | Start at 120,450 Wh, stop at 133,800 Wh | Records exactly 13,350 Wh for the session |
| 8 | Late transaction messages | StopTransaction (or TransactionEvent Ended with offline true) timestamped an hour ago | Accepts it and uses the message timestamp, not the arrival time |
| 9 | Transaction message the CSMS dislikes | StopTransaction with an unknown transactionId | Still answers with a CALLRESULT. A CALLERROR here can make the charger resend it; on 1.6 TransactionMessageAttempts sets how often |
| 10 | Remote start | Answers RemoteStartTransaction (RequestStartTransaction) Accepted, then starts | Links the new session to the user or app that requested it |
| 11 | Remote stop | Answers RemoteStopTransaction Accepted, then stops with reason Remote | Closes the session as remote-stopped |
| 12 | Connector fault | StatusNotification Faulted with an errorCode | Marks the connector unavailable to drivers and raises an alert |
| 13 | Offline and back | Disconnect for ten minutes, reconnect, replay queued messages | Shows the station offline after missed heartbeats, then reconciles the replayed messages without duplicates |
| 14 | Smart charging | Accepts SetChargingProfile, answers GetCompositeSchedule | Sends the profile you expect, and the composite matches your prediction |
| 15 | Wrong password | Upgrade with a bad Basic auth password | Refuses with 401 before any OCPP message |
Rows 7 to 9 and 13 are the ones that cost money when they fail, because they decide what gets billed. Run the whole table on each OCPP version you support, and again after every CSMS release. When a scenario fails at the connection stage rather than in a message, OCPP WebSocket connection errors maps each HTTP status to its cause.
Building a repeatable workflow
Clicking buttons in a simulator is great for exploration. For real integration testing you want repeatability, so structure it like any other test suite.
Script the sequences. Capture your happy-path session and each edge case as a defined series of messages with expected responses. Whether you drive this from a browser tool, a small Node or Python client, or a test framework, the key is that “boot, authorize, start, meter, stop” becomes a named, re-runnable scenario rather than something you retype.
Assert on responses, not just sends. A message going out is not a test. The test is that BootNotification returns Accepted, that Authorize returns the expected status, that the final StopTransaction produces the correct total energy. Encode those expectations.
Pin the OCPP version per scenario. Because 1.6 and 2.0.1 use different transaction messages, keep separate scenarios per version rather than trying to branch inside one. Run both against your backend if you support both.
Seed known data. Authorization tests only mean something if you know which tokens are valid, blocked, and unknown in the backend. Set up that fixture data before the run so results are deterministic.
Watch the wire. OCPP’s array format is human-readable: [2, "id", "Action", {...}] for a Call and [3, "id", {...}] for a result. Keep the raw frames visible during development so that when something breaks you can see whether it was a malformed payload, a wrong message ID correlation, or a genuine backend bug. This habit alone catches a huge share of integration problems.

In Rey, the Workbench view keeps the frames on screen: click any message to see its JSON next to its reply and the time the CSMS took, then copy the frame into your test suite as a fixture. When a step fails, Rey gives the problem a stable code, such as REY-AUTH-002 when your CSMS answers an Authorize with Blocked, so you can note it in the test result or the ticket. The small ? next to it (the Explain button) says which side most likely caused it and what to check.
What simulation cannot catch
Being honest about the limits matters, because a green test suite that quietly skips the physical layer can lull you into a false sense of readiness.
A simulator cannot exercise actual power electronics: contactor switching, ground-fault detection, the IEC 61851 control-pilot handshake, or real energy metering accuracy. It cannot validate an RFID reader, a payment terminal, or a display. It cannot run true ISO 15118 Plug and Charge cable communication, which happens between the vehicle and the charger below the OCPP layer. And it will not reveal quirks specific to one manufacturer’s firmware: the off-spec status transitions, the vendor DataTransfer extensions, and the timing oddities that only appear on real units in the field.
The right mental model is that software simulation covers all of the protocol logic and backend behaviour quickly, cheaply, and repeatably. Real hardware, ideally a small set of units from different OEMs, is for the physical and vendor-specific last mile. Do the cheap ninety percent first, so that when you finally put a real charger on the bench you are debugging hardware, not rediscovering that your session accounting was wrong all along.
Start here
The fastest way to internalise all of this is to watch the messages flow. Open Rey, run a session against the built-in Demo CSMS and watch it play out: boot, authorize, start, meter, stop. Then choose My CSMS and run the same session against your own backend. Once you have seen the round-trip and understood the array wire format, scripting your own repeatable scenarios is straightforward, and you can build a genuinely useful CSMS integration test suite before a single charger arrives at your door.
Or let Rey’s Test suite run the checks for you: 74 to 86 tests, depending on the OCPP version, each with its own result. CSMS test cases for OCPP 1.6, 2.0.1 and 2.1 lists every one, so you can also use it as a checklist with any other tool.