Skip to content

feat: add read commands for plans, suites, and cases (#401)#402

Closed
cosmicdreams wants to merge 3 commits into
gurock:mainfrom
cosmicdreams:feat/read-commands-401
Closed

feat: add read commands for plans, suites, and cases (#401)#402
cosmicdreams wants to merge 3 commits into
gurock:mainfrom
cosmicdreams:feat/read-commands-401

Conversation

@cosmicdreams

@cosmicdreams cosmicdreams commented Mar 10, 2026

Copy link
Copy Markdown

Adds read-only CLI commands for fetching TestRail plans, suites, and cases as JSON:

  • get_plans --project-id
  • get_plan --plan-id
  • get_suites --project-id
  • get_cases --project-id --suite-id [--section-id]
  • get_case --case-id

These commands make it possible to pull TestRail definitions into automation workflows without dropping to raw API calls.

Notes for reviewers

  • Commands use the existing TestRail API endpoints and support paginated responses.
  • Successful read output is clean JSON on stdout, suitable for jq and scripts.
  • Auth, proxy, TLS, timeout, config, and environment handling use the existing CLI plumbing.
  • Shared helper coverage was added for pagination, client option forwarding, and error handling.

Validation

  • python3 -m pytest -c ./tests/pytest.ini -W ignore::pytest.PytestCollectionWarning tests
  • python3 -m compileall trcli
  • git diff --check

@acuanico-tr-galt

acuanico-tr-galt commented Mar 12, 2026

Copy link
Copy Markdown
Collaborator

Hi @cosmicdreams, thank you for submitting this PR. Once ready, can you point this to release/1.13.4 instead of main? We'll be reviewing the changes before we can merge. Thank you.

@cosmicdreams cosmicdreams force-pushed the feat/read-commands-401 branch from 13c2e6c to b5425c0 Compare June 3, 2026 19:41
@cosmicdreams cosmicdreams marked this pull request as ready for review June 3, 2026 19:45
@cosmicdreams cosmicdreams force-pushed the feat/read-commands-401 branch from b5425c0 to 4c5015a Compare June 3, 2026 19:56
@acuanico-tr-galt

Copy link
Copy Markdown
Collaborator

This has been implemented in TRCLI v1.15.0.

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.

2 participants