Skip to content

SMOODEV-2090: th testing runs report — CTRF/JUnit reporting in the single CLI#106

Merged
brentrager merged 2 commits into
mainfrom
SMOODEV-2090-th-testing-report
Jun 24, 2026
Merged

SMOODEV-2090: th testing runs report — CTRF/JUnit reporting in the single CLI#106
brentrager merged 2 commits into
mainfrom
SMOODEV-2090-th-testing-report

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Why

@smooai/testing reporting belongs in the single Smoo CLI, not a standalone tool or a polyglot SDK fleet. th testing already existed (low-level CRUD under th api testing); this adds the one thing CI actually needs — a high-level runs report — and promotes the surface to a top-level th testing alongside th 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 of npx @smooai/testing + junit-to-ctrf.

What

  • th testing is now top-level (mirrors th config; th api testing still works).
  • th testing runs report <file> — creates a run, submits results, and marks the run errored on a submit failure (mirrors @smooai/testing runs report's 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, 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 ($GITHUB_SHA, the Actions run URL).
    • Flags: --environment, --tags (CSV), --deployment-id, --additional-org-ids (multi-org push). Auth + active-org via the existing th machinery.
  • Adds quick-xml for the JUnit→CTRF conversion.
  • Unit tests: JUnit→CTRF (status/summary/details, single-suite root), CSV + name helpers.
  • Docs: Using-th-CLI.md gains a Testing section.

Verify

cargo build -p smooai-smooth-cli      # clean (3 pre-existing dead-code warnings, untouched files)
cargo test  -p smooai-smooth-cli smooai::testing   # 4 passed
cargo fmt -p smooai-smooth-cli -- --check          # clean
th testing runs report --help                      # top-level, with --junit

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

@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 37d62ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

brentrager and others added 2 commits June 23, 2026 23:20
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
@brentrager brentrager force-pushed the SMOODEV-2090-th-testing-report branch from 3f2544c to 37d62ca Compare June 24, 2026 03:21
@brentrager brentrager merged commit 47044b4 into main Jun 24, 2026
2 checks passed
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