---
title: Test APIs
description: This page is an introduction to API testing in Insomnia.
url: "/insomnia/test/"
canonical_url: "/insomnia/test/"
content_type: landing_page
products:
- Insomnia
tags:
- test-apis
canonical: true


---






# Test APIs with Insomnia

Create manual and automated tests for your APIs
## Test APIs and write scripts in Insomnia
Insomnia has several testing features that can help you ensure the quality of your APIs: 




* Pre-request and after-response scripting to add logic to your requests

* Automate your tests with Inso CLI

* Test complex workflows by chaining the responses from requests together

* Execute unlimited test runs simultaneously

* Import your tests from Postman

* Use the full range of [Chai `assert` assertions](https://www.chaijs.com/api/assert/) in both post-request and unit test scripts





  > Unit tests are planned for deprecation in a future release.
  > [Migrate to scripts](/insomnia/scripts/)




![Image of the generating collections and tests](/assets/images/insomnia/graphic-api-test-hero.png)


## Cookie management



Insomnia automatically stores cookies from every response and sends them with future requests as needed, just like a web browser.
You can manage cookies within each workspace by clicking **Cookies**, which opens the cookie manager. From there, you can view, modify, or delete cookies.

Sending and storing cookies is enabled by default, but can be customized per request in the request settings dialog.

Use [template tags](/insomnia/template-tags/) to reference cookie values in headers, bodies, or query parameters of other requests.




## Features


### Chain requests

Insomnia provides the ability to chain requests. This means you can extract values from the responses of other requests while also sharing state across requests.

[Learn more](/how-to/chain-requests/)


### Automate API test execution with CLI

Use the Insomnia CLI to automate the execution of your API tests using your existing Git workflows. For example, you can make it so that every pull request needs to run the API tests successfully before they can be merged.

[Learn more](/how-to/automate-tests/)


### Use Collection Runner

Automatically test multiple requests in your collections, with unlimited collection runs.

[Learn more](/how-to/use-the-collection-runner/)


### Use pre-request and after-response scripts

Use scripts to manipulate requests, modify environments, and test responses.

[Learn more](/insomnia/scripts/)


## Get started writing tests


### Write tests for HTTP status codes



[Learn more](/how-to/write-http-status-tests/)


### Write tests for content types



[Learn more](/how-to/write-content-type-tests/)


### Write tests for headers in the response



[Learn more](/how-to/write-headers-in-response-tests/)


### Write tests for data types



[Learn more](/how-to/write-data-type-tests/)


