API Testing with Axios Framework :: Part-1

Writing script using POM

Open IntellIJ

If you don’t have IntellIJ, then download the community version from here

Start a new project with Gradle.

You can also start with maven, but here I am showing the process using Gradle. Actually, … Read more

Export Collection: Way 1

Now click on the [โ€ฆ] button besides your collection

Click on Share collection

Click on “Get public link” button

Then you will get a link. This link you can share with anybody and h/she can import … Read more

CSV data set config

Now we will bulk register customers by reading from a CSV file

Create a file in bin folder named “customers.csv”

Prepare customers.csv file like that:

Now, Right click on Simple Controller and click on Add > Read more

Calling API by parameter

Now we will call a GET API having parameters in its path

Add another HTTP Request

Set following configuration:

protocol[http]: https
Server Name or IP: customer-test-api.herokuapp.com
Port Number: 443
Method: POST
Path: /customer/api/v1/get/101

Here, 101 is … Read more

Calling POST API

Add another HTTP request. Right-click on Thread Group and go to
Add > Sampler > HTTP Request

Set following configuration:

protocol[http]: https
Server Name or IP: customer-test-api.herokuapp.com
Port Number: 443
Method: POST
Path: /customer/api/v1/login

Now, go to … Read more

We will automate the following API’s:

https://customer-test-api.herokuapp.com/customer/api/v1/login
https://customer-test-api.herokuapp.com/customer/api/v1/list
https://customer-test-api.herokuapp.com/customer/api/v1/get/110
https://customer-test-api.herokuapp.com/customer/api/v1/create
https://customer-test-api.herokuapp.com/customer/api/v1/update/110
https://customer-test-api.herokuapp.com/customer/api/v1/delete/110

Create Workspace

From workspace menu, click on “New Workspace” and give workspace name.

Click on Create workspace button. You will see new workspace has been created and showing … Read more