---
title: "Export a BDD test case as a Gherkin feature file"
method: GET
path: "/testcase/bdd-feature-file/{id}"
tags: ["TestCase"]
---

# Export a BDD test case as a Gherkin feature file

`GET /testcase/bdd-feature-file/{id}`

## Request

- Base URL: `https://app.testiny.io/api/v1`
- URL: `https://app.testiny.io/api/v1/testcase/bdd-feature-file/{id}`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/testiny/apis/testiny-api/docs/testcase/bdd-feature-file/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Synthesizes a Gherkin .feature file from a test case using the BDD template: the test case title becomes the feature name and the stored scenarios are emitted verbatim. A feature header already present in the scenarios is kept as-is.

## Path parameters

- `id` integer, required

## Query parameters

- `lang` string
- `link` boolean

## Response `200`

Returns 'FeatureFileResult'

- string: The synthesized Gherkin feature file

## Other responses

- `4XX`: The request failed because invalid request parameters or data were supplied or access was denied.
- `5XX`: The request failed because an error occurred during processing of the request.

---

[API](https://skmtc.dev/testiny/apis/testiny-api.md) - [All operations](https://skmtc.dev/testiny/apis/testiny-api/llms.txt) - [OpenAPI document](https://skmtc.dev/testiny/apis/testiny-api/revisions/8f7643b2429d?raw)
