Backend, Plug and Charge and payment test cases
Fourteen illustrative test cases between charger and backend: boot, authorization accepted and rejected, remote start, transactions, meter values and signed meter values, offline behaviour, firmware update, charging profiles, certificate installation for Plug and Charge, expired certificates and payment, citing OCPP use cases by name.
About these test cases
Most of these test cases run in the analyzer: name each capture after its test case and the Batch page or the command line says pass, fail or inconclusive per file. See Running test cases.
These test cases are this tool's own illustrative plan, written from the public descriptions of the standards. They are not copies of any standard's test suite, and passing them does not make a product conformant or certified. For certification, use the official test suite and an accredited or authorised lab.
OCPP names its behaviour as use cases grouped in functional blocks (Provisioning, Authorization, Transactions, Remote Control, Meter Values, Smart Charging, Firmware Management, ISO 15118 Certificate Management and others). The cases below cite those use cases by name. For certification, the Open Charge Alliance tests with OCTT at authorised labs, against the certification profiles a product claims: Core is mandatory for OCPP 2.0.1, and Advanced Security, Smart Charging, ISO 15118 Support and Local Authorization List Management are options.
Common setup: the charging station under test, a CSMS or CSMS simulator whose log is kept, a car or EV simulator, and a way to cut the network. For the Plug and Charge cases, a test PKI with valid, expired and revoked certificates.
Start up and authorization
| Id and purpose | Preconditions | Test body | Expected result and pass criteria | OCPP use case | Observed by |
|---|---|---|---|---|---|
| BE-01 Boot | Station powered off; CSMS answers Accepted, then Pending, then Rejected in three runs. | Power on. | Accepted: the station reports connector status and starts its heartbeat. Pending and Rejected: no charging is offered, and the station sends BootNotification again after the interval the CSMS gave. | Cold Boot Charging Station; the Pending and Rejected variants | OC-06, OC-01; OCPP tab: messages and statuses |
| BE-02 Authorization accepted | Card known to the CSMS. ISO 15118 car with EIM. | Plug in; present the card while the car polls Authorization. | Authorize answered Accepted; the charger turns Authorization from Ongoing to Finished; the loop stays below the ongoing timeout. | EV Driver Authorization using RFID; Authorization at EVSE using ISO 15118 External Identification Means | TIM-02, SQ-05; OCPP tab |
| BE-03 Authorization rejected | Card unknown or blocked. | As BE-02. | Authorize answered Invalid or Blocked; the charger ends the V2G session instead of holding the car at Ongoing; no energy. | EV Driver Authorization using RFID | TIM-02, XL-04; OCPP tab. Demo ocpp-rejected |
| BE-04 Remote start | App or CSMS operator starts; once with the cable plugged first, once with the remote start first. | Send the remote start; plug in where needed. | Transaction starts on the right EVSE; status Charging and the transaction start follow the start of energy transfer. | Remote Start Transaction, Cable Plugin First; Remote Start Transaction, Remote Start First | OCPP tab: alignment with PowerDeliveryRes |
Transactions and metering
| Id and purpose | Preconditions | Test body | Expected result and pass criteria | OCPP use case | Observed by |
|---|---|---|---|---|---|
| BE-05 Transaction events | BE-02 passed. | Charge 10 minutes, stop from the car, unplug. | Started, Updated and Ended events (StartTransaction and StopTransaction in 1.6) with the right trigger and stop reason; energy in the transaction equals the meter difference; the stop follows the end of the V2G session. | Start Transaction, Cable Plugin First; Stop Transaction options; End of charging process | OC-07 (2.0.1) or OC-08 (1.6), OC-02, PW-06, XL-01, XL-02, XL-05; CDR-01 to CDR-03 with the OCPI CDR; OCPP tab: transactions and alignment; PW-04 |
| BE-06 Meter values and signed meter values | Periodic meter values configured; station with a signing meter where claimed. | Charge 30 minutes. | Meter values at the configured interval; readings never go backwards; signed values verify against the meter public key and match the unsigned values. With ISO 15118-2, the car signs a metering receipt when the charger asks for one. | Sending transaction related Meter Values | PW-04, PW-06, SQ-10, OC-01, XL-03, SM-01 to SM-03; OCPP tab: signed meter values |
| BE-07 Offline while idle | Local authorization list or cache filled; network cut. | Present a known card, then an unknown card. | Known card: charging starts as configured. Unknown card: handled as the offline setting says. After reconnecting, the station reports what happened. | Offline Behavior Idle Charging Station; Offline Authorization through Local Authorization List; Offline Authorization of unknown Id | OCPP tab after reconnect |
| BE-08 Loss of internet during a transaction | BE-05 running. | Cut the network for 10 minutes, then restore it. | Charging continues on the cable side; queued transaction messages arrive after reconnect in order with their original timestamps. | Connection Loss During Transaction; Transaction stopped while Charging Station is offline | OCPP tab; the V2G session keeps running in the capture |
How signed meter values are formatted and verified depends on the meter and the legal metrology scheme (for example the Eichrecht in Germany or NIST Handbook 44 in the US). Take the verification rule from the meter maker and Billing and measurement testing.
Management and smart charging
| Id and purpose | Preconditions | Test body | Expected result and pass criteria | OCPP use case | Observed by |
|---|---|---|---|---|---|
| BE-09 Firmware update | A signed firmware image, and one with a broken signature. | CSMS requests the update with each. | Valid image: status notifications through download, verification and installation, then a boot. Broken signature: the station refuses to install and reports why. | Secure Firmware Update | OCPP tab |
| BE-10 Charging profile | Charging session running (AC or DC). | CSMS sets a charging profile that lowers the limit, then clears it. | The composite schedule reflects the profile; the cable side follows it (PWM, EVSEMaxCurrent or an ISO 15118 schedule); PowerDelivery uses a schedule tuple the charger sent. | SetChargingProfile; Get Composite Schedule; Clear Charging Profile; Charging with load leveling based on High Level Communication | PW-01, SQ-08 |
Plug and Charge and payment
| Id and purpose | Preconditions | Test body | Expected result and pass criteria | OCPP use case | Observed by |
|---|---|---|---|---|---|
| BE-11 Contract certificate installation | Car without a contract certificate; test PKI reachable from the CSMS. | Car sends CertificateInstallationReq. | The charger forwards the request, returns the answer within the longer message timeout, and the car can use the contract in the next session. | Certificate installation EV | TIM-01, SQ-05 |
| BE-12 Plug and Charge authorization | Valid contract certificate in the car. | Plug in. | Contract chain validated; authorization finishes; transaction references the contract. | Authorization using Contract Certificates | SQ-05, TIM-02; OCPP tab |
| BE-13 Expired certificates | Run 1: expired contract certificate. Run 2: expired charger (SECC) certificate. | Plug in. | Run 1: the charger refuses the contract (ISO 15118-2 FAILED_CertificateExpired) and no energy flows. Run 2: the car aborts TLS with certificate_expired and no session starts. | Authorization using Contract Certificates; Get V2G Charging Station Certificate status | SQ-05; PK-01, TL-01. Demo pnc-expired |
| BE-14 Payment at the charger | Payment terminal or card reader on the station. | Pay by card, charge, stop; then cancel before start. | Transaction authorised by the card; final cost shown; a cancelled start leaves no charge on the card. | Authorization using credit/debit card; in OCPP 2.1 also the local payment terminal and settlement use cases | OCPP tab |
Payment terminals need approvals from the payment industry as well: charger makers such as Kempower and ChargePoint describe their terminals as EMV certified and PCI compliant. The test procedures of these schemes were not researched for this article. See Payment, roaming and Plug and Charge.
In this tool
Load the OCPP-J log of the charger with the capture. The OCPP tab shows the connector status, the transactions with their metered energy, the backend errors and slowest answer, and the backend view against the cable: status Charging and the transaction start after PowerDeliveryRes, the stop after SessionStopReq. The OC checks hold every message against the OCA JSON schema of its version (OCPP 1.6, 2.0.1 or 2.1, told from the messages) and the framing against OCPP-J: every call answered in time, one call at a time, defined error codes, unique message ids, the boot accepted first, and the transaction events in order. The XL checks hold the view of the backend against the cable: charging reported when the energy transfer starts and stops, the energy billed against the meter readings sent to the car, no energy after a rejected ID, and a stop reason that matches how the session ended. OCPP never changes the verdict, so the cable side is judged the same with or without the log. The TLS tab draws the certificate chain for BE-13. The demos ac-ok and ocpp-rejected carry an OCPP log.
Sources
- EVerest libocpp: OCPP 2.0.1 and 2.1 status by functional block and use case, the use case names of the OCPP 2.0.1 and 2.1 specification, part 2, listed per functional block
- Open Charge Alliance: OCPP 2.0.1 certification, Core profile mandatory; Advanced Security, Smart Charging, ISO 15118 Support and Local Authorization List Management optional; labs DEKRA, DNV, KSGA
- Open Charge Alliance: certification program, conformance tests with OCTT run by independent test laboratories the OCA authorises
- Open Charge Alliance: OCPP Compliance Test Tool (OCTT), cloud tool since October 2022 for charging stations, CSMS and charging station software stacks, OCPP 1.6 and 2.0.1
- ChargeX EV-EVSE Interoperability Test Plan (EEITP), version 2.0, July 2025, Argonne, Idaho and NREL researchers of the ChargeX testing task force; test tree with baseline, safety and advanced tests
- NIST Handbook 44, section 3.40 Electric Vehicle Fueling Systems (2026 edition), applies where energy is sold by measurement; NTEP type evaluation only after NRTL safety certification; permanent code from 1 January 2023
- XCHARGE press release on a Module B type-examination certificate for a DC charger, Module B as the first step of conformity with the German calibration law (Eichrecht), issued by PTB
- This tool: default limit profile, src/core/limits/iec61851-iso15118-2-default.json, values and their verify flags
- Kempower: payment terminals for EV chargers
- ChargePoint: first terminal to meet new EV charging payment standards, June 2024