EtherCAT integration tests¶
EtherCAT tests come in two flavours: software tests (unit + raw-frame
mock) parallel-safe on any host, and hardware-in-the-loop tests marked
[bench] that require an EK1100 + EL-series fixture on the CI test
bench. The mock implementation lives in
taktora-connector-ethercat/tests/mock/ and replays canned EtherCAT
frame responses so bring-up, PDO mapping, and WKC scenarios can be
exercised without hardware. Bench tests run only when invoked as
cargo test --features ethercat-bench.
Compile-time test confirming that
|
Unit test constructing |
Construct an |
Mock-frame test: start an |
Unit test that |
Mock-frame test observing the SDO write sequence during bring-up:
the gateway emits writes to |
Unit test that |
Mock-frame test: stall the gateway’s tokio sidecar for 5 cycles
by holding a mutex on the bridge. After release, exactly one
tx_rx cycle runs (not five) — the skipped ticks are dropped, not
queued for catch-up. The asserted behaviour matches
|
Two mock-frame scenarios. (1) Default options: the gateway
completes bring-up without emitting any BWR to |
Mock-frame test: drive the gateway to OP with the mock reporting
the expected WKC on every cycle for 10 consecutive cycles;
|
Mock-frame test: configure a degradation threshold of N=3 cycles;
inject N consecutive cycles with WKC below the expected value;
the gateway transitions to |
Structural test using |
Unit test that |
Mock-frame test: configure a tiny outbound-bridge capacity. Stall
the tokio sidecar from draining. The plugin’s |
Mock-frame test: configure a tiny inbound-bridge capacity. Block
the inbound gateway item from draining. Drive a flood of inbound
process-image updates through the mock; the gateway emits one or
more |
Hardware-bench test |
Pure-logic test of the |
Property test for the same round-trip as PDI bit-slice byte-aligned ... (TEST_0216) but
covering |
Construct two |
When the application registers N channel descriptors in order
|
With a |
With a |
Compose Outbound end-to-end (plugin... (TEST_0220) and Inbound end-to-end (PDI sli... (TEST_0221) via a |
Table-driven unit test in
|
Mock-driven unit test asserting |
Integration test in
|
Integration test asserting the exact emitted |
Manual hardware test against EK1100 + EL1008 + EL2004. Operator
runs |
Unit tests in
|
Integration test in
|
Unit tests in
|
Manual hardware drill against the WAGO 750-354 + 750-602 + 750-430
+ 750-530 rig, executed 2026-06-07 via
|
Per-connector integration tests in
|
Unit tests in |