See our CI Sample Repository 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 CircleCI Orb to easily integrate Rainforest tests with your CI flow.
Our project is configured to provide a continuous delivery flow by default.
Every time code is pushed to the
develop branch, CircleCI:
- Runs the automated tests.
- Deploys the
developbranch to a staging server.
- Runs the Rainforest tests using the CLI on the staging server.
- Once the Rainforest tests are successful, CircleCI pushes the
developbranch to the
- 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.
For the whole picture, we encourage you to consult CircleCI’s Getting Started documentation.
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 here.
Notice that instead of entering the Rainforest API key directly in the
config.yml file, we use environment-specific test datatest data - Placeholders that allow you to inject other values into your tests. Rainforest supports three types: dynamic, static, and built-in.. 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 Using Test Data.
RAINFOREST_TOKEN environment variable in CircleCI corresponding to your test data, and you’re done. For more information, see CircleCI’s Using Environment Variables.
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.
If you have any questions, reach out to us at [email protected] or via the chat bubble below.
Updated about a month ago
Related Articles & Links
|The Rainforest CLI|
|CI Sample Respository|
|Rainforest CircleCI Orb|
|The Role of Testing in CI/CD|
|CircleCI: Your First Green Build|
|Using Test Data|
|CircleCI: Using Environment Variables|