Skip to content

feat(tck): add host command testing with the generic application - #71

Merged
dpazj merged 2 commits into
masterfrom
feat/tck-host-commands
Nov 4, 2026
Merged

dpazj merged 2 commits into
masterfrom
feat/tck-host-commands

Conversation

@dpazj

@dpazj dpazj commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a tck-host example built on the generic application's AppClient. It subscribes to SPARKPLUG_TCK/CONSOLE_PROMPT and publishes the NCMD/DCMD messages requested by host:SendCommandTest.
  • Add PublishMetric::with_datatype as an explicit opt-in for command metrics that need a datatype. publish_node_rebirth keeps omitting the datatype, as recommended by the specification.
  • Export the runner's test parameters to --node-cmd processes as SRAD_HOST_APP_ID, SRAD_GROUP_ID, SRAD_NODE_ID, SRAD_DEVICE_ID, SRAD_CLIENT_ID, SRAD_BROKER_HOST and SRAD_BROKER_PORT, so examples follow the configured IDs and broker.

TCK result

host:SendCommandTest reports PASS but INCOMPLETE (36 passed, 1 not executed). The not-executed assertion is operational-behavior-data-commands-ncmd-rebirth-value: the example uses the spec-correct publish_node_rebirth for the edge rebirth, which omits the metric datatype, while the TCK only sets that assertion for a Boolean datatype. This is documented in tck/CONFORMANCE.md, along with the explicit with_datatype workaround.

The full host suite passes:

Test Result
SessionEstablishmentTest PASS but INCOMPLETE
SessionTerminationTest PASS but INCOMPLETE
SendCommandTest PASS but INCOMPLETE
EdgeSessionTerminationTest PASS
MessageOrderingTest PASS
MultipleBrokerTest PASS but INCOMPLETE

Verification

  • cargo test --workspace
  • cargo clippy for the touched crates
  • tck-runner --suite host ... --node-cmd ./target/debug/examples/tck-host
  • host:SendCommandTest with non-default host/group/node/device/client IDs to verify the environment-based configuration

dpazj added 2 commits November 4, 2026 18:52
Add a tck-host example built on the generic application's AppClient. It subscribes to the TCK console prompts and publishes the requested NCMD and DCMD messages. The edge rebirth uses publish_node_rebirth, which omits the metric datatype as recommended by the specification, so the TCK's ncmd-rebirth-value assertion is documented as not executed.\n\nAdd PublishMetric::with_datatype as an explicit opt-in for command metrics that need a datatype. Export the runner's test parameters to node processes via SRAD_* environment variables so examples follow the configured host, group, node, device and broker.
@dpazj
dpazj merged commit 6f64ef6 into master Nov 4, 2026
7 checks passed
@dpazj
dpazj deleted the feat/tck-host-commands branch November 4, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant