Site icon TestingDocs.com

CRUD Operations API Test Automation with Karate

Overview

In this tutorial, we will learn how to develop Feature files for CRUD Operations using Karate API Testing Tool. The APIs under test are Mantis Bug Tracker Rest APIs.

Refer to Mantis API Guide:

https://www.testingdocs.com/mantisbt-rest-api-guide/

What are CRUD Operations?

From the API Testing perspective, CRUD Operations are basic actions on web resources that we can map to standard HTTP verbs. CRUD stands for Create, Read, Update and Delete. In this tutorial, we will use the Karate API Testing tool.

The mapping of the actions to the HTTP verbs are as follows:

Create

The POST request is generally used to create a resource on the server-side or to modify the state of the system. The POST request would have a request body with parameters defining the resource.

Post feature in Karate

https://www.testingdocs.com/test-post-api-request-with-karate-framework/

Read

The GET request is used to retrieve server side resource information or the state of the system. Get cannot create or modify the state or create side effects, etc on the system.

Update

In most cases, PUT request is used to update the server side resource. However, it can also be used to create a resource. PATCH is used to update a resource using partial information.

Delete

Delete request is used to delete the resource on the server side. This is a destructive API call.

Restful Architecture is beyond the basic CRUD.  For more information on the Rest Architecture:

https://en.wikipedia.org/wiki/HATEOAS

Karate Automation Tutorials

Karate tool tutorials on this website can be found at:

https://www.testingdocs.com/karate-automation-tool-tutorials/

Exit mobile version