Repository navigation
test(cda): exercise simulated ECU through gateway - #97
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
|
Documentation preview for this pull request is available at: |
There was a problem hiding this comment.
🟡 Changes recommended
The manual simulator run bypasses requirement-aware JUnit reporting, so its results are not captured as verification evidence in the documentation’s test-report artifacts.
1 open issue
What changed in this PR
Adds simulator-backed Linux CI coverage for the gateway-to-CDA diagnostic flow, advancing the reference tester work in #66 beyond the earlier bus-free checks.
Changes:
- Tests live identification, fault details and clearing, routine execution and stopping, and ECU reset through the gateway.
- Provisions an isolated simulator fixture and verifies diagnostic frames, final state, and cleanup behavior.
- Integrates the fixture into Linux CI and documents its prerequisites and reproducibility limits.
The prescribed Bazel tests and pre-commit hooks were not run in this review environment.
| File | Description |
|---|---|
score/opensovd-cda/tests/integration.rs |
Adds simulator-backed diagnostic checks through the gateway. |
score/opensovd-cda/tests/ecu_sim_ci.sh |
Manages the simulator, runs checks, and cleans up resources. |
score/opensovd-cda/tests/ecu_sim_ci_test.py |
Tests fixture cleanup, failure handling, and container restrictions. |
score/opensovd-cda/BUILD |
Registers the Python fixture lifecycle tests. |
README.md |
Documents simulator coverage, prerequisites, and limitations. |
.github/workflows/build_linux.yml |
Runs the simulator fixture in Linux CI. |
Review effort: Balanced
bf7ac11 to
a951e35
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The privileged Docker/DoIP flow remains untested on Linux and cannot be exercised here, requiring human review of its first Linux CI run for bridge discovery, diagnostic exchanges, simulator state, and failure cleanup.
1 open issue
Review effort: Balanced
2b5848d to
f1010b7
Compare
f1010b7 to
bf422db
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The Stop requirements incorrectly mandate a stopped response body for every routine, excluding the supported HTTP 204 response when a successful Stop returns no output data.
2 open issues
1 resolved since last review
Review effort: Balanced
Add simulator_reads_through_gateway, which drives the CDA's ECU simulator through the gateway and the CDA: live VIN, seeded fault with snapshot and extended data, clearing with and without a lock, the TimeCircuits routine lifecycle, and a hard reset back to the default session. The test is behind the ecu_simulator feature and only built by the manual simulator_test_binary target, so the regular tests stay bus-free. The test seeds the fault through the simulator's control API and finally checks the requests the simulator recorded and its final state, so a run that never reached the ECU cannot pass. The On PR workflow runs it with ecu_sim_ci.sh, which starts the ecu-sim service of the pinned CDA's testcontainer/docker-compose.yml and runs the simulator_test JUnit target. Every failure is in that report, which reaches the documentation's test-reports. The test verifies the gateway's single entry point and forwarding, and five new CDA requirements for faults, asynchronous operations, ECU locks, lock enforcement and the UDS service mapping. Like the existing HTTP port requirement, which is rewritten the same way, each states the behavior the integration relies on and refines an upstream CDA requirement. Both CDA test configurations are now written by one write_config helper from a plain multi-line TOML template. Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
bf422db to
b47dce0
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The merge-blocking flow depends on unverified privileged Docker networking and host-to-simulator DoIP discovery, requiring confirmation from a successful Linux CI run and its requirement-linked JUnit report.
No open issues 🎉
2 resolved since last review
Review effort: Balanced


Summary
Add the simulator-backed reference tester flow to diagnostics Linux CI.
testcontainer/docker-compose.ymland run the actual gateway and CDA against it.On PRtest job withscore/opensovd-cda/tests/ecu_sim_ci.sh, through the//score/opensovd-cda:simulator_testJUnit target, so its report reaches the documentation'stest-reports. Like upstream, the simulator runs privileged on the fixed network172.42.0.0/16, so the script is meant for throwaway CI runners.Checklist
Related
Part of #66 (S3); follows #79 and #86. The issue also tracks the reference integration deployment, so this PR does not close it.
Notes for Reviewers
curlhelper sends POST and DELETE requests because the pinned client has no generic methods for them.testjob ofOn PR, which the docs build and the "On PR mergeable" check depend on. A failing simulator run therefore blocks both. ShellCheck and actionlint pass on the changed files.simulator_test_binarytarget enables theecu_simulatorfeature.Alexander Mohr alexander.m.mohr@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH
Provider Information