Short answer: Test an OCPP 1.6J charger in stages before it goes to site: check its connection settings, then boot and registration, reconnects, transactions and meter values, offline behaviour, security and firmware updates. Run the same tests again on the exact firmware build you will ship. A hosted test lab lets you do all of this without building your own central system.
A charger that works on the bench can still fail on its first day at a customer site: the network drops, the central system answers slowly, or a new back office sends a command the firmware has never seen. Each of these becomes a site visit and an unhappy charge point operator (CPO). Almost all of them can be found before the charger leaves the factory, if you test the right things in the right order.
This is a practical test plan for charger makers, firmware teams and CPOs onboarding a new model, for OCPP 1.6J (JSON over WebSocket).
The test plan at a glance
| Stage | What you check | Typical failure |
|---|---|---|
| 1. Connection settings | Central system URL, chargeBoxId, password or TLS | Wrong or mistyped chargeBoxId, so the server refuses the connection |
| 2. Boot and registration | BootNotification, Pending and Rejected handling, heartbeat, clock | Charger sends status messages before it is accepted |
| 3. Connectivity | Reconnect after a closed or silently dropped socket | Charger never notices a half-open connection |
| 4. Transactions and metering | Remote start and stop, idTag, MeterValues, meterStop | Energy register resets after a reboot |
| 5. Offline behaviour | Queued Start, MeterValues and Stop after an outage | Transactions lost or sent in the wrong order |
| 6. Security, firmware, configuration | Security profiles 1 and 2, firmware update states, configuration keys | Firmware update never reports a final status |
| 7. Regression | The full suite on every new firmware build | A fix in one area breaks another |
1. Get the connection settings right
Most “the charger will not connect” problems are configuration, not code. Check three things first:
- Central system URL. For OCPP 1.6J this is a WebSocket address (
ws://orwss://) that ends with the charger’s identity, for examplewss://example-csms/ocpp/CP-001. - Charge point identity. The chargeBoxId in the URL must match exactly what the central system has registered, and it is usually case-sensitive.
- Protocol and security. The charger must offer the
ocpp1.6WebSocket subprotocol. If the operator uses security profile 1, the password on both sides must match; with profile 2, the charger must trust the server certificate.
2. Boot and registration
The first message a charger sends is BootNotification, and the central system answers Accepted, Pending or Rejected. Many chargers only handle Accepted. Test that your charger:
- retries BootNotification at the interval the server gives when the answer is Pending or Rejected;
- does not send StatusNotification or start transactions before it has been accepted;
- uses the heartbeat interval from the boot answer, not a value hard-coded in firmware;
- sets its clock from the server’s currentTime;
- reports the status of connector 0 (the charger as a whole) as well as every physical connector.
3. Connectivity and reconnects
A clean close frame from the server is the easy case. The hard case is a silent drop, where the network stops passing traffic and the charger’s socket still looks open. Test both, and check that the charger waits a sensible time between reconnect attempts; a tight reconnect loop can overload a back office when a whole site comes back at once.
4. Transactions and meter values
Billing depends on this stage, so give it the most time. Check that a remote start keeps the idTag the server sent, that the charger uses the server’s transactionId on stop, and that MeterValues carry the configured measurands. The energy register must never go backwards, even across a reboot or power loss, and meterStop must fit the energy delivered. DC chargers should also report state of charge.
5. Offline behaviour
Every charger will lose its connection at some point. A well-behaved charger queues StartTransaction, MeterValues and StopTransaction and sends them in that order once it reconnects. It respects the retry settings (TransactionMessageAttempts and TransactionMessageRetryInterval), keeps only one request in flight at a time, and does not replay old StatusNotification or Heartbeat messages as if they were new. If you allow offline charging for local or unknown cards, test those settings too.
6. Security, firmware and configuration
Test HTTP Basic authentication for security profile 1 and TLS for profile 2, including what the charger does with an untrusted, expired or wrong-host certificate (it should refuse to connect). For firmware, run a full UpdateFirmware cycle and check that the charger reports each FirmwareStatusNotification state, including download and installation failures. Finally, change a few keys with ChangeConfiguration and confirm they survive a reboot.
7. Repeat on every firmware build
A test run is only valid for the firmware it ran on. Freeze the build you plan to ship, make sure its version appears in BootNotification, and run the full suite on it, first against a simulator to check your setup, then on the real charger. Repeat for every release and compare with the previous run, so a fix in one area does not quietly break another.
Running this plan with ChargeBench
ChargeBench by Tecell is a hosted OCPP 1.6J test lab that plays the central system for you. You register the charger, point it at wss://ocpp-ws.tecell.in/<chargeBoxId> and start a run from your browser. The charger suite has more than 200 automated test cases across areas such as boot, connectivity, transactions, offline behaviour, meter values, smart charging, firmware and security profiles 1 and 2. Every failure comes with a likely root cause and a fix hint for the firmware team, and each run produces an HTML report plus machine-readable results that you can file next to your release notes.
The Free plan covers one charger and five test runs a month on the core tests, so you can try it on your next build. Larger plans are on the ChargeBench pricing page. ChargeBench is an independent compatibility test: a pass shows how your charger behaved in these tests, not how every central system will treat it.
For the problems that show up most often when a charger is connected to a new back office, see our companion guide, What breaks when a charger meets a new CMS: 10 common OCPP 1.6J issues.
Frequently asked questions
How long does it take to test an OCPP 1.6J charger?
It depends on the number of tests and the steps that need a person, such as plugging in a cable. Plan at least one fix-and-retest cycle per firmware release.
Which security profiles should I test?
Test the ones your customers use. In OCPP 1.6J that is usually profile 1 (Basic authentication over the WebSocket) and profile 2 (TLS with a server certificate). Include the negative cases, such as an expired certificate.
Do I need to retest after a small firmware change?
Yes. Small changes often affect timing, reconnects or the offline queue, and a re-run is cheaper than a site visit.
Does a passing test run mean the charger works with every CMS?
No test can promise that, but it removes most surprises when the charger meets a new back office.
