Skip to content

Commit 91f57d8

Browse files
committed
Sync open source content 🐝 (from 79f36794350fa4e9add8ddf99ac7b065003198d5)
1 parent f652452 commit 91f57d8

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

docs/customize-testing/customizing-sdk-tests.mdx

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@ title: "Customizing SDK Tests"
33
description: "Learn how to customize SDK tests after they are boostrapped."
44
---
55

6-
# Customizing SDK Tests
7-
8-
## Regenerate tests from scratch
9-
10-
By default tests will only be populated from modifications to the `tests.arazzo.yaml` file after bootstrapping.
11-
To regenerate all SDK tests from scratch, run the following command:
6+
import { Callout } from "@/mdx/components";
127

13-
```bash
14-
speakeasy configure tests --rebuild
15-
```
8+
# Customizing SDK Tests
169

1710

1811
## Disable auto generation of tests for specific operations
@@ -81,3 +74,26 @@ To learn more about these kinds of modifications see [here](/docs/api-contract-t
8174
## Next Steps
8275

8376
- [Setup testing in GitHub Actions](/docs/customize-testing/github-actions)
77+
78+
<Callout title="Bootstrapping tests again from scratch" type="info">
79+
Once the original `tests.arazzo.yaml` document is bootstrapped, the Arazzo document will only be modified automatically when new operations are detected and `generateNewTests: true` is set in your `./speakeasy/gen.yaml`, new tests will be bootstrapped for these new operations. But pre-bootstrapped tests will be left alone.
80+
81+
If you want to bootstrap all workflows in the Arazzo document from scratch again (for example to match changes to operations or examples in your spec), run the following command:
82+
83+
```bash
84+
speakeasy configure tests --rebuild
85+
```
86+
87+
You can also selectively bootstrap individual tests by:
88+
1. Deleting the specific workflow from the arazzo doc in `.speakeasy/tests.arazzo.yaml`
89+
2. Removing the corresponding entry in `.speakeasy/gen.lock` under `generatedTests`
90+
91+
For example, to bootstrap a test for the `createLink` operation again, delete its entry in the gen.lock file:
92+
93+
```yaml
94+
generatedTests:
95+
createLink: "2025-05-21T12:47:33+10:00" # Delete this to bootstrap test again from scratch
96+
```
97+
98+
This approach preserves any other manual changes you've made to your arazzo doc.
99+
</Callout>

0 commit comments

Comments
 (0)