Alexander Marek
Alexander Marek

Reputation: 479

Application Insights Availability tests fails on 200 OK with "System.UriFormatException: Invalid URI: The format of the URI could not be determined."

I am just trying out Application Insights availability tests. I let them run over night to our public website and got only "fails"

When I drill in to the separate test runs, I see that the server responded with "200 OK", sending the expected html markup. But in "Exceptins" it says

System.UriFormatException: Invalid URI: The format of the URI could not be determined.System.UriFormatException: Invalid URI: The format of the URI could not be determined.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at Microsoft.VisualStudio.TestTools.WebTesting.HtmlDocument.ParseForDependentRequests(Boolean urlsOnly)
   at Microsoft.VisualStudio.TestTools.WebStress.WebTestCaseVariation.BuildDependentRequestsList(WebTestInstrumentedTransaction instrumentedTransaction)
   at Microsoft.VisualStudio.TestTools.WebStress.WebTestCaseVariation.AddParsedDependentRequests(ExecutionState executionState)

this is what I see in azure portal

Does anyone have an idea what's going on there? What am I missing?

Upvotes: 4

Views: 940

Answers (1)

ZakiMa
ZakiMa

Reputation: 6241

Most likely this exception occurs when webtest engine tries to parse dependent requests information to validate resources. Either webtest incorrectly parses dependency resource or web page contains an invalid reference.

WebTest should give a better error explaining to which resource it is complaining.

To workaround this problem (if it is acceptable) - you can disable "Parse dependent requests" option (see below). Note - webtest will not be testing dependent resources.

enter image description here

Upvotes: 5

Related Questions