Rainforest is the simplest way of doing integration testing. Since integration tests play such a big role in assuring the quality of your software, it is important to run these tests on a regular basis.
The best way to achieve this is to integrate Rainforest with your existing continuous integration system or with your deployment system.
We've built a tool that should let you achieve this in minutes.
To integrate Rainforest with any CI server or deployment tool, we wrote a Command Line Interface that triggers a run of your tests from any script. This tool is called rainforest-cli and is compatible with all build systems.
It's easy to install and with our new CLI - just follow the instructions for Mac, Windows, or Linux.
You can then run all of your tests using the following command:
rainforest run --token <YOUR API TOKEN> --fail-fast --description "CI automatic run" all
You can find your API token in the Settings pane of your account in the Integrations section.
--fail-fast option makes the rainforest tool return immediately after the first failure.
--description option adds an arbitrary description to the run.
For a comprehensive list of options, refer to the Github page of the tool.
To view examples of how you might configure common CI tools to automatically run your Rainforest test suite, please see our CI sample repository.
Rainforest's CLI client supports triggering based on the contents of a git commit message. This is useful if you have Rainforest integrated into your CI server, but want to have more control over what is tested.
To enable this feature, add --git-trigger to the command line options you're passing to Rainforest.
With this flag enabled the cli client will do nothing unless the last commit message for your project contains @rainforest and one or more hashtags. For example, if the last commit was;
"Fixed the login button" - we will not trigger rainforest
"Fixed the login button. @rainforest #login" - we will start a rainforest run with anything tagged login.
The most common and suggested use of git-trigger is to enable teams to test specific subsets of their Rainforest suites on feature branches for speed before their work is merged into a release branch where a full suite runs. For more details on how to get started with this workflow, please get in touch.
If you have any questions, please feel free to reach out to us at [email protected] or through Intercom!
Updated 3 months ago