Creating an Application Insights URL Ping Test for a POST Request
Sunday, April 17, 2016
Application Insights makes it easy to set up a ping test to monitor the availability of any web page. By default, it only supports creating a URL ping test for GET requests. In this article we'll look at how to create one for a POST request.
Generating a Visual Studio Web Test (.webtest) File
Application Insights supports uploading multi-step web tests using a .webtest file. Web can upload one that contains a web test for our POST request.
.webtest files are created by Visual Studio Enterprise and Visual Studio Test Professional. But what happens if we don't own these tools? It turns out that Fiddler from Telerik is capable of generating a .webtest file.
To do this, open up Fiddler and use the Composer tab to create a POST request:
Execute the request. It should appear in the window on the left.
Select the request and go to File -> Export Sessions -> Selected Sessions. A list of file types appear, select Visual Studio Web Test:
Save the file.
Creating a Multi-step Test in Application Insights
In the Azure Portal, locate an Application Insights account and add a Web Test.
Now set up a web test as we normally would, except we'll select a Multi-step test and upload the .webtest file we created.
Wait a few minutes for the test results to flow in!
Application Insights makes it easy to set up a ping test to monitor the availability of any web page. By default, it only supports creating a URL ping test for GET requests. In this article we'll look at how to create one for a POST request.
Generating a Visual Studio Web Test (.webtest) File
Application Insights supports uploading multi-step web tests using a .webtest file. Web can upload one that contains a web test for our POST request.
.webtest files are created by Visual Studio Enterprise and Visual Studio Test Professional. But what happens if we don't own these tools? It turns out that Fiddler from Telerik is capable of generating a .webtest file.
To do this, open up Fiddler and use the Composer tab to create a POST request:
Execute the request. It should appear in the window on the left.
Select the request and go to File -> Export Sessions -> Selected Sessions. A list of file types appear, select Visual Studio Web Test:
Save the file.
Creating a Multi-step Test in Application Insights
In the Azure Portal, locate an Application Insights account and add a Web Test.
Now set up a web test as we normally would, except we'll select a Multi-step test and upload the .webtest file we created.
Wait a few minutes for the test results to flow in!