Zephyr: Create Test Script
zephyr_create_test_scriptCreates plain text or BDD test scripts for Zephyr test cases, enabling step-by-step instructions or behavior-driven scenarios.
Instructions
Create a new Test Script of the types Plain Text or BDD in a Zephyr Test Case.
Toolset: Test Cases
Examples:
Create a plain text test script for test case SA-T1 to verify that the axial pump can be enabled
{
"testCaseKey": "SA-T1",
"type": "plain",
"text": "1. Navigate to Pump Settings</br>2. Enable Axial Pump</br>3. Verify pump status is 'Active'"
}Expected Output: The created test script metadata including its id and self link
Create a BDD test script for test case MM2-T15 to validate axial pump activation
{
"testCaseKey": "MM2-T15",
"type": "bdd",
"text": "Given the axial pump is installed\nWhen the user enables the axial pump\nThen the pump status should be Active"
}Expected Output: The created test script metadata including its id and self link
Create a BDD test script for test case QA-T100 for axial pump performance validation
{
"testCaseKey": "QA-T100",
"type": "bdd",
"text": "Given the system is running\nWhen the axial pump operates under load\nThen performance metrics should remain within thresholds"
}Expected Output: The created test script metadata including its id and self link
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| type | No | 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. | |
| 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 | |
| self | No |