Shipped: run against ad-hoc environments
We recently shipped something I had in mind for a while: running your Rainforest tests against an ad-hoc environment or URL. Maybe you use Fourchette to have one environment per GitHub PR or you have multiple QA environments? You might even use your CI server as a one-off QA environment, as we explain in that post!
Before today, it wasn’t possible to use those ad-hoc environments to run your Rainforest test against; now it is dead easy to do so!
How to use this new feature?
You can do it via the API but the easiest way is to use our CLI tool. If you are not familiar with it, the installation and usage documentation can be found in the README, but the interesting parts are the two new options you can give to the CLI tool:
--site-id: using this option, you will run tests only from a specific site. How to get that site id? You can get it by clicking in the “See tests” column of the site you want to use, in the site settings, you will see the site id in the URL. We know, this isn’t ideal, so feel free to get in touch with us for any help.
--custom-url: this is the most interesting thing here, as it’s the URL to your environment you want to test with Rainforest. Specify something like
http://ad-hoc-1234.example.comand our crowd of testers will hit this environment within a moment.
If you want to use the
--custom-url option, you will need
--site-id too. Here is a full example:
rainforest run all --site-id YOUR_SITE_ID_HERE --custom-url http://ad-hoc-1234.example.com --conflict abort --fg --fail-fast --token $RAINFOREST_API_TOKEN
We hope that will help you have better coverage with Rainforest. As usual, feel free to reach out to us if there is anything we can help with.