Skip to content

createTestCase/updateTestCase cannot write native BDD fields (feature/background/scenario) #392

Description

@idegterov

Problem

createTestCase and updateTestCase have no feature/background/scenario parameters. Their schemas only expose test_case_steps (step/result pairs), description, and preconditions as free text. There is no way through either tool to write to a test_case_bdd-template case's native Background/Scenario fields.

This isn't just a missing convenience — it actively breaks on a BDD-template case:

  • Routing Gherkin through description/preconditions "works" but writes to the wrong field (shows as plain text, not native Background/Scenario boxes in the UI).
  • Passing test_case_steps to updateTestCase on an existing test_case_bdd-template case is hard-rejected by the backend (confirmed via direct testing, 2026-09-03) — there is no way to attach step/result pairs to a BDD case at all, and updateTestCase also cannot switch a case's template.

Confirmed the backend already supports this

Called the underlying REST endpoint directly (same auth the MCP server uses internally):

PATCH https://test-management.browserstack.com/api/v2/projects/{project}/test-cases/{identifier}
Body: {"test_case": {"feature": "...", "background": "...", "scenario": "..."}}

This returns 200 and persists the fields correctly (verified via a follow-up GET). So this is purely a client-side gap — the API fully supports writing feature/background/scenario on update, the MCP tool schemas just never forward them.

Related PR

#225 ("feat(testmanagement): add optional test_case_bdd field for BDD/Gherkin template support") already implements this for both createTestCase and updateTestCase. It's been open since 2026-02-13 and is currently CONFLICTING (needs a rebase). Opening this issue since I couldn't find an existing one tracking the problem itself — only the PR.

Suggested fix

Rebase and merge #225, or an equivalent change exposing feature/background/scenario as optional parameters on both createTestCase and updateTestCase, matching the REST API's existing test_case_bdd payload shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions