Karate API Test Automation
Karate API Test Automation
This tutorial will teach you how to develop feature files for CRUD operations using the 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
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 system’s state. Get cannot create or modify the state or create side effects, etc.
Update
In most cases, a PUT request is used to update a 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:
More information on the tool: