feat(testing): add canonical run artifact for DSL test execution#1556
Open
AdityaShome wants to merge 13 commits intomofa-org:mainfrom
Open
feat(testing): add canonical run artifact for DSL test execution#1556AdityaShome wants to merge 13 commits intomofa-org:mainfrom
AdityaShome wants to merge 13 commits intomofa-org:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is rebased on #1555 and #1447 and adds a canonical run artifact for
mofa test-dslexecution and exposes it as optional JSON output via--artifact-out.The goal is to move the DSL path onto a stable execution artifact instead of relying only on ad hoc runner fields and formatter-specific report generation. This keeps the DSL thin while establishing the output contract needed for later baseline comparison, replay-oriented workflows, and CI artifact upload.
Context
The current DSL and CLI path can execute test cases and emit reports, but it does not yet have one stable, serializable run artifact that represents a case execution end to end.
in /tmp/dsl-artifact.json saved file:


This PR closes that gap by:
AgentRunResultmofa test-dslto write the artifact as JSONWhat Changed
AgentRunArtifactin the root-leveltests/crate--artifact-outtomofa test-dslExecution Flow
Files Changed
Core Files
tests/src/artifact.rsAgentRunArtifacttype and nested serializable artifact models.TestCaseDsl+AgentRunResultinto a stable artifact.tests/src/dsl.rsexecute_test_case.collect_assertion_outcomes.assertion_error_from_outcomes.tests/src/lib.rstests/crate.crates/mofa-cli/src/cli.rsExecution Flow
--artifact-outformofa test-dsl.crates/mofa-cli/src/commands/test_dsl.rs--artifact-outis provided.crates/mofa-cli/src/main.rs--artifact-outthrough CLI dispatch.tests/tests/artifact_tests.rsSupporting Files
crates/mofa-cli/tests/test_dsl_integration_tests.rs: Added CLI integration coverage for--artifact-out.Execution Flow
Canonical Artifact Scope
The initial artifact captures:
CLI Usage
Examples:
Example Output
saved in /tmp/dsl-artifact.json saved file.
Tests
cargo test -p mofa-testing --test artifact_testscargo test -p mofa-testing --test dsl_testscargo test -p mofa-cli --test test_dsl_integration_testscargo test -p mofa-cli test_test_dsl_Notes
This PR does not introduce replay or baseline comparison yet. It establishes the canonical artifact foundation those later steps can build on.