Request Simulation
To simulate an Rest request in Hostbox
- Select a Rest type Hostbox Collection.
- Create a request and navigate to the request.
- Configure the request providing data like
body, method
etc. as required. - Start the Hostbox.
Example :
We will simulate an E-Commerce request which have following request & response body :
//Request Body
{
"productId": "1000",
"productName": "iphone 15",
"company": "Apple",
"price": "85000"
}
//Response Body
{
"cartId": "CR230",
"message": "Added Successfully"
}
Execute Rest Request
To test a Rest Hostbox request:
- Copy the URL of the desired Rest request within the Hostbox.
- Go to the API module and Paste the Hostbox request's URL.
- Provide any required data (body, method parameters, headers etc).
- Send the request.
- Compare the actual response to the expected response.
- Make sure to start the Hostbox after simulating a request.
- Now follow above steps and execute this above simulated request in API module. User will get simulated response body as response after request execution.
Repeat these steps for different requests within the Hostbox to thoroughly test your Rest APIs efficiently.