Skip to content

feat(testmanagement): add optional test_case_bdd field for BDD/Gherkin template support - #225

Open
tadeorosochackinx wants to merge 1 commit into
browserstack:mainfrom
tadeorosochackinx:feature/add-bdd-template-support
Open

feat(testmanagement): add optional test_case_bdd field for BDD/Gherkin template support#225
tadeorosochackinx wants to merge 1 commit into
browserstack:mainfrom
tadeorosochackinx:feature/add-bdd-template-support

Conversation

@tadeorosochackinx

Copy link
Copy Markdown

Summary

Adds an optional test_case_bdd parameter to createTestCase and updateTestCase tools, enabling BDD/Gherkin template support.

Changes

  • create-testcase.ts: Added test_case_bdd to interface, Zod schema, and function body
  • update-testcase.ts: Same pattern

How it works

When test_case_bdd is provided (with feature, scenario, and optional background), the fields are flattened into the API body with template: "test_case_bdd". When omitted, behavior is 100% unchanged.

…n template support

Add test_case_bdd as an optional parameter to createTestCase and updateTestCase.
When provided, the BDD fields (feature, scenario, background) are flattened into
the API body with template set to test_case_bdd. Fully backwards-compatible —
no existing fields or behavior changed.
@idegterov

Copy link
Copy Markdown

Hit this gap in practice today: createTestCase/updateTestCase currently have no way to write native feature/background/scenario fields, so any BDD-template test case can only be updated via description/preconditions/test_case_steps — which either flattens Gherkin into a step list or gets rejected outright (test_case_steps on a test_case_bdd-template case returns an error from the backend).

Confirmed the underlying PATCH /api/v2/projects/{project}/test-cases/{identifier} endpoint already accepts feature/background/scenario directly when called outside this client (200, values persist) — so the backend fully supports what this PR adds, it's just not exposed here yet.

This has been open ~7 months and just went stale (CONFLICTING). Any chance of a rebase + merge? Happy to help test against a real BDD project if useful.

@idegterov

Copy link
Copy Markdown

Opened #392 to track the underlying problem this PR fixes, since I couldn't find an existing issue for it — just linking them together.

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