You are here

You are here

The API test frenzy: Mix it up for a better testing strategy

Antony Edwards CTO , Eggplant

In our hyper-connected, complex digital world, APIs are the glue that allow disparate platforms, apps, and software to connect and share data. Organizations need to unlock the power of APIs as a pillar of digital transformation strategies. 

As the API economy continues to gather steam, the resulting global API testing market is predicted to grow 20% annually, from $384 million in 2016 to $1.1 billion by 2022.

As a result, there's been a frenzy of interest in API testing tools, with many testers rushing to purchase the latest and greatest products in the hope that all their testing challenges will be resolved. However, testers need to stop thinking that one type of testing replaces the other.

In reality, what is needed in today's digital world is to deploy a mix of API and UI testing. So, rather than fueling the battle between code and experience, testers need to think about how to do both.

Why API testing is in the spotlight

API testing is increasingly important as organizations try to monitor the user experience at the service level as well as through the application—all in the name of accelerating digital transformation.

API testing improves the performance of both software development and the applications themselves, saving valuable development time, which is key for organizations as they strive for continuous delivery.

With the increased use of microservices, API testing is essential because testers need to ensure that those services behave as expected—via the API—and that they're delivering the right experience from the user's perspective.

With the surge in API growth, automated API testing is essential; however, it can't replace testing the UI. The rise in serverless apps will help swing the pendulum back from API testing toward app testing, as more and more of the logic from the back end will now be in the app and thus invisible to API testing.

For testers, the key to success is the ability to seamlessly combine UI and API testing to do end-to-end testing and really test modern apps, which turn microservices via APIs into digital experiences.

Integrating API testing into test automation strategies

To integrate API testing into test automation strategies, as described by Martin Fowler and others, testers need to think initially about the software architecture and then work out the resulting test strategy. The test strategy should encompass these four key areas:

  • Functionality: Does it work?
  • Performance and load testing: How does it work?
  • Usability: How do users want it to work?
  • Security: Is it secure?

Then, crucially, you need to test at two levels: the component and the product, where it all comes together. API testing is great at testing at the component level, but it can't test the actual user experience of the app.

As more intelligence moves into apps and they become more complex and dynamic, testing will become increasingly important. For example, the components you purchase from a website could be different from the components someone else purchases from the same site. Due to the complexity, you can't assume that if you test in isolation that everything will work together.

Another way to look at this is to think about a car: It's essential to test the individual components such as the tires, airbags, and engine. But it's also vital to take the car on the road to see how everything works together in a variety of different situations before someone buys it and drives it at high speed.

The API reality

With the rapid growth of the API economy, API testing is absolutely essential, but it doesn't give you a complete view and, critically, it can't test the actual user experience of the app. So API testing may be the current flavor of the month—but it can't be done at the expense of testing the user experience.

Testers need to stop thinking about an either/or approach and take a holistic view that tests individual components and the overall experience of the app. This will ensure that testing supports and delivers digital experiences that delight.

API testing is neither a placebo nor a panacea, but a vital vitamin that will help keep your applications healthy.

Keep learning

Read more articles about: App Dev & TestingTesting