Create Runscope Tests Instantly with New Import Test Feature: Support for Swagger, Postman Collection and HAR Files
At Runscope, we build our products to help any developer anywhere solve API problems. As businesses rely more and more on APIs, and the applications that APIs serve are becoming even more complex, developers must depend on an increasing number of API tools to maximize efficiency and ensure API health. We’re dedicated to making Runscope an even more efficient tool in your arsenal.
We are excited to announce that this week, we’ve made it even easier to create tests to discover and debug API issues with a new Import Test feature. Now, you can take the work you’ve done with API tools like Swagger and Postman and instantly turn them into Runscope tests, all with just a few clicks. This new feature supports Swagger definitions (JSON and YAML), Postman collections (JSON export), HTTP Archive (HAR) format, VCR Cassette format and Fiddler (via HAR export).
We’ve seen a significant rise in the popularity of RESTful API schemas, in particular Swagger, to easily and more clearly define APIs and leverage tools such as documentation and client library generators. For synchronous debugging, many developers have installed apps like Postman to test API calls on a local machine. Browsers themselves have also evolved into useful API debugging tools with the support of the HTTP Archive (HAR) file format that allows developers to record every request behind a browser session. API monitoring and deep testing like Runscope is no exception. We believe that all of these tools that are easy to use independently should be just as easy to use together.
Read on to see how to use the new Import Test feature in Runscope for Swagger, Postman and HAR files, and be sure to watch the full screencast below.
Importing a Swagger Definition into Runscope
If your team has decided to use Swagger, there’s a good chance you selected that format because of its numerous supporting tools for documentation and quick-start server implementations. Now you can add automated testing and monitoring to that list of tools with Runscope. (Runscope supports Swagger version 2.0, and more information about migrating from Swagger 1.1/1.2 to 2.0 can be found here).
This import feature can potentially save you hours of manually entering every method from your API, instead taking less than five minutes. When you import a Swagger definition, a new test is created for every method you’ve defined, automatically and with just a few clicks. Runscope reads the structure of the API as you’ve defined in Swagger along with all of its parameters, host names, etc., handling much of the initial heavy lifting for you around setting up tests. You can import Swagger definitions into Runscope in just two steps.
Step 1: Go to the Import Test page.
Step 2: Select Swagger from the list of formats, then choose the Swagger definition file from your computer, and finally click the Import Requests button. Runscope will quickly validate the schema and then create a new test with a series of requests that mirror the methods defined in your Swagger file.
For a full walk-through, watch the screencast below.
Importing Postman Collections into Runscope
If you’re using the Chrome extension Postman to synchronously test APIs on your local machine, you can now import a Postman collection directly into a Runscope test for automated testing in the cloud. You can import Postman collections in just three easy steps.
Step 1: In Postman, go to the collection you wish to export, then find and click the share icon.
Step 2: Download the Postman collection JSON file.
Step 3: Import the Postman collection file into Runscope.
When the import is complete, a new test is created with a series of request steps that will closely resemble the Postman collection, including header and parameter values. Note that assertions will not be imported as of this initial feature release.
Importing Other Formats into Runscope, Including HAR, VCR Cassettes and Fiddler
You can also import several other formats such as HTTP Archive (HAR), VCR Cassettes and Fiddler in a similar way to importing Swagger definitions and Postman collections. In each case, every import will create a new test, and each request within the imported file format will be an individual request step in the new test.
Have a Swagger definition for an API you'd like to start monitoring? Get started with Runscope for free.