How Do You Ensure API Quality? 👌
IDC has identified $20 trillion of market opportunity, or 25% of global GDP, to be realized over the next five years. CEOs see the path to capturing this opportunity as becoming technology centric to deliver new customer experiences.*
Analysts, IBM, and other vendors frequently discuss Speed to market as a key business driver for the API Economy. There is tremendous pressure on business to deliver more and faster. But historically, delivering more faster drives down quality. Businesses are not going to win customers or expand their market if they deliver inferior quality offerings. So, ensuring quality while allowing for “more, faster” is imperative. The question is, how?
Faster and Higher Quality — Both are Required 💨
The same techniques that support quality of central applications are not going to work as we allow for higher speed application delivery by multiple audiences, particularly where some audiences may not be in our organization or company. Our first notification of a problem must not be a contact from an angry API consumer!
We need to be sure that:
- APIs are fully tested before they are promoted to production
- APIs calls are completing successfully
- APIs are returning valid results
- Any API issues (performance, quality, etc.) are raised to our internal team quickly — before clients are calling!
- We know what is wrong to help resolve the issue.
To allow for faster delivery and support these quality requirements we need to automate the process for test and monitoring of APIs as much as possible.
So how? 🤔
IBM is providing an API Connect Test and Monitor solution to address these needs.
To ensure quality with API testing, the API definition (e.g. OpenAPI) is used to generate test cases — no code required. This supports the need to execute comprehensive tests quickly. Rather than the API developer manually creating a set of test situations, the automatic generation of tests based on the API interface can provide a more comprehensive test suite. And, because this is generated automatically with no code required, the time and effort to generate the tests is minimal.
The tests are saved in a test suite and run periodically (see monitoring below). In addition to testing to ensure the API responds successfully, the API results that are returned can also be tested to ensure they are as expected and that the performance of the API call is also within expectations.
API monitoring is used to execute the tests periodically to ensure the APIs continue to work properly and provide expected results. Test execution can be scheduled and automated to run as often as required. Any issues can trigger a notification to the appropriate team members to ensure they are aware of the issues before consumers start calling.
Why is this necessary? If you complete the testing successfully and do not change the API, shouldn’t it continue to work successfully? Well, it should, but it may not. The API calls back-end systems. What if someone makes a change to the back-end? What if the back-end system is down? The API may start to fail or return incorrect results. Proper change controls should catch these type of issues, but in the new high-speed development world, this may not always occur. Periodic monitoring can catch this situation and head off an outage or unhappy consumer.
As API adoption as an application development approach becomes more prevalent, in addition to using your company’s APIs your developers may also use third-party APIs. API Connect Test and Monitor can also be used to ensure the quality of third-party APIs so that you can react in case your own API or a third-party API is not functioning properly and diagnose the problem.
As business offerings are built on your APIs, the availability of these offerings is critical. API failures become lost business — which is simply unacceptable.
- IDC MaturityScape Benchmark: Digital Transformation Worldwide, 2017
Stay Ahead 📈
Start free-forever here: ibm.biz/apitest
We hope you found value in this article. Please let us know in the comments what you would like to see next time!
Made with ❤️ from the IBM API Connect team.