Add Get and Update Test Execution Steps Tools to Zephyr#363
Open
sudheshbmsce wants to merge 2 commits intoSmartBear:mainfrom
Open
Add Get and Update Test Execution Steps Tools to Zephyr#363sudheshbmsce wants to merge 2 commits intoSmartBear:mainfrom
sudheshbmsce wants to merge 2 commits intoSmartBear:mainfrom
Conversation
- Add GetTestExecutionSteps tool (GET /testexecutions/{id}/teststeps)
- Add UpdateTestExecutionSteps tool (PUT /testexecutions/{id}/teststeps)
- Register both tools in ZephyrClient
- Fix GetTestCaseTestSteps200Response schema: testData, reflectRef, and
testCase fields now use .nullish() to accept null values from the API
- Add unit tests for both new tools (14 tests total)
Made-with: Cursor
Made-with: Cursor
419ccce to
135bfc0
Compare
SanthrupthaKS123
approved these changes
Mar 9, 2026
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.
Goal
Add two missing MCP tools for Zephyr test execution steps, enabling AI agents to read and update individual step results during a test execution run.
Design
The Zephyr Scale API already had two untapped endpoints —
GET /testexecutions/{id}/teststepsandPUT /testexecutions/{id}/teststeps— with full Zod schemas already defined inrest-api-schemas.ts. Two new tool classes were implemented following the exact same pattern as all other Zephyr tools (GetTestExecution,UpdateTestExecution, etc.) and registered inZephyrClient.A schema fix was also applied to
GetTestCaseTestSteps200Response: thetestData,reflectRef, andtestCasefields were changed from.optional()to.nullish()because the real Zephyr API returnsnull(notundefined) for these fields, causing output validation failures.Changeset
src/zephyr/tool/test-execution/get-test-execution-steps.ts—zephyr_get_test_execution_stepstool (read-only, paginated, supportstestDataRowNumberfilter)src/zephyr/tool/test-execution/update-test-execution-steps.ts—zephyr_update_test_execution_stepstool (idempotent PUT, recordsactualResultandstatusNameper step)src/zephyr/client.ts— registered both new toolssrc/zephyr/common/rest-api-schemas.ts—GetTestCaseTestSteps200ResponsetestData/reflectRef/testCaseacceptnullTesting
npm run test:run)QE-T33108, 10 steps returned correctly after schema fix)