CRUD Operations API Test Automation with Karate
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:
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 -> Post
- Read -> Get
- Update -> Put/Patch
- Delete -> Delete
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
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.
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 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:
Karate Automation Tutorials
Karate tool tutorials on this website can be found at: