Solve API problems fast with Runscope. Learn More →

Harness the Power of PUT & POST: Fully Automate Your Workflow with the Updated Runscope API

By Stephen Huenneke on .

At Runscope, we don’t just love helping developers solve API problems—we’re passionate about APIs across the board. We built Runscope so that you can test any API, from REST to SOAP to everything in between, successfully. Internally, we rely on more than 60 APIs and microservices to power our infrastructure. It’s with that passion that we’ve been working on some major additions to the Runscope API in response to the valuable feedback that you’ve provided about how you want to use Runscope in your organizations.

Today we’re excited to announce the official release of the newly improved and updated Runscope API. This update allows you to fully integrate Runscope into your workflow, and manage tests, environments and schedules programmatically.

The Runscope API is available to all Runscope customers, and you can access your API keys in your Runscope profile under Applications. The updated API gives you the power of Runscope at your fingertips, providing you with complete control over API test automation and management. 

Building a Better Runscope with Your Feedback

We’ve had the Runscope API available to customers since we launched Runscope in 2013, and Runscope has come a long way since then. The original Runscope API was read-only and built as a way to upload custom recorded traffic, and gather test result data and information about your teams, which served the Runscope product well at the time.

However, today’s Runscope looks much different than it did two years ago: You can now reuse API tests across multiple environments, test APIs from locations around the world, import tests from Swagger definitions, run browser tests in parallel, integrate with Slack and Datadog, plus so much more. We wanted our API to be just as robust, if not more so, than Runscope itself.  

Our focus has always been on the feedback you’ve given us that relates to your most pressing needs. For the most part, these requests have included tooling around novel and advanced configurations, as well as broader monitoring and testing capabilities across locations and environments. With these cornerstone features in place, we've been able to round out the Runscope API’s functionality after months of work and testing behind the scenes to provide you with a fuller, richer API that powerfully extends your ability to use Runscope across any use case in parity with the web interface.

What’s New: Test Automation and Management at Your Fingertips

The Runscope API has been updated to include nearly every capability you have in the Runscope UI, plus several major new features to help you work quickly across teams with less hassle. The API is RESTful and communicates with JSON-formatted data. By leveraging the updated Runscope API, you can mold Runscope to your unique needs without having to traverse the UI, along with the following key additional features:

  • Automate: Streamline operations and save hours of work by programmatically creating and auto-generating complex tests across multiple APIs and services.  

  • Write in bulk: Solve large-scale test management pains with the ability to create and delete multiple tests at the same time. You can also leverage the search and replace function to find and remove pieces of a test fast.

  • Import: Save hours of work you’ve already done building API definitions with schemas like Swagger and instantly turn them into Runscope tests.

  • Modify: In one easy step, modify entire tests, environments and schedules faster than ever.

  • Streamline: Build advanced tests with ease by adding condition steps, pauses and integrations with browser tests in Ghost Inspector.

  • Integrate with CI and CD: Connect Runscope tests and schedules seamlessly into your continuous integration (CI) and continuous deployment (CD) processes. Implement chained requests and trigger URLs so that your CI process not only kicks off a test, but also updates the test before it begins.

  • Store: Protect your work by backing up your data and storing it through the API.

Check out the Runscope API docs to learn how you can implement all of the above functionality in your organization. If you are already familiar with Runscope, then the docs will be a breeze to look through.

Sample Apps and More to Get You Started

In our API sample app repo, there are two Python apps we’ve built off the Runscope API that you can use immediately that showcase the simplicity of writing and backing up tests. We've also created an API Explorer in which you can tinker and make live API calls instantly. We’ll continue to add more apps for you, and we encourage you to build your own and tell us about it!

1. Create Tests

We’ve made building new API tests a snap via the updated Runscope API. With this app, you can learn how to create tests programmatically without having to go into the Runscope Dashboard UI. This app has a couple of sample tests in JSON that you can import directly into your Runscope account to run immediately.

2. Backup Tests

You’ve spent the time and effort creating robust tests for the variety of use cases and APIs in your stack—wouldn’t it be great if you could download and back them up? With the new Tests resource, you can fetch test configurations and store them outside of Runscope itself. This functionality gives you more flexibility for managing your tests.

This app traverses all of your buckets, fetches every test and saves them in time-stamped buckets. Take a snapshot of a representation of your tests for backup and versioning, and use the Runscope API to POST a copy to a new test, or PUT an update over an existing test.

3. Runscope API Explorer

If you’re the hands-on type of developer who likes to tinker and read the docs later, try out the Runscope API Explorer. Traverse through the resources and methods, and when you’re ready, just go through the OAuth flow and start making live API calls.

NOTE: There are several API methods that can overwrite and delete your existing test configurations. We highly recommend that you use a sandbox account or create a sandbox bucket while you’re learning to use the API and building/testing apps. In fact, maybe it’s a good time to use the sample app above and backup all of your test and environment configuration data!

Take It for a Spin

We are committed to producing more sample apps that showcase the power of the Runscope API, and we want to see what you build with it too! The Runscope API is available to anyone who uses Runscope, and you can sign up for free in just a few seconds. Did you build a cool tool that you’d like to share with the Runscope community? Tell us about it in the comments below so we can showcase it on the blog, or add to our GitHub repo of examples.

Categories: apis, announcements, continuous integration, integrations, product

Democratizing QA: How Automated Testing Tools Empower Teams

By Patrick McKenna on .

We’re excited to have Patrick McKenna, Global Head of Product Engineering at Kurtosys, discuss the evolution of QA with the Runscope community.

Sometimes I wonder how quality assurance (QA) got this bad. Humanity's engineering achievements are nothing short of mind blowing. Buildings that reach the stars, tunnels bored under cities, bridges that span seas. But when it comes to software that doesn't break, quite frankly, we suck.

If you agree with me, the chances are you feel the situation is not getting any better. If you're an engineer, you probably feel like you don't test your software well enough. If you are a product manager, you likely feel like in the time it takes for you to explain how to test your software, you could have just done it yourself. If you run QA, you probably feel that people don't understand what you do or really value it, but gosh, is it hard! And as a CEO, you probably feel like your team doesn’t do enough QA because the last release had an embarrassing bug that showed up during your VC pitch.

If any of that rings true, then welcome to the club. The bottom line: QA is hard, and it is mostly because, up until now, much of the tooling out there has sucked. However, things changed drastically for us when we began relying on both API testing and UI testing solutions that are so easy to use, anyone from a developer to a business person can take them for a spin.

QA-ing Our QA Processes

Not long ago, the best QA solution was to throw people at the problem; pay an offshore outfit bags of cash to write a custom Selenium framework for your app, which unfortunately ceases to be useful the moment you discontinue the contract because, guess what? Maintaining 1,100 Selenium tests is impossible for anyone but a gang of offshore QA guys.

Two years ago, we replaced our monolith system with a microservices stack. We got into trouble pretty fast with integration issues—services at the core would change and everything else would break because of response differences and so forth. The unit tests on the core would pass, but those tests didn't cover all the ways that other services were interacting with them. As a result, sometimes the platform remained broken until someone manually tested it or another service was rebuilt. Sometimes defects went undetected for longer than you would typically like them to, making pinpointing those issues time-consuming.

We realized pretty quickly that the best people to contribute integration tests for a service are the people who depend on them—which isn’t necessarily the people who historically write the tests. We also understood that integration tests need to run constantly, not just at build time in the dev environment, but also at runtime in prod. As the platform grew and was used in ways we didn’t anticipate, defects would appear. Our users became the one mutagenic factor that the build server couldn't truly account for.

Decentralizing QA with Runscope and Ghost Inspector

This notion of democratizing the test capability started to germinate with us. We wanted to empower anyone in our company to write tests, especially the people on our team who maybe didn’t know how to code, but worked very closely with our clients. We started using Selenium and Postman, but the learning curve was too great and they lacked an easy framework for continually running and contributing to the corpus of services we have in our stack.

Once we signed up for Runscope for API testing and Ghost Inspector for browser and UI testing, they quickly bridged this gap for us. At the danger of this sounding liking a puff piece, I have to say that they are incredibly usable pieces of software that let you write functional tests and integration tests for your web app in an absolutely delightful way. I honestly love their software.

However, the victory for us though is how both Runscope and Ghost Inspector have changed the face of QA in our company. We are beginning to grow what I believe is a QA culture, in which people's feelings of dread and malaise around QA are now replaced with feelings of empowerment—even our chairman writes Ghost Inspector tests now!

Ghost Inspector is instrumental here because it allows us to observe the exact experience that a user would have visiting a site or app because of its video capability. Knowing something failed is one thing, but having a recorded video of the failure case, plus browser logs, is quite another. We also use Runscope heavily to monitor our APIs because it gives us probes that we couldn’t easily achieve in any other way.

Cutting through Complexity

When I think about what this all means to me, I'm reminded of something Kent Beck once said, something along the lines of, “Writing software without tests makes me anxious ... and I don't think software developers deserve to feel anxious about their jobs." When you boil down what we do as technologists, we try to make cool stuff that makes people’s lives better and absolutely, positively, never ever breaks. Trouble is, sometimes that last part is a whole lot more consuming than the first, and that's a bummer.

So I guess I'm here to report that QA might be easier than you think nowadays. With tools like Runscope and Ghost Inspector, you can all do it. While you are on the couch, on the way to work, in the shower (well, maybe not in the shower).

Categories: testing, microservices, customers, ghost inspector

How to Leverage Runscope Environments & Streamline Collaboration in Your Organization

By Ashley Waxman on .

Our recent environments feature release represents the biggest foundational change to the Runscope product in more than a year. Runscope environments is a big step directly aimed at responding to the most reported requests for improving the management of API tests across your teams and supporting continuous integration and deployment workflows. By allowing you to seamlessly reuse API tests across multiple environments, our latest feature streamlines collaboration within your entire organization, from infrastructure to development to engineering to product teams.

In the video below, Neil Mansilla, VP of Developer Relations at Runscope, demonstrates how to create and schedule API tests leveraging Runscope environments. This video covers:

  • How to create API tests for different environments, from local dev to staging to production

  • Multiple use cases for how you can benefit from API monitoring

  • In-depth demo of the Runscope suite of API tools

Let us know if you have questions or feedback about our latest release. You can try out Runscope environments for yourself by signing up for free.

Categories: howto, product, continuous integration

Build Runscope Tests into Your Continuous Integration Process with Jenkins Plugin

By Neil Mansilla on .

Continuous Integration (CI) processes allow software developers to detect problems early in the development lifecycle and improve productivity with automation. Jenkins is a popular open-source continuous integration solution that helps teams manage the automation of software builds, as well as monitor the execution of external jobs that support the software build. For many companies, APIs are integral parts of multiple steps in the development process. We’re pleased to announce the new Runscope plugin for Jenkins, which allows you to synchronously execute a Runscope test from your Jenkins CI project.

This new plugin allows you to add a Runscope test as a build step into your Jenkins build pipeline. The plugin will trigger a specific API test via a trigger URL and wait for the test to complete. If the test passes, the build steps will continue. If the test fails, the build will be marked as failed.

The Runscope plugin for Jenkins is particularly useful for testing a newly built and deployed API. Your code-level unit and integration tests may have passed, but by implementing Runscope tests into your build pipeline, you can be certain that your API is operating correctly at the runtime perspective—at every build and test stage.

Install the Runscope Plugin in Jenkins

The Runscope plugin is now part of the Jenkins hosted plugin repository, which makes installation a snap. From the Jenkins dashboard, navigate to the plugin manager by clicking Manage Jenkins, then Manage Plugins. On the plugin manager, click the tab labeled Available and you will find the Runscope plugin on the list. Check the box and click the Install button.

If you do not see the Runscope plugin, update the list of available plugins by clicking the Check Now button. If it still isn’t showing up, check your list of installed plugins—you might have it already.

Add a Runscope Test to Your CI Process

Open up one of your Jenkins projects, and click Configure. In the build section, click the Add Build Step drop-down and select Runscope Test Configuration. This adds a new build step to your project and presents you with the following fields.

Get the Trigger URL from the Environment editor in your Runscope dashboard. Navigate to the test that you want to execute in this Jenkins build step and select the environment that corresponds to appropriate deployment realm.

The access token is obtained by creating an application for Runscope. Applications allow you to make calls to the Runscope API—you don’t need to actually code an application to generate an access token, you just need to create an instance of one in your Runscope account.

The Timeout field is the maximum number of seconds that the plugin will wait for the Runscope test to complete. Start with a high number, like 120 (2 minutes), to reduce the chance of network-induced false positives (e.g., network slowness occurring between your CI, Runscope and staging environment). Adjust this value according to the length of time your API test typically runs, but note that a timeout condition will flag this build as broken.

CI Success with API Testing

We’d love to hear your feedback on how the Jenkins plugin is working for you. If you use a different CI tool or built your own Runscope integration, let us know in the comments! For more information on integrating API testing into the CI process, read how companies like uShip are seeing huge time savings and efficiency gains with Runscope and CI. Sign up for Runscope for free to experience the benefits for yourself.

Categories: community, apis, api ecosystem, howto

Everything is going to be 200 OK