{"id":16435,"date":"2016-05-20T15:18:48","date_gmt":"2016-05-20T08:18:48","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=16435"},"modified":"2019-02-14T17:34:01","modified_gmt":"2019-02-15T01:34:01","slug":"troubleshooting-an-http-archive-based-load-test-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/troubleshooting-an-http-archive-based-load-test-2\/","title":{"rendered":"Troubleshooting an HTTP archive-based load test"},"content":{"rendered":"<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt\"><span style=\"color: #333333\">Did you know that you can use the cloud-based load testing service in VSTS to create and run load tests using HTTP archive (.har) files? The feature preview is available now. To learn more, see <\/span><a title=\"Feature Preview: Creating load tests using HTTP archive\" href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/05\/20\/feature-preview-creating-load-tests-using-http-archive\/\"><span style=\"text-decoration: underline;color: blue\">this link<\/span><\/a><span style=\"color: #333333\">.<\/span><\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">This blog post covers how to troubleshoot any request failures that may be happening in your test.<\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">As you run a load test, requests are sent to your application, in the specified sequence in your web-scenario. Ideally, you want a clean run, with all requests passing. However, requests may fail because of issues in your app or in your test. The load test results view offers two tabs to help you with identifying these errors: the &#8216;Diagnostics&#8217; tab and the &#8216;Logs&#8217; tab.<\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">The &#8216;Diagnostics&#8217; tab\u00a0provides insights into any test errors and important status messages from the load test service that may have\u00a0occurred during the load test run. For failing requests, you can see the Error, the specific error subtype, the # of times the failure occurred, etc.<\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/DiagnosticsTab.png\"><img decoding=\"async\" class=\"alignnone size-mediumlarge wp-image-16445\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/05\/DiagnosticsTab-500x137.png\" alt=\"DiagnosticsTab\" width=\"500\" height=\"137\" \/><\/a><\/p>\n<p style=\"margin-top: 0pt;margin-bottom: 18pt;font-family: Georgia;font-size: 12.0pt\"><span style=\"color: #333333\">The &#8216;Logs&#8217; tab gives you access to logs from all the load generating agents. If requests in your test are failing, these logs will help you figure out what went wrong. The test logs are available in HTTP Archive (.har) format &#8211; the very same format that you used to record the user scenario and create the test! You can download these logs and view them in a HAR viewer such as<\/span> <a href=\"http:\/\/www.telerik.com\/fiddler\"><span style=\"color: blue\">Fiddler<\/span><\/a><span style=\"color: #454545\">, <\/span><a href=\"https:\/\/toolbox.googleapps.com\/apps\/har_analyzer\/\"><span style=\"color: blue\">HAR Analyzer<\/span><\/a><span style=\"color: #454545\"> or any other viewer that you like. <\/span>Y<span style=\"color: #454545\">ou can then inspect the details of each request and it&#8217;s response to troubleshoot any failures in your test. <\/span><\/p>\n<p style=\"margin-top: 0pt;margin-bottom: 18pt;font-family: Georgia;font-size: 12.0pt;color: #454545\">The following screenshot shows how you can import the log in Fiddler.<\/p>\n<p style=\"margin-top: 0pt;margin-bottom: 18pt;font-family: Georgia;font-size: 12.0pt;color: #454545\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/FiddlerImport.png\"><img decoding=\"async\" class=\"alignnone size-mediumlarge wp-image-16455\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/05\/FiddlerImport-500x279.png\" alt=\"FiddlerImport\" width=\"500\" height=\"279\" \/><\/a><\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 14.0pt;color: #333333\"><span id=\"ExportTest\" style=\"text-decoration: underline\">Exporting test to Visual Studio<\/span><\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">Sometimes one or more requests will fail every single time they are executed. If you have eliminated the obvious possible causes (correctness of the URL, the target URL not being reachable or any application issues), requests may be failing because the application uses dynamic parameters in these requests, whose values are generated fresh every time the target is accessed. Information such as session ID, cookies, values set in hidden fields such as ASP.NET VIEWSTATE, etc. are such examples. When you create a test using an HTTP archive, the following cases are automatically handled when the test is executed:<\/p>\n<ol>\n<li style=\"margin: 0in;font-family: Georgia;font-size: 12.0pt;color: #454545\">Dynamic parameter values set in cookies.<\/li>\n<li style=\"margin: 0in;font-family: Georgia;font-size: 12.0pt;color: #454545\">Dynamic parameter values set in hidden fields, such as ASP.NET VIEWSTATE and EVENTVALIDATION.<\/li>\n<\/ol>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">Dynamic parameters may also appear elsewhere in requests such as query string or form post parameters. Extraction and handling of such cases is currently not supported. If you find that your test fails because of this reason, you can fix the test by exporting to Visual Studio.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/ExportToVS.png\"><img decoding=\"async\" class=\"alignnone size-mediumlarge wp-image-16465\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/05\/ExportToVS-500x212.png\" alt=\"ExportToVS\" width=\"500\" height=\"212\" \/><\/a><\/p>\n<p style=\"margin: 0in;line-height: 18pt;font-family: Georgia;font-size: 12.0pt;color: #333333\">This will download a Visual Studio load test project with the necessary web performance test and load test for your application. You can learn more about how to fix dynamic parameters using Visual Studio, on <a href=\"https:\/\/msdn.microsoft.com\/library\/ff460245(v=vs.140).aspx\">this page<\/a>.\u00a0Sean Lumley&#8217;s <a href=\"https:\/\/blogs.msdn.microsoft.com\/slumley\/2007\/04\/10\/how-to-debug-a-web-test\/\">blog post<\/a> has a detailed example of how dynamic parameters can be identified by inspecting the test and test results.<\/p>\n<p style=\"margin: 0in;font-family: Georgia;font-size: 14.0pt;color: #454545\"><span style=\"text-decoration: underline\">FAQ<\/span><\/p>\n<ul>\n<li style=\"margin: 0in;font-family: Georgia;font-size: 12.0pt;color: #454545\">I want to see what&#8217;s possible in Visual Studio after I export the test, but I don\u2019t have Visual Studio Enterprise.<\/li>\n<\/ul>\n<p style=\"margin: 0in;margin-left: .375in;font-family: Georgia;font-size: 12.0pt\"><span style=\"color: #454545\">&gt;&gt; You can use Visual Studio Enterprise Trial for 90 days. Using the Enterprise trial, you can still run cloud-load tests. See <\/span><a title=\"Trying out the cloud load testing service using Visual Studio Enterprise trial\" href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/05\/09\/trying-out-the-cloud-load-testing-service-using-visual-studio-enterprise-trial\/\"><span style=\"color: blue\">this blog<\/span><\/a><span style=\"color: #454545\"> for details.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you know that you can use the cloud-based load testing service in VSTS to create and run load tests using HTTP archive (.har) files? The feature preview is available now. To learn more, see this link. This blog post covers how to troubleshoot any request failures that may be happening in your test. As [&hellip;]<\/p>\n","protected":false},"author":86,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,252],"tags":[],"class_list":["post-16435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>Did you know that you can use the cloud-based load testing service in VSTS to create and run load tests using HTTP archive (.har) files? The feature preview is available now. To learn more, see this link. This blog post covers how to troubleshoot any request failures that may be happening in your test. As [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/16435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=16435"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/16435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=16435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=16435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=16435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}