Generating Runscope monitoring tests with HttpRider
Runscope (Now Part of BlazeMeter) is a well known service for API Monitoring. This post covers generating Runscope monitoring tests from HttpRider.
We start with API definitions in HttpRider, make sure you run them at least once as some of the exporters use the data from the response.
Along with API definitions, it also generates Runscope environments with placeholders for any variables used from environment.
Once the tests have successfully finished, click on the export/export all button to display the code generator.
Select Runscope from the dropdown list to see generated code in Runscope API tests format.
Copy the code and save it in a json which we’ll use to import.
Next, we’ll import the json file in Runscope
If everything goes well, Runscope will import the tests including any defined environments.
You can select the appropriate environment and select an appropriate location to run the tests from.
You’ll notice that variables are converted into “Initial variables” for an environment and referenced in request header/body where required. These variables can also be set in javascript to use a dynamic value everytime a test runs. See Dynamic Request Data for more info.
Finally, save and run the tests to see the results. If the backend API is up and running, you should see a ✅ along with the assertions.
And that’s all for now 🎉.
HttpRider is open source so please try it out. There is a sample included in the project to quickly load a few APIs running against httpbin.org.