Customers with a lot of Runscope Radar API tests have been telling us they'd like the ability to share common values (like API keys) across a group of tests within a bucket. Wait no more! Starting today you can create Bucket-Wide Variables that can be set once and used by any test within a bucket.
A Refresher on Variables for Radar API Tests
Variables allow you to pass state between requests within your API tests. This is most commonly used to extract a value from the response of a request, then insert that value dynamically into subsequent requests. For example, you might create a new record, store the ID returned in the response JSON, then insert that ID into the URL of a later request to verify that the new record can be retrieved.
Initial Variables are variables defined and available to all requests within a test, including the first one. This is a great place to store common values like API keys/tokens and base URLs that are common to every request. Variables can also be read and set through Scripts, but that's outside the scope of this post. You can learn more about that in the docs.
Previously, Variables were scoped to an individual test, which can make managing those values across multiple tests a little tedious. Which brings us to...
Introducing Bucket-Wide Variables
Bucket-wide Variables let you specify values available to all tests within a bucket. Common configuration data previously repeated across tests can now be centralized in a single location. You can override a value for a specific test by specifying a new value in the test's settings, or by passing in custom values to a Trigger URL.
Bucket-wide Variables have been enabled for all accounts. After creating more than one test within a bucket, you'll see the option show up in the left sidebar of the Radar overview page in your dashboard.
Managing a large number of API tests and monitors has never been easier. If you have a lot of API endpoints to keep an eye on, sign up for your free Runscope account today.