# Testing

> Fern automatically generates unit tests and mock server tests for SDKs to ensure quality before release

Fern provides comprehensive testing for your SDKs through generated and handwritten tests.

## Generated tests

<Warning title="Pro and Enterprise feature">
  This feature is available only for the [Pro and Enterprise plans](https://buildwithfern.com/pricing). To get started, reach out to [support@buildwithfern.com](mailto:support@buildwithfern.com).
</Warning>

Fern auto-generates tests that must pass before SDK release. Fern generates a GitHub workflow in each SDK repository that runs unit tests and any enabled mock server tests on every pull request, commit, and release.

### Unit tests

Fern generates unit tests for all SDK languages. They verify individual methods in isolation without making network calls.

### Mock server tests

Mock server (wire) tests run your SDK against a mock server generated from your API definition. They verify that the SDK sends HTTP requests and receives HTTP responses as expected. These tests are generated for all endpoints in a service.

Mock server tests are available for TypeScript, Python, Go, Java, C#, PHP, Swift, Rust, and Ruby. Configure mock server tests in your `generators.yml`:

| Language   | Configuration                                                                                          | Default |
| ---------- | ------------------------------------------------------------------------------------------------------ | ------- |
| TypeScript | [`generateWireTests`](/learn/sdks/generators/typescript/configuration#generatewiretests)               | true    |
| Python     | [`enable_wire_tests`](/learn/sdks/generators/python/configuration#enable_wire_tests)                   | false   |
| Go         | [`enableWireTests`](/learn/sdks/generators/go/configuration#enablewiretests)                           | true    |
| Java       | [`enable-wire-tests`](/learn/sdks/generators/java/configuration#enable-wire-tests)                     | false   |
| .NET/C#    | [`generate-mock-server-tests`](/learn/sdks/generators/csharp/configuration#generate-mock-server-tests) | true    |
| PHP        | [`enable-wire-tests`](/learn/sdks/generators/php/configuration#enable-wire-tests)                      | false   |
| Swift      | [`enableWireTests`](/learn/sdks/generators/swift/configuration#enablewiretests)                        | true    |
| Rust       | [`enableWireTests`](/learn/sdks/generators/rust/configuration#enablewiretests)                         | false   |
| Ruby       | [`enableWireTests`](/learn/sdks/generators/ruby/configuration#enablewiretests)                         | false   |

## Integration tests

<Warning title="Enterprise feature">
  This feature is available only for the [Enterprise plan](https://buildwithfern.com/pricing). To get started, reach out to [support@buildwithfern.com](mailto:support@buildwithfern.com).
</Warning>

Handwritten integration tests run against your real API server to test end-to-end functionality with live data.

## Adding additional tests

You can add custom tests directly to your SDK repositories. Include test files in your `.fernignore` file to prevent overwrites during regeneration.