Skip to content

feat(test-management): add listTestPlans and getTestPlan tools#284

Open
manoj-k04 wants to merge 12 commits intobrowserstack:betafrom
manoj-k04:feat/tm-test-plan-tools
Open

feat(test-management): add listTestPlans and getTestPlan tools#284
manoj-k04 wants to merge 12 commits intobrowserstack:betafrom
manoj-k04:feat/tm-test-plan-tools

Conversation

@manoj-k04
Copy link
Copy Markdown
Collaborator

Mirror of #283 targeting the beta branch.

Summary

  • Adds listTestPlans and getTestPlan MCP tools, exposing BrowserStack Test Plans as first-class objects (previously agents fell back to test runs when given a TP-* identifier).
  • getTestPlan chains GET /test-plans/{id} + GET /test-plans/{id}/test-runs and returns a unified payload: metadata, linked runs, total test-case count across runs, and a derived run-state summary — suitable for auto-generating test documentation / QA status reports.
  • listTestPlans covers discovery when the TP-* identifier is not known.

Customer context

Driven by Danske / Himanshu's Slack thread: customer wants to auto-generate Confluence test documentation from a Test Plan ID via MCP. Current behavior either returns test runs or nothing. This PR covers 4 of the 5 fields they asked for; Linked Epics/Requirements is not in the public Test Plans API and is tracked as a follow-up.

Test plan

  • npm test — 127 passing (4 new tests)
  • npx tsc --noEmit — clean
  • npm run lint — clean
  • npm run build — produces dist/tools/testmanagement-utils/{list-testplans,get-testplan}.js
  • Stdio smoke test: tools/list advertises both new tools
  • Live smoke test against a real BrowserStack TM project (pending reviewer)

🤖 Generated with Claude Code

ruturaj-browserstack and others added 12 commits March 27, 2026 11:39
…cessbility-advance-rules

feat: add advanced rules option to accessibility scan
… unit tests for all tools

- Upgrade all direct dependencies to latest stable versions (axios 1.14.0, browserstack-local 1.5.12, zod 4.3.6, webdriverio 9.27.0, etc.)
- Resolve all 12 npm audit vulnerabilities (0 remaining)
- Fix missing isError flag in error responses for rca-agent, automate, selfheal, appautomate tools
- Add 10 new unit test files covering all previously untested tool modules (accessibility, automate, bstack-sdk, build-insights, list-test-files, percy-sdk, rca-agent, review-agent, run-percy-scan, selfheal)
- Total test coverage: 123 tests across 16 files (up from 77 tests across 6 files)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tegration-test-suite

fix: resolve security vulnerabilities and add unit tests for all tools
sharp is a native binary module that fails to load in CI (ubuntu-latest)
when platform-specific binaries aren't installed. Mock it globally in
test setup since tests don't need actual image compression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…k-sharp-ci

fix: mock sharp in tests to prevent CI failure on linux
… server.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rsion-1.2.14

chore: bump version to 1.2.14 in package.json, package-lock.json, and…
)

Upgrade axios from 1.14.0 to 1.15.0 to remediate GHSA-3p68-rc4w-qgx5,
where NO_PROXY hostname normalization could be bypassed via trailing-dot
hostnames or IPv6 literals, leading to SSRF. Ref PMAA-94.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… server.json

Version bump for the axios 1.15.0 security upgrade (PMAA-94 / CVE-2025-62718).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…os-ssrf-PMAA-94

fix: bump axios to ^1.15.0 to patch NO_PROXY SSRF bypass (PMAA-94)
Expose Test Plans as first-class objects in the MCP so agents can retrieve
a plan by TP-* identifier instead of falling back to test runs.

getTestPlan chains the plan-details and linked-runs endpoints into a unified
response with metadata, linked test runs, total test-case count across runs,
and a derived run-state summary — suitable for generating test documentation
and QA status reports. listTestPlans covers discovery when the identifier is
not known.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

3 participants