-
Notifications
You must be signed in to change notification settings - Fork 26
Description
We’ve been working to integrate cdevents.test.suite.finished.v1 into our CI/CD observability pipelines and wanted to raise an issue around semantic modeling that limits our ability to fully describe the intent and scope of the event.
Problem
According to the current spec, the subject field of a test.suite.* event is expected to represent the test suite itself (which makes sense). However, there is no first-class way to represent what the test suite was executed against—i.e., the system under test. In most CI systems, this is a specific commit in a code repository.
At present, this information appears to have no standard location in the event schema (please correct me if I'm mistaken!) and is relegated to customData (which makes it non-portable and hidden from tooling that only interprets the base spec).
Moreover, the testSuite.name field lacks semantic rigor—it does not capture what kind of tests were run (e.g., "unit", "integration", "system"). There is no recommended vocabulary, structure, or field for test category.
Proposal
We see two possible improvements:
-
Introduce the concept of an
object(ortarget) to the event schema.-
The
subjectis the actor of the event: the test suite. -
The
objectis the system being tested: e.g., a Git commit. -
This would align with subject-verb-object grammar and make the semantics clearer and more powerful.
-
Example:
"subject": { "id": "unit-tests-123", "type": "testSuite", "source": "https://github.com/org/repo" }, "object": { "id": "abc123def456", "type": "commit", "source": "https://github.com/org/repo" }
-
-
Standardize
testSuitemetadata more rigorously- Consider adding a required
typeorcategoryfield to distinguish between different classes of tests (unit,integration,system,security, etc.). - Possibly move toward a vocabulary or schema that aligns with existing test reporting formats like JUnit or TAP.
- Consider adding a required
Why This Matters
Without a standard way to link a test run to the code it tested, downstream consumers of the event (e.g., dashboards, analysis tools) cannot easily compute lead time, test reliability, or attest Git commits with results. All of this limits the power of the CDEvents ecosystem to support DevOps and platform engineering use cases.
We're happy to contribute to the spec if this sounds aligned with its goals. Thank you for your work!