Scenarios

Scenarios are predefined trace fixtures that test the analysis engine. Each scenario has a trace and a list of expected failures.

Built-in Scenarios

DebugKit v0.1 includes 5 scenarios:

normal-session

A complete charging session: boot, authorize, start transaction, meter values, stop transaction. No failures expected.

  • expectedFailures: []

failed-auth

Failed authorization: the idTag is rejected by the CSMS. StartTransaction is not attempted. The connector transitions to Faulted.

  • expectedFailures: ["FAILED_AUTHORIZATION"]

connector-fault

Connector fault during an active session: the connector reports a Faulted status mid-charging, and the transaction stops with a fault reason.

  • expectedFailures: ["CONNECTOR_FAULT"]

station-offline

Station goes offline during an active session: a StartTransaction is sent but no StopTransaction follows.

  • expectedFailures: ["STATION_OFFLINE_DURING_SESSION"]

unexpected-stop-reason

A stop transaction with an unexpected stop reason. This is a parser/timeline-only fixture — no v0.1 detection rule matches it.

  • expectedFailures: []

Failure Detection Rules

Three detection rules are available in v0.1:

  • FAILED_AUTHORIZATION — Authorize response withidTagInfo.status = "Invalid"
  • CONNECTOR_FAULT — StatusNotification withstatus = "Faulted" during an active session
  • STATION_OFFLINE_DURING_SESSION — Session has StartTransaction but no StopTransaction, or connector transitions to Unavailable/Offline during an active transaction

Running Scenarios

# List all scenarios
ocpp-debugkit scenario list

# Run a specific scenario
ocpp-debugkit scenario run connector-fault

The CLI reports detected vs expected failures and shows a pass/fail result.

Synthetic Data

All scenario data is fully synthetic. No real station identifiers, transaction IDs, idTag values, or personal data are used.