Software testing by Unify

API Testing

What is API testing?

An API (Application Program Interface) is a way of communicating with applications using their intended language, defined as a contract. For a RESTful service, this would be a Swagger document and for a SOAP service, this would be a WSDL.

The difference between API testing and other forms of testing, is that you don’t get an interactive UI to provide inputs and outputs. API testing tools such as Postman or SoapUI provide the capability to write and execute tests for API’s.

Why should you test your APIs

The common reasons for testing your API’s are:

  • Provide confidence in intended functionality.
  • Validate functionality across browsers and operating systems.
  • Detect probable user errors.
  • Ensure endpoints can handle the load.
  • Tester is able to execute more negative tests than if they were running tests via the User Interface.
  • As API’s are developed before the User Interface, automation tests for API’s can be created and executed earlier in the development lifecycle.

 

Developing a solid automated API testing strategy is an efficient way to validate your applications are still working as intended. API testing allows you to build a solid structure and plan to identify defects at multiple levels of your application. The API tests can then be integrated into an automated workflow / pipeline and run continuously.

There are many forms of API testing, here are some of the methods we commonly perform:

 

Contract Testing

  • The validation that the API contract is written correctly and can be consumed by the end user.
  • Ensure the contract is written to specifications.
  • Confirm endpoints are valid.

 

Component Testing

  • Testing against response and request payloads to ensure they are formatted correctly.
  • Validating that response statues are appropriate and correct, such as HTTP response or SQL sets.
  • Confirm that API errors are correct with the appropriate messages.
  • Check the application responds in the expected time.

 

 

Scenario Testing

  • Review requirements and stories to identify correct API calls are being made.
  • Capture traffic and review requests and responses.
  • Ensure scenarios are realistic and are getting correct responses.

 

Performance Testing

  • Review SLAs to create acceptance criteria for performance testing.
  • Build API performance tests that can be built upon.
  • Execute performance testing and build reports based on results.
  • Identify appropriate cloud infrastructure for load testing if necessary.
  • Find more information on our Performance Testing Services here

 

Get in touch with us today to discuss your requirements.

+44 (0)114 399 2820

[email protected]

Get in touch