Skip to content

Commit 095f6a6

Browse files
hakanbdomalessi
andauthored
[DOCS-11412] Document subtest support for Synthetic Multistep API tests (#30284)
* [DOCS-11412] Document subtest support to Synthetic Multistep API tests * Minor syntax update * Fix image width to match browser docs * Update content/en/synthetics/multistep.md Co-authored-by: domalessi <[email protected]> * Update content/en/synthetics/multistep.md Co-authored-by: domalessi <[email protected]> * Update content/en/synthetics/multistep.md Co-authored-by: domalessi <[email protected]> * Update content/en/synthetics/multistep.md Co-authored-by: domalessi <[email protected]> * Update content/en/synthetics/multistep.md Co-authored-by: domalessi <[email protected]> --------- Co-authored-by: domalessi <[email protected]>
1 parent 5903f12 commit 095f6a6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

content/en/synthetics/multistep.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ To display your list of variables, type `{{` in your desired field.
194194

195195
{{< img src="synthetics/api_tests/use_variable.mp4" alt="Using Variables in Multistep API tests" video="true" width="90%" >}}
196196

197+
### Subtests
198+
199+
Multistep API tests support subtests, allowing you to reuse existing API tests or extract steps into reusable components. You can nest subtests up to two levels deep.
200+
201+
To use an existing API test as a subtest, click **Subtest**, go to the **From Existing Test** tab, and select an API test from the dropdown menu.
202+
203+
To convert steps from your current API test into a subtest, click on the **Extract From Steps** tab, select the recorded steps you want to extract, and click **Convert to Subtest**.
204+
205+
{{< img src="synthetics/multistep_tests/subtest.png" alt="UI for adding a subtest to a Multistep API test" width="60%" >}}
206+
207+
To override a subtest variable in a Multistep API test, define it in the parent test using the same name. A variable always uses the first value assigned to it.
208+
209+
If you don't need to run a subtest independently, you can pause it. It still runs as part of the Multistep API test but is not executed on its own.
210+
197211
## Test failure
198212

199213
A test is considered `FAILED` if a step does not satisfy one or several assertions or if a step's request prematurely failed. In some cases, the test can indeed fail without being able to test the assertions against the endpoint, these reasons include:
66.4 KB
Loading

0 commit comments

Comments
 (0)