SMOODEV-2090: th testing runs report — CTRF/JUnit reporting in the single CLI#106
Merged
Conversation
|
Collapse the @smooai/testing reporting story into the single Smoo CLI: `th testing` is now a top-level command (alongside `th config`), and gains a high-level `runs report <file>` that creates a run, submits results, and marks the run errored on a submit failure — mirroring `@smooai/testing runs report`. - Reads `<file>` as CTRF JSON, or converts a JUnit report to CTRF first with `--junit` (or a `.xml` extension) — so cargo-nextest output works directly and CI needs no separate junit-to-ctrf step. - Defaults: `--name` → file base name, `--tool` → the CTRF report's own tool name, `--build-name`/`--build-url` → the GitHub Actions env. Supports `--tags`, `--environment`, `--deployment-id`, and `--additional-org-ids` (multi-org push). Auth/active-org via the existing `th` machinery. - Promotes the existing `th api testing` surface to top-level `th testing`. - Adds quick-xml for the JUnit→CTRF conversion; unit tests cover the conversion (status/summary/details, single-suite root) and the CSV/name helpers. - Docs: Using-th-CLI.md gains a Testing section documenting `runs report`. This is what the smooai monorepo CI will call instead of `npx @smooai/testing` + `junit-to-ctrf`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EP2CTJr4JMPvxYMADYsZC2
`cargo fmt --check` is red on origin/main: the pearl_comments.seq heal test added in 12ef522 left a method chain unwrapped past rustfmt's chain_width. Apply the formatter so this branch's CI fmt gate passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EP2CTJr4JMPvxYMADYsZC2
3f2544c to
37d62ca
Compare
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.
Why
@smooai/testingreporting belongs in the single Smoo CLI, not a standalone tool or a polyglot SDK fleet.th testingalready existed (low-level CRUD underth api testing); this adds the one thing CI actually needs — a high-levelruns report— and promotes the surface to a top-levelth testingalongsideth config.This collapses the whole "report test results" story into
th, which already has its own auth. It's what the smooai monorepo CI will call instead ofnpx @smooai/testing+junit-to-ctrf.What
th testingis now top-level (mirrorsth config;th api testingstill works).th testing runs report <file>— creates a run, submits results, and marks the runerroredon a submit failure (mirrors@smooai/testing runs report'sreport()).<file>as CTRF JSON, or converts a JUnit report to CTRF first with--junit(or a.xmlextension) — socargo-nextestoutput works directly, no separatejunit-to-ctrfstep.--name→ file base name,--tool→ the CTRF report's own tool name,--build-name/--build-url→ the GitHub Actions env ($GITHUB_SHA, the Actions run URL).--environment,--tags(CSV),--deployment-id,--additional-org-ids(multi-org push). Auth + active-org via the existingthmachinery.quick-xmlfor the JUnit→CTRF conversion.Using-th-CLI.mdgains a Testing section.Verify
clippy: zero findings in
smooai/testing.rs(the repo's pre-existing clippy debt is in other crates).Jira: SMOODEV-2090
🤖 Generated with Claude Code