API Testing
API Testing Introduction

API Testing

APIGit provides API testing by creating a group of test cases. Each test case is a sequence of Test Actions. Two types of test actions are currently supported: Http request action and js code execution action. By defining these test actions, you are simulating a real business access to your application servers.

  • Http request action

Form based http request builder

The Form based http request builder lets you easily define a HTTP request (API) to your application server. It includes query parameters, headers, authorization, body. For our backend sandbox, we leverage axios to execute this HTTP request.

Pre-Request script

A Pre-Request script is a block of JS scripts that is executed before sending the http request. So in this script, you have the last chance to manipulate the HTTP request (req).

Post-Request Test script

Post-Request Test script is executed after the response received from http request or the request is failed. You will use this script to deeply validate the response in your expectations.

  • JS Code action

A JS code action is a block of JS code that is executed in the testing sequence. You can use it to do initialization or execute any complex logic you like between two API requests.