Skip to content

cli: status, list and artifacts commands for async Maestro runs (TB-372) - #32

Merged
jochen-testingbot merged 2 commits into
mainfrom
feat/TB-372-status-list-artifacts
Sep 2, 2026
Merged

cli: status, list and artifacts commands for async Maestro runs (TB-372)#32
jochen-testingbot merged 2 commits into
mainfrom
feat/TB-372-status-list-artifacts

Conversation

@jochen-testingbot

@jochen-testingbot jochen-testingbot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Stacked on #31 (TB-371). Base is feat/TB-371-json-output-exit-codes; retarget to main once #31 merges.

Summary

--async previously left no way to come back for results from the CLI. This adds three commands, all sharing credential resolution and the --json / --json-file output from #31:

  • testingbot status --id <projectId> [--wait] – snapshot of every run and flow with last-attempt-wins verdicts. --wait reuses the foreground poll loop and live flow table. Exit 0 while still running (JSON outcome: "running"), 2 when failed, 1 on errors.
  • testingbot artifacts --id <projectId> – downloads --report <html|html-detailed|junit> and/or --download-artifacts [all|failed] for a finished project via the existing fetchReports/downloadArtifacts path. Refuses a project that is still running and points to status --wait.
  • testingbot list [--count] [--offset] – newest-first page of Maestro projects with state, run/flow counts and dashboard URLs; --json returns { provider, meta, projects }.

No server changes: GET /app-automate/maestro, GET /:id and the report endpoints already exist. Invalid --id values are rejected by Commander with usage help.

Jira: TB-372 (epic TB-370).

Test plan

  • npm test — 680 passed (24 new: CLI wiring for all three commands, provider status()/artifacts()/listProjects())
  • npm run lint, npm run build
  • Real account: testingbot list --count 3, list --json
  • Real account: status --id 91265 (text + --json, exit 0), status --id 1 → not found, exit 1
  • Real account: artifacts --id 91265 --report junit --report-output-dir … saved report_run_94853.xml; artifacts --id 91265 with nothing requested → exit 1
  • Live run (project 91595, iPhone XR 18.7): maestro sample.ipa flow.yaml --async --jsonoutcome: started; status --id 91595 --wait showed the live flow table through WAITING → RUNNING → PASSED and exited 0; artifacts --id 91595 --download-artifacts produced a zip with Flow/logs/{maestro,vm}.txt, Flow/video/video.mp4, Flow/report.xml and report.xml

…TB-372)

--async previously left no way to come back for results from the CLI.

- testingbot status --id <projectId> [--wait]: snapshot of runs and flows
  (last-attempt-wins verdicts); --wait reuses the foreground poll loop and
  live table. Exits 0 while running, 2 when failed.
- testingbot artifacts --id <projectId>: downloads --report and/or
  --download-artifacts for a finished project via the existing code path;
  refuses a project that is still running and points to status --wait.
- testingbot list [--count] [--offset]: newest-first page of projects with
  run/flow counts and dashboard URLs.

All three accept --json/--json-file and share credential resolution.
No server changes: GET /, GET /:id and the report endpoints already exist.
@jochen-testingbot
jochen-testingbot changed the base branch from feat/TB-371-json-output-exit-codes to main September 2, 2026 08:57
@jochen-testingbot
jochen-testingbot merged commit 71a5bf8 into main Sep 2, 2026
9 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