Member-only story

API Testing 101: HTTP Verbs And How To Test Them

John Ferguson Smart
5 min readFeb 1, 2023

--

APIs are everywhere in modern applications, and for a modern software tester, API testing is a must-have, and these days REST is the most commonly used type of API out there.

But many testers, especially those new to API testing, overlook the intent behind the HTTP verbs used in the API architecture.

See, developers don’t always use the correct or consistent HTTP verbs in their APIs. And this can lead to trouble later on, with subtle bugs or APIs that don’t scale well.

In short, semantics are something worth checking, and something you should question critially as a tester whenever you reveiw a new API.

What’s an HTTP Verb?

HTTP verbs are the foundation of RESTful APIs and play a crucial role in determining the intent and function of each API endpoint.

For example, imagine you have an API for your customer database. You might have several endpoints to create a new customer, retrieve customer information, update customer details, and delete a customer.

The HTTP verb used with each endpoint conveys its intent and function, with common verbs such as GET, POST, PUT, and DELETE being used to perform common actions like retrieving data, creating new data, updating data, and deleting data respectively.

--

--

John Ferguson Smart
John Ferguson Smart

Written by John Ferguson Smart

Author of BDD in Action and founder of the Serenity Dojo (https://www.serenity-dojo.com), John is a well-known expert in agile software testing and automation.

Responses (1)

Write a response