August 19, 2019

What do we mean by 360 Degree API Testing and Monitoring?

API Testing

Continuous testing means testing our APIs both pre-production and post-production (shift right testing). Testing doesn’t stop once we hit production. An API going down can have a dramatic effect on your site and its functionality, so real continuous API testing has to include API Monitoring.

Table of Contents: 

 

What is continuous API testing?

Continuous API testing means testing your API’s both pre-production and post-production continuously. Real continuous API testing must also include API Monitoring.

 

Historically, testing would take place only at the GUI level, and only at the end of the development process. When a developer would finish their work they would hand it off to the QA team. The engineers had limited time so they would test the code at the highest level - the GUI. This would cover both the frontend and backend development.

 

In the age of Agile, testing must take place at a lower level, i.e at the API level. Developers can even do it themselves. API testing, because of “API contracts” can even be created before development is complete. This means developers can validate their code based on pre-written tests (aka Test Driven Development).

 

Continuous API Testing and Monitoring with BlazeMeter

 

With BlazeMeter’s new Continuous Testing functionality, you can test and monitor your APIs throughout the entire SDLC. I’ll talk you through how to do it.

 

Continuous API Testing and Monitoring with BlazeMeter

 

3 Easy ways to run API Tests in BlazeMeter

 

There are several easy ways to create an API Test with BlazeMeter

 

1. you can simply create it within the UI

 

Continuous API Testing with BlazeMeter UI

 

2. Toggle to add your own script in Taurus

 

API Testing with Taurus

 

3. Or you can import from file types like JMeter and Swagger

 

API Test with Swagger

Now these tests can be data driven, if we look at the scenario level in the next screenshot data can be imported from a CSV file and variables can be defined at a scenario level to be used by all of the tests within the scenario.

 

API Test with JMeter

Now we click Run Test.

 

Running API Tests in BlazeMeter

You can see all your API test results here. You can also see more detailed reporting.

API Reporting

We can also look for the content of the response to validate that the data is correct within the API Test.

 

API Monitoring within BlazeMeter

 

Having an API down can be devastating to your business. We need to be able to understand not only “Is the API down” but also, is the vendor sticking to the SLA they supplied to us.

 

We don’t always have access to the 3rd party infrastructure, so we need a way to be alerted if that third-party API is no longer available.

 

We can check this in the API Monitoring screen of the BlazeMeter platform.

 

API Monitoring with BlazeMeter

 

You can click on the test itself within the application to look at the output.

 

API Monitoring with BlazeMeter

 

Here we sent a request, got back a “200”, and we can see the details of the response, both for passed or failed API tests, as in the example below.

 

BlazeMeter API Monitoring

 

You can also enable the scheduler to easily run API Monitoring tests on a specific API at regular intervals.

 

Easy API Monitoring for Developers

 

BlazeMeter’s API Monitoring feature provides access to enterprise level reporting, so that you can continuously monitor and track and multiple reports, that can then easily be shared with other users in your workspace.

 

Enterprise API Monitoring

 

These reports show:

  • Average response rate
  • Success rate
  • You can change the time frame to adjust the view
  • You can also drill into the failures to better understand what the problem was.

 

Enterprise API Monitoring

  • You can connect the monitoring features to your daily workflow solutions to be notified if an API goes down.

 

Current integrations include:

  • Slack
  • Pagerduty
  • AWS CodePipeline
  • Datadog
  • Hipchat
  • Ghost Inspector
  • Jenkins

 

Summary of Continuous API Testing and Monitoring

An API first strategy requires a strong testing pipeline. Continuous API testing needs an intentional process that makes sure all the systems work together.  Breaking down the testing process into three phases; writing good tests, running tests both pre and post-production and API monitoring allows you to continuously test your APIs.  Ensuring your apps are always on and performing at their best. 

START TESTING NOW