Skip to content

Instantly share code, notes, and snippets.

@pacodelacruz
Last active August 11, 2016 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pacodelacruz/4fcf1a4d4887980ab7e0c396d8b7844d to your computer and use it in GitHub Desktop.
Save pacodelacruz/4fcf1a4d4887980ab7e0c396d8b7844d to your computer and use it in GitHub Desktop.
Azure App Insights Web Test for Web Job Health Monitoring
<WebTest Name="My Web Job Health Monitor" Id="aaa239ee-097b-46cd-8890-2ae7a05edbbb" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="120" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
<Items>
<Request Method="GET" Guid="aaa5ae9c-35c3-c677-a930-27c90877dbbb" Version="1.1" Url="https://pacodelacruz-webapp.scm.azurewebsites.net/api/triggeredwebjobs/mywebjob/" ThinkTime="0" Timeout="120" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="200" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Authorization" Value="Basic BAs3643nc0D3dS3Cr3T0k3n0123456789BAs3643nc0D3dS3Cr3T0k3n0123456789BAs3643nc0D3dS3Cr3T0k3nBAs3643nc0D3dS3" />
</Headers>
</Request>
</Items>
<ValidationRules>
<ValidationRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ValidationRuleFindText, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" DisplayName="Find Text" Description="Verifies the existence of the specified text in the response." Level="High" ExecutionOrder="BeforeDependents">
<RuleParameters>
<RuleParameter Name="FindText" Value="&quot;status&quot;:&quot;(Success|Running)&quot;" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="UseRegularExpression" Value="True" />
<RuleParameter Name="PassIfTextFound" Value="True" />
</RuleParameters>
</ValidationRule>
<ValidationRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ValidationRuleFindText, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" DisplayName="Find Text" Description="Verifies the existence of the specified text in the response." Level="High" ExecutionOrder="BeforeDependents">
<RuleParameters>
<RuleParameter Name="FindText" Value="&quot;duration&quot;:&quot;00:0" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="UseRegularExpression" Value="True" />
<RuleParameter Name="PassIfTextFound" Value="True" />
</RuleParameters>
</ValidationRule>
</ValidationRules>
</WebTest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment