ASP.Net Web API Testing

Web API Testing
we created our first simple Web API project. Now we will learn how to test Web API locally to check request & response during development. We can use the following third party tools for testing Web API.

  1. Fiddler
  2. Postman

Fiddler
Fiddler is a free debugging proxy for any browser. We can use it to compose and execute different HTTP requests to our Web API and check HTTP response.

Let's see how to use Fiddler to send an HTTP request to our local Web API and check the response
Step1
Download and install Fiddler
Step2
After successful installation click on Fiddler.exe to open Fiddler. It will look like the image below
Step3
Click on Composer tab. First tab in the Composer tab is Parsed tab where we can configure HTTP requests and execute it. The first dropdown includes all HTTP Methods. Select a particular HTTP method for the request you want to execute. Here, we will select GET to execute HTTP GET request as shown below

Double click on the result row above to open Inspector tab for the request as shown below



Postman
Postman is a free API debugging tool. You can install it on your Chrome browser or Mac. Install it for Chrome from here.

After successful installation, open it and select HTTP Method and enter the URL of your Web API as shown below

Click on the Send button to send an HTTP request to the provided URL. The response is displayed below


Comments

Popular posts from this blog

Email Sending through O365 using OAuth Protocol

IISRESET vs App Pool Recycling ?

Deploy .Net6.0 Web api with docker