Runscope API Monitoring    Learn More →

2014 Year in Review: Thank You

By John Sheehan on .

As we complete another lap around the sun, I thought it would be fun to look back at the past year and recap some of the highlights. This was a big year for our little company. The team tripled in size, we raised another round of funding, and usage of Runscope Radar took off faster than any of us thought possible.

The only word that really sums up how I feel about 2014 is grateful. I'm grateful to the team that I get to work with everyday for all the hard work they put in, and how much they make me laugh. Most importantly though, I'm grateful to our customers who inspire and push us to build better tools so they can focus on what they do best: bringing value to their organizations through code. On behalf of our entire team, thank you for making us a part of your toolset.

To round out this recap, here are a few of our favorite posts and announcements from the past year.

Company Milestones

Our Favorite Product Updates

Community Projects

How Tos

Conference Fun

Looking Ahead to 2015 - Join Us!

The roadmap is full of exciting things for the upcoming year. Runscope is growing fast and we need you to help us achieve our big goals. If you love building tools and enabling developers to build better applications, we'd love for you to join us

Categories: announcements, community, product


API Tests Level Up: Automated Browser Test Steps with Ghost Inspector

By John Sheehan on .

Ghost Inspector is a cloud-based browser testing service. In addition to letting you quickly create UI tests for your websites without writing any code, Ghost Inspector is also integrated with Runscope so you can add UI test steps to your automated API tests.

Browser Test, Meet API Test

So, what are some use cases that intersect UI and API testing? For an API that integrates into web applications, there are a multitude. Combining Runscope with Ghost Inspector can help create end-to-end test coverage, from the backend to the front end, and all of the interactions in between.

A great example at this intersection is OAuth. Runscope is already capable of testing OAuth protected services by fetching access tokens programmatically; however, for 3-legged flows, where the end-user is directed to the OAuth provider for credentials and scope/permission, a browser testing tool is best suited because that authorization interface is designed for humans, not machines.

Walkthrough: Testing an OAuth API From End-to-End

By combining the capabilities of Runscope and Ghost Inspector, we are now able to perform comprehensive end-to-end application and API integration testing and monitoring. Lets go ahead and create a sample test that will perform the following tasks:

1.  Test the UI of an OAuth sign in process using Ghost Inspector

2.  Using the authorization code from the previous step, test the OAuth API by exchanging the auth code for an access token using Runscope

3.  Using the access token from the previous step, test the actual API by fetching protected user resource information using Runscope

We’re going to use the GitHub API for this example. Many of you are familiar with GitHub, and their API is well documented. 

Creating a Ghost Inspector Test

Ghost Inspector supports two ways for creating tests:

  • Manually - you provide the starting URL and define each test step by hand
  • Automatically - using a Chrome extension, a live web session is recorded and all test steps are automatically imported into Ghost Inspector

For this example, we’ll build our UI test manually, which is much easier than it sounds. Our test will cover signing in to a web application using GitHub credentials. We’ve stood up a simple web application that handles the OAuth sign in process. Lets begin with the steps for creating our Ghost Inspector UI test:

1.  Sign up for Ghost Inspector. Create a free account and sign in.

2.  Create a Test Suite, which is similar to a Runscope bucket.

3.  Create a new test. We’ll name the test, “BabyUnicornMagic Sign In with GitHub”, set the start URL to the front page of the web app, and use a blank test template, because we’ll be adding our own steps. 

4.  Add the steps. After the test is created, click on the Add Steps button. We’re going to add five steps to our Ghost Inspector test. These steps will take care of singing into the web app with our GitHub credentials.

Ghost Inspector uses CSS selectors to identify elements to interact with on a page. Recent versions of Chrome or Firefox can help to extract the unique CSS selector values from the DOM. Simply right-click on the element and choose “Inspect Element”. From within the inspector, right mouse-click again on the highlighted element, and choose “Copy CSS Path” in Chrome, or “Copy Unique Selector” in Firefox.

Each test step in the screenshot above contains a CSS selector. Step #1 clicks on a sign in link, which initiates the authorization flow. By the time we reach Step #2, the Ghost Inspector browser will be on the GitHub login page -- this step, and Step #3 instruct the Ghost Inspector to populate the login form with our GitHub username and password. Step #4 submits the form. Step #5, our last step, will click on the “Authorize” button that is displayed the first time our GitHub account approves this app. On subsequent test runs, GitHub will skip this step -- thus, we’ll make this step optional.

5.  Save the authorization code by stopping the Ghost Inspector test. We’re going to add a Network Filter to our test, instructing the Ghost Inspector browser not to follow the auth code redirect URL. This will preserve the code for later use.

At the bottom of the Ghost Inspector test editor, click the Add Filter button. We paste the app’s OAuth redirect URL in this field.

Run the Ghost Inspector Test, Watch the Video

And that completes our first Ghost Inspector UI test! After it's saved, we run the test by clicking Execute Test. The test will take 5 to 10 seconds to complete. Every Ghost Inspector test run is video recorded, revealing every test step, from text inputs, mouse clicks to page transitions. Below is an actual video of our test run:

Integrate Ghost Inspector With Runscope

Now we’re going to set up the Runscope Radar API test that will integrate the Ghost Inspector test we just finished creating above:

1.  Connect Ghost Inspector to Runscope with an Integration. Adding the Ghost Inspector integration is simple -- just click on Integrations from the Radar menu, then click Connect Ghost Inspector from the list of services.

2.  Create a new Radar test; add the Ghost Inspector test. Now that we've connected Ghost Inspector to Runscope, a new button is available in our Runscope Radar test editor: Add a Ghost Inspector Test. When we click that button, our Ghost Inspector test suites and respective tests appear. Lets select the new UI test we've just created.

3.  Extract the authorization token from the Ghost Inspector test. Recall earlier that in Ghost Inspector, we configured the test to stop right before the auth token exchange. We use JavaScript to extract the authorization code and store it in the variable {{auth_code}}.

4.  Test the OAuth API access token generator. The next step in our test plan will exchange the authorization token for an access token. Below we configure the request to the GitHub OAuth API. Both {{client_id}} and {{client_secret}} are defined as Initial Variables. We also extract the access token into the variable {{access_token}}.

babyunicorn_access_token.png

5.  Test a protected resource API method. With the newly minted access token, we'll test the API method to fetch the email addresses associated with the authenticated GitHub user account. Lets also set up an assertion that validates the account's email address.

babyunicorn_testemail.png

Runscope + Ghost Inspector = Better Software

That's just one example of how Runscope and Ghost Inspector can help to build more comprehensive tests that span the API as well as the application that integrates with the API. On their own, both Runscope and Ghost Inspector are very poweful tools for automatically monitoring, testing and debugging APIs and web applications, respectively. However, these tools combined provide you with a new dimension of holistic test coverage, resulting in better software for your users.

If you have any questions or need any help, drop us a line. Our support team is always ready to help.



Categories: announcements, code samples, howto, ghost inspector, testing


Get a Snapshot of Recent Test Performance with the New Runscope Radar Overview

By Neil Mansilla on .

A new feature that we recently launched is the Runscope Radar Overview -- a high-level overview page with a series of reports on individual test performance. The overview includes:

  • Success ratio (tests passed/performed) over last day, week and month
  • Results graph for the most recent tests performed
  • Request performance (latency)
  • HTTP response code graph
radar_overview.png

The default view for every Radar test includes these reports. Simply click on any of your test names from the Runscope Radar page. This report highlights data for individual tests only.

Runscope Radar Overview are available to all customers. If you need help understanding these reports, drop us a line. Our support team is always ready to help.

Categories: testing, monitoring, product, howto


On Thanksgiving, We “Pause” to Give Thanks and Introduce Runscope Radar Support for Pauses Between Steps

By Neil Mansilla on .

Today, in the US, we are celebrating Thanksgiving. On this day, it is customary for people to express what they are grateful for, such as good health, great friends, certain members of the family, on-call support team members, etc. The Runscope team would like to give thanks to our wonderful community of developers, ops engineers and testers for your use and support of Runscope.

We'd also like to announce that as of today, pauses are supported in Runscope Radar tests. Pauses are a new test step that allow you to insert delays between steps in your test plan. You can add as many pauses as you need, with each ranging from 1 to 180 seconds.

A typical scenario for inserting a pause between requests is when request A executes asynchronous tasks with a predictable completion time (e.g. generating a very large report), and request B depends on the completion of request A’s background tasks (e.g. retrieving newly generated report and making assertions). Above, we inserted a 15 second pause between the two requests. Actual pause times may not be exact, but they are guaranteed to be at least the amount of time specified.

For more information, see the Test Steps Editor documentation, or just head over to your Runscope Radar test editor where you’ll find the new Add Pause button. If you need help with pauses, send us a note. Happy Thanksgiving!

Categories: announcements, product, testing, monitoring


Continuous Integration, Deployment and Testing of Your Web APIs with AppVeyor and Runscope on Azure

By Neil Mansilla on .

Runscope developer advocate Darrel Miller shares a step-by-step instructional blog post on how to integrate AppVeyor (CI tool on Azure) with Runscope to accomplish rock-solid API testing.

Photo by Alex Eylar: https://www.flickr.com/photos/hoyvinmayvin/4906678960/

Photo by Alex Eylar: https://www.flickr.com/photos/hoyvinmayvin/4906678960/

Fast iterations can be very valuable to the software development process, but make for more time spent doing deployments and testing. Also, more deployments means more opportunities to accidentally introduce breaking changes into your API.

AppVeyor is a cloud based continuous integration server and Runscope enables you to do integration testing of your Web APIs, when these services are combined they can save you time doing the mechanical stuff and ensure your API consumers stay happy.

The following steps show the key points to achieve this integration using AppVeyor, Runscope and Azure websites.

Read the rest of Darrel's post...

 

Categories: howto, apis, testing


Introducing the On-Premises Runscope Gateway Agent for Capturing and Debugging Private and Internal API Traffic

By Neil Mansilla on .

Back in September, we introduced Runscope Radar Agent, an on-premises testing agent that you download and install on a host within your network. The remote agent appears along side Runscope's global cloud-based testing locations, allowing tests to be executed against APIs behind your firewall, or even those running on the same localhost. Radar Agent has been a huge success, and we're excited to extend the hybrid on-premises deployment model to another key area of Runscope.

Today, we’re announcing the release of the Runscope Gateway Agent. The same gateway software that powers Runscope's cloud infrastructure for making and logging API calls can now be installed on your local network. Deploying the Runscope Gateway Agent within your infrastructure will help to:

  • Capture API request and response data made to private or internal APIs that reside behind a firewall
  • Troubleshoot and debug those API calls using the Runscope Traffic Inspector
  • Increase network performance by keeping API traffic within your infrastructure
  • Create Runscope URLs (on your domain name) for services running on localhost
  • Access APIs that require a fixed client IP address (IP whitelisting)

How it Works

The agent works by creating a locally-hosted instance of the Runscope Gateway with your own hostname and TLS certificate. Instead of using our cloud-based Runscope Gateways (hosted on *.runscope.net), requests will use the configured hostname for your agent instead.

runscope-gateway-agent.png

Inspecting traffic with the Runscope Gateway Agent uses a hybrid on-premises approach. The agent runs on a host within your infrastructure, but traffic data is stored in the Runscope cloud to make searching and collaboration easier. Traffic collected with the agent is available in the Traffic Inspector along with all other traffic made in the same bucket.

All communication from the agent to the Runscope cloud is made securely over outbound requests to the Runscope API via HTTPS on port 443. See Firewall Considerations for more information.

How to Get Started

Use of the Runscope Gateway Agent requires a Trial, Starter, Team, Business or Enterprise subscription. The agent is available for Mac OS X, Windows (64/32-bit) and Linux (64/32-bit). For complete download and implementation instructions, see the Gateway Agent documentation.

Categories: announcements, product, testing, debugging

Runscope 25 Kearny St San Francisco, CA, 94108 United States

Everything is going to be 200 OK®