Zephyr: Get Test Script
zephyr_get_test_scriptRetrieve the test script (plain text or BDD) for any Zephyr test case using its key, returning script type, content, and id.
Instructions
Get the Test Script (Plain Text or BDD) for a given Test Case in Zephyr
Toolset: Test Cases
Parameters:
testCaseKey (string) required: The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+
Examples:
Get the test script for test case with key 'SA-T1'
{
"testCaseKey": "SA-T1"
}Expected Output: The test script with its type (plain or bdd), text content, and id
Retrieve the BDD test script content for test case with key 'MM2-T15'
{
"testCaseKey": "MM2-T15"
}Expected Output: The test script with its type (plain or bdd), text content, and id
Get the test script for test case with key 'QA-T100' to review the test instructions
{
"testCaseKey": "QA-T100"
}Expected Output: The test script with its type (plain or bdd), text content, and id
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| testCaseKey | Yes | The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+ |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The ID of the entity | |
| text | Yes | ||
| type | Yes | Test scripts can be written in plain text or BDD format. The BDD type supports remote execution on a build system via API plugin. Supported Keywords for BDD: Given, When, Then, And, But. For more information about BDD and Gherkin syntax, see: https://support.smartbear.com/zephyr/docs/en/test-cases/gherkin-behavior-driven-development--bdd-.html For Plain Text scripts, we support HTML fragments. To create a step-by-step test script, you should use the POST /testcases/{testCaseKey}/teststeps endpoint. |