--- title: Generated SDK tests | Stainless description: Learn about the tests Stainless generates for your SDKs and how and when they're run. --- When you create or make changes to your SDKs, Stainless generates the following tests: - Unit tests for the core SDK client - Endpoint tests for each endpoint configured in your Stainless config file, including the following: - Synchronous and asynchronous request and response tests with only required parameters - Synchronous and asynchronous request and response tests with all parameters You can also add your own tests with [custom code](/docs/sdks/configure/custom-code/index.md) if you want to do things like perform additional checks, run tests against your own sandbox environment, and more. ## Test endpoints with mock test servers Mock test servers are a paid feature. See our [pricing page](https://stainless.com/pricing) for details. Endpoint tests are run against a mock test server we create and run based on your OpenAPI spec. The mock test server we use may not handle all edge cases, so endpoint tests are disabled by default. You can enable endpoint tests against the mock test server by removing [the `disable_mock_tests: true` flag](/docs/reference/config#settings/index.md) in your Stainless config. When you make changes, we automatically spin up a mock test server based on your OpenAPI spec, confirm the mock server doesn’t fail validation, and run all enabled tests and linters, and validate responses. ## Automatic testing By default, tests run automatically as part of our standard GitHub CI workflow. The workflow configuration is defined in the `.github/workflows/ci.yml` file inside your SDK’s repository, under the `test` section. ## Run tests manually You can run tests and the mock test server locally, on demand, by running these scripts from the root of your SDK’s repository: - `./scripts/mock` - Run the mock test server - `./scripts/test` - Run tests (this script will start the mock test server for you if it’s not already running) ## Examples We recommend you add examples of how you want your users to use your SDKs in the `./examples` directory inside each of your SDK repositories. Adding examples simplifies testing common use cases against your live API. Have a look at [OpenAI’s TypeScript demo](https://github.com/openai/openai-node/blob/master/examples/demo.ts) for a working example. The `./examples` directory is safe to use; Stainless won’t modify its content.