Why API Testing is More Relevant Today

First, I wanted to share some thoughts on why is API testing more relevant today? And if you think about UI automation vs. the API testing. When it comes to UI automation, there are a lot of moving parts. You have a browser; you actually have a driver like web driver in the Selenium world and API testing simplifies things to a trade deal. Karate and the API testing tool directly make calls to the service gets the response back. Typically, in most cases JSON. And this is the most important part of API testing. The assertion sparked. As I keep saying, automation is easy, but testing is not. And I see many teams fall into this trap where they just make an API call and then do a check for 200 Okay, and that's not good enough. You need to be validating all the data that's coming back from your business logic encapsulated in your web service or the REST API.

There are a lot I can say about the comparison between UI automation and API testing, and as I hinted at earlier, there are a lot more moving parts when it comes to UI automation. You have the browser, you have JavaScript, single page applications are quite complex. And there's a whole set of aspects in which API testing is known to be simpler, faster. You can run tests in parallel. You don't need a UI, you can easily run tests in the cloud, and there's a lot on the slide. I won't go through all of this in detail, but I really wanted to set some context as to why you should care more about API testing. And I still think teams don't value API testing enough.

There are misconceptions. Some teams feel that API testing is harder, which is not the case, and a good tool can actually make API testing easier and simpler. And there are reasons why API testing is not discussed more. One of the reasons is that tools like Selenium have been around for 20 plus years. They have a critical mass in the system. It's easier for people to reason about user interfaces and things that you can touch and feel. And sometimes I feel the backend, the stuff that's headless, doesn't get enough attention as it deserves.

I also want to talk about why API testing is more relevant today? I think we all know we are living in kind of a microservices or a API era like API monetization and the EPA economy. These are terms that we really encounter a lot more often today. And one of the aspects that made API is really prevalent is the fact that if you have a computer that needs to talk to another computer that maybe halfway across the world, it's very easy to have an HTTP connection all the way, right? HTTP something all corporate firewalls, for example, have rules to allow HTTP or his HTTP as access. And it's a very easy and probably the most effective way to surface or to reuse business logic across an enterprise or beyond an enterprise where end users and consumers can actually call APIs.

Comments are closed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}