---
updatedAt: 2026-03-05T13:26:45.000Z
agentTools:
  projectIndex: https://help.rainforestqa.com/llms.txt
---

# CircleCI

Learn how to configure CircleCI to run your Rainforest tests.

## Overview

<a href="https://circleci.com/" target="_blank">CircleCI</a> is a hosted continuous integration (CI) server. Using the <a href="https://github.com/rainforestapp/rainforest-cli" target="_blank">Rainforest CLI</a>, it’s easy to configure CircleCI to run your Rainforest test suite after each deployment.

See our <a href="https://github.com/rainforestapp/ci-sample" target="_blank">CI Sample Repository</a> on Github for a more thorough explanation of how you can incorporate Rainforest tests into your release process for CircleCI, Jenkins, and Travis.

If you have CircleCI set up already, check out our <a href="https://circleci.com/developer/orbs/orb/rainforest-qa/rainforest" target="_blank">CircleCI Orb</a> to easily integrate Rainforest tests with your CI flow.

## The Flow

Our project is configured to provide a <a href="https://www.rainforestqa.com/blog/2017-05-18-the-role-of-qa-testing-in-continuous-delivery" target="_blank">continuous delivery</a> flow by default.

Every time code is pushed to the `develop` branch, CircleCI:

1. Runs the automated tests.
2. Deploys the `develop` branch to a staging server.
3. Runs the Rainforest tests using the CLI on the staging server.
4. Once the Rainforest tests are successful, CircleCI pushes the `develop` branch to the `master` branch.
5. The previous step triggers another CI build, which pushes the code to production.

If any step fails, the build fails. This prevents the deployment of broken code to your users.

## Getting Started with CircleCI

For the whole picture, we encourage you to consult CircleCI’s <Anchor label="Getting Started" target="_blank" href="https://circleci.com/docs/2.0/getting-started/">Getting Started</Anchor>  documentation.

## The Config.yml File

The primary way to configure the CircleCI tool is to store a file in your git repository. You can see the sample configuration for our project <a href="https://github.com/rainforestapp/ci-sample/blob/master/.circleci/config.yml" target="_blank">here</a> .

Notice that instead of entering the Rainforest API key directly in the `config.yml` file, we use environment-specific <Glossary>test data</Glossary>. We do this for security reasons. We don’t want to expose sensitive information to any reader of the file, especially when the repository is public. For more information, see  <Anchor label="Using Test Data" target="_blank" href="using-test-data">Using Test Data</Anchor> .

Configure test data in your project’s <a href="https://app.rainforestqa.com/settings/steps" target="_blank">Test Data</a>  settings. You can find your Rainforest API token by navigating to your <a href="https://app.rainforestqa.com/settings/integrations" target="_blank">Integrations</a> settings.

<Image alt={431} border={false} caption="Your Rainforest API token." title="Screen Shot 2021-05-25 at 3.45.34 PM.png" src="https://files.readme.io/64d1237-Screen_Shot_2021-05-25_at_3.45.34_PM.png" />

Create a `RAINFOREST_TOKEN` environment variable in CircleCI corresponding to your test data, and you’re done. For more information, see CircleCI’s <a href="https://circleci.com/docs/2.0/env-vars/#setting-environment-variables-for-all-commands-without-adding-them-to-git" target="_blank">Using Environment Variables</a>.

## Testing Your Setup

You can test your setup by committing a change to your `develop` branch and pushing it to your git repository. CircleCI picks up the change and deploys your code. With a new continuous delivery flow and QA process, you can move fast while not breaking anything.

**Note:** If you don’t see an API token in your Rainforest settings, click the Rotate API Token button to generate a new one.

<hr />

*If you have any questions, reach out to us at <support@rainforestqa.com>.*