<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>VSTS Load Test Team Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/vstsloadtestblog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:27:29 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Web Services Testing</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/web-services-testing</link>
      <pubDate>Fri, 22 Sep 2006 00:16:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/09/22/web-services-testing/</guid>
      <description><![CDATA[Visual Studio 2005 web tests could be effectively used to test the web services too. However there...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-ALIGN: center" align=center>Visual Studio 2005 web tests could be effectively used to test the web services too. However there are some key points which one should keep in mind for writing those web service tests. Let us go through them and see what they are:</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">To begin:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">We should have a web test project at hand. Right-click on the test, and select “Add Web Service Request” from the context menu.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">The URL property of the newly added web service request should point to the asmx file of the web service which you wish to test.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">e.g. <A href="https://www.w3shools.com/webservices/tempconvert.asmx">https://www.w3shools.com/webservices/tempconvert.asmx</A></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">SOAPAction Header:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">The SOAPAction header must be added to the web service request. This is a hint to the servers that the HTTP POST contains SOAP request and the value of the header is the URI indicating the intent of the SOAP request. </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">e.g. SOAPAction = <A href="https://tempuri.org/CelsiusToFahrenheit">https://tempuri.org/CelsiusToFahrenheit</A></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">This could be selecting “Add Header” from the context menu of the web service request. Then set the “Name” property as “SOAPAction” and the value as URI of the web service function to be invoked.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">String Body:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">This is the actual body of the SOAP request and is basically a SOAP envelop which looks something like:</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'">&lt;?xml version="1.0" encoding="utf-8"?&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'">&lt;soap:Envelope xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/"&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;soap:Body&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&lt;CelsiusToFahrenheit xmlns="https://tempuri.org/"&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;Celsius&gt;<B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">value to be sent</I></B>&lt;/Celsius&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>&lt;/CelsiusToFahrenheit&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: 'Courier New'"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>&lt;/soap:Body&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: 0.25in"><SPAN style="FONT-FAMILY: 'Courier New'">&lt;/soap:Envelope&gt;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">The Content type of the String body should be kept as: text/xml.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">NOTE: </P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">This SOAP envelope and the SOAPAction header are dependant on the web service in question and could be easily obtained by visiting the URL of the web service provider.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">We may need to send some arguments to the invoked web service, which could be hard coded in to the String body of the web service request or we may intend to use some context parameter for the purpose, which is actually a better way of doing the things as it would aid in:</LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list 1.0in"><SPAN style="mso-list: Ignore">a.)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Ease of changing the value.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo2; tab-stops: list 1.0in"><SPAN style="mso-list: Ignore">b.)<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp; </SPAN></SPAN>Data driving the whole web service test.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">The name of the context parameter should be used inside double braces.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">e.g. {{param-name}}</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">Validation Rules:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">The pre-canned validation rules provided with the web tests are not good enough for validating the web service tests, as they are designed to work with the HTML documents whereas the web services (SOAP) responses are XML documents. So we have to write our custom validation rules for the web services validation.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">Following are the steps to write a custom validation rule:</P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">Derive your new validation rule from the base class ValidationRule.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">Provide the read-only RuleName and RuleDescription properties.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">All public properties of your validation rule would be available for interaction in the UI for adding validation rules.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">Override the Validate method of the base class providing your implementation of validations.</LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">For example, to validate the content of a particular tag in SOAP response we may have validation rule of the sort:</LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">CustomValidateTag</SPAN> : <SPAN style="COLOR: teal">ValidationRule<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleName<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Validate TagContent"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleDescription<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Validates whether tag in question contains the intended value"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">string</SPAN> TagNameValue;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> TagName<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> TagNameValue; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">set</SPAN> { TagNameValue = <SPAN style="COLOR: blue">value</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">string</SPAN> IntendedTagValue;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> IntendedValue<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> IntendedTagValue; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">set</SPAN> { IntendedTagValue = <SPAN style="COLOR: blue">value</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> Validate(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">ValidationEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.IsValid = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XmlNodeList</SPAN> nodes<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>= e.Response.XmlDocument.GetElementsByTagName(TagName);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (nodes.Count &gt; 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.IsValid = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">XmlNode</SPAN> node <SPAN style="COLOR: blue">in</SPAN> nodes)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!<SPAN style="COLOR: blue">string</SPAN>.Equals(node.Value, IntendedValue,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 1in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="COLOR: teal">StringComparison</SPAN>.InvariantCultureIgnoreCase))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.IsValid = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">break</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// If the validation fails, set the error text that the user sees<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!e.IsValid)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Message = <SPAN style="COLOR: teal">String</SPAN>.Format(<SPAN style="COLOR: maroon">"{0} Tag does not contain {1}"</SPAN>,TagName,IntendedValue);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<OL style="MARGIN-TOP: 0in" type=1 start=6>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in">Similarly for validating the absence of “fault code” in the SOAP response the validation rule may look like:</LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; TEXT-INDENT: 0.25in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>public</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">FaultCodeValidaionRule</SPAN> : <SPAN style="COLOR: teal">ValidationRule<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleName<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Fault Code Validation"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleDescription<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Validates if SOAP response contains some fault code"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> Validate(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">ValidationEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> validated = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XmlNodeList</SPAN> faults = e.Response.XmlDocument.GetElementsByTagName(<SPAN style="COLOR: maroon">"soap:Fault"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (faults.Count &gt; 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>validated = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">XmlNode</SPAN> node <SPAN style="COLOR: blue">in</SPAN> faults)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Message = <SPAN style="COLOR: teal">String</SPAN>.Format(<SPAN style="COLOR: maroon">"SOAP Error: "</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">XmlNode</SPAN> child <SPAN style="COLOR: blue">in</SPAN> node.ChildNodes)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Message += <SPAN style="COLOR: teal">String</SPAN>.Format(<SPAN style="COLOR: maroon">"{0}= {1}, "</SPAN>, child.Name, child.InnerText);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.IsValid = validated;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0.25in"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -27pt 0pt 0.25in"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><o:p>&nbsp;</o:p></SPAN></P>
<OL style="MARGIN-TOP: 0in" type=1 start=7>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo3; tab-stops: list .5in"><U>NOTE: while writing validation rules for the SOAP responses we should working with the XML Document in the response object and not the HTML Document, as that would be null.<o:p></o:p></U></LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">5.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">Extraction Rules:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">On the parallel line we shall create custom extraction rules for the web service tests. That would require extending ExtractionRule base class, providing the RuleName, RuleDescription read-only public properties, and overriding the Extract method.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">Here is an example extraction rule which evaluates the given XPath query against the SOAP response.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">EvaluateXPathQuery</SPAN> : <SPAN style="COLOR: teal">ExtractionRule<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleName<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Evaluate XPath Query"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">string</SPAN> RuleDescription<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: maroon">"Evaluates the given XPath Query"</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">string</SPAN> XPathQueryValue;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">string</SPAN> XPathQuery<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> XPathQueryValue; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">set</SPAN> { XPathQueryValue = <SPAN style="COLOR: blue">value</SPAN>; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> Extract(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">ExtractionEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XmlNamespaceManager</SPAN> nsManager<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>= <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">XmlNamespaceManager</SPAN>(e.Response.XmlDocument.NameTable);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>nsManager.AddNamespace(<SPAN style="COLOR: maroon">"soap"</SPAN>, <SPAN style="COLOR: maroon">"https://schemas.xmlsoap.org/soap/envelope/"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XPathNavigator</SPAN> navigator = e.Response.XmlDocument.CreateNavigator();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XmlNode</SPAN> body = e.Response.XmlDocument.SelectSingleNode(<SPAN style="COLOR: maroon">"//soap:Body"</SPAN>, nsManager);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Very first child of soap response envelope's body tag is the response tag.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> responseNameSpace = body.FirstChild.Attributes[<SPAN style="COLOR: maroon">"xmlns"</SPAN>].Value;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (responseNameSpace != <SPAN style="COLOR: blue">null</SPAN> &amp;&amp; responseNameSpace.Length &gt; 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>nsManager.AddNamespace(<SPAN style="COLOR: maroon">"response"</SPAN>, responseNameSpace);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Now prefix temp namespace for every node in the query.<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> index = 0;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> ((index = XPathQuery.IndexOf(<SPAN style="COLOR: maroon">'/'</SPAN>, index)) != -1)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (XPathQuery[index + 1] == <SPAN style="COLOR: maroon">'/'</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>index++;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!XPathQuery.Substring(index + 1, 4).Equals(<SPAN style="COLOR: maroon">"soap"</SPAN>,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 1.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="COLOR: teal">StringComparison</SPAN>.InvariantCultureIgnoreCase))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>XPathQuery = XPathQuery.Insert(index + 1, <SPAN style="COLOR: maroon">"response:"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>++index;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">XPathNodeIterator</SPAN> iterator<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>= navigator.Evaluate(XPathQuery, nsManager) <SPAN style="COLOR: blue">as</SPAN> <SPAN style="COLOR: teal">XPathNodeIterator</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (iterator.Count &gt; 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> val = <SPAN style="COLOR: blue">string</SPAN>.Empty;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> (iterator.MoveNext())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>val += <SPAN style="COLOR: teal">String</SPAN>.Format(<SPAN style="COLOR: maroon">"{0}: {1}"</SPAN>, iterator.Current.Name,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 1.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes">iterator.Current.Value);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Success = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(<SPAN style="COLOR: blue">this</SPAN>.ContextParameterName, val);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Success = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Message = <SPAN style="COLOR: teal">String</SPAN>.Format(<SPAN style="COLOR: teal">CultureInfo</SPAN>.CurrentCulture,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 1.5in; TEXT-INDENT: 0.5in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes">"No result for query: {0}"</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes">, XPathQuery);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0in; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in -0.5in 0pt 0.25in"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 10.0pt; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>}</SPAN><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">6.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">IMPORTANT:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">XPath expressions do not have the concept of a default namespace.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Omitting the prefix from an XPath looks for nodes in the empty namespace, and finds nothing. So we must use an arbitrary prefix for xml namespace in the SOAP response envelope. This namespace is attribute of the Response tag, which is the first child of the soap:Body tag.</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><o:p><SPAN style="TEXT-DECORATION: none">&nbsp;</SPAN></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt"><SPAN style="mso-list: Ignore">7.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><U><SPAN style="FONT-SIZE: 14pt; mso-bidi-font-size: 12.0pt">XPath Query Tools:<o:p></o:p></SPAN></U></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><A href="https://www.stylusstudio.com/xpath_editor.html">https://www.stylusstudio.com/xpath_editor.html</A></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><A href="https://www.freewarefiles.com/program_4_50_14082.html">https://www.freewarefiles.com/program_4_50_14082.html</A></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><A href="https://www.topxml.com/xselerator/">https://www.topxml.com/xselerator/</A></P>]]></content:encoded>
    </item>
    <item>
      <title>Load Test Modeling: How to Simulate User Logon and Execute Tests in a Test Mix</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/load-test-modeling-how-to-simulate-user-logon-and-execute-tests-in-a-test-mix</link>
      <pubDate>Mon, 08 May 2006 20:22:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/05/08/load-test-modeling-how-to-simulate-user-logon-and-execute-tests-in-a-test-mix/</guid>
      <description><![CDATA[Check out this article:
Load Test Modeling: How to Simulate User Logon and Execute Tests in Test...]]></description>
      <content:encoded><![CDATA[<P>Check out this article:</P>
<P><A HREF="/vstsloadtestblog/articles/592814.aspx">Load Test Modeling: How to Simulate User Logon and Execute Tests in Test Mix</A></P>
<P>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Load Test Modeling: How to Simulate User Logon and Execute Tests in a Test Mix</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/load-test-modeling-how-to-simulate-user-logon-and-execute-tests-in-a-test-mix-2</link>
      <pubDate>Mon, 08 May 2006 20:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/05/08/load-test-modeling-how-to-simulate-user-logon-and-execute-tests-in-a-test-mix-2/</guid>
      <description><![CDATA[The following sample shows how to model the common scenario where a user logs on once to a Web...]]></description>
      <content:encoded><![CDATA[<SPAN id=PreviewBody>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="COLOR: black; FONT-FAMILY: Arial">The following sample shows how to model the common scenario where a user logs on once to a Web site and performs a number of tests.&nbsp;</SPAN><SPAN style="FONT-FAMILY: Arial"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p><SPAN style="FONT-FAMILY: Arial">In the sample, t</SPAN>he logon action is definded by a set of login requests. Each Web test contains the same set of login requests plus its own non-login requests.</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial">A&nbsp;“new user” as defined by “Percentage of New Users” under the Load test scenario property always executes Login once and one iteration of a Web test&nbsp;(the non-login section)&nbsp;&nbsp;from the Test Mix. A “return user” always executes Logon&nbsp;once and a random number of Web tests (the non-login sections)&nbsp;from the Test Mix.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p>Modeling&nbsp;can be achieved by using plug-ins or coded web tests .</o:p></SPAN></P><SPAN style="FONT-FAMILY: Arial"><o:p>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">==============================================================================</SPAN></P><SPAN><o:p>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial">A. To do this using plug-ins:<o:p></o:p></SPAN></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Create a new test project.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Add WebRequestPlugin.cs, WebTestPlugin.cs, LoadTestPlugin.cs, VUserInfo.cs and WebTestUserMonitor.cs to the project.<o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Create the web tests. E<SPAN style="FONT-FAMILY: Arial">ach Web test contains the same set of login request(s). i.e</SPAN></SPAN></LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebTest1</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;non-login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial"></SPAN></SPAN>&nbsp;</P><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebTest2</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;non-login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial"></SPAN></SPAN>&nbsp;</P><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebTest3</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;non-login requests</SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial"><SPAN style="FONT-FAMILY: Arial"></SPAN></SPAN>&nbsp;</P></SPAN></SPAN></SPAN></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Suffix the set of login requests.&nbsp;i.e, </SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">If the original set of login requests are</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"></SPAN>&nbsp;</P><SPAN style="FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><A href="https://server/loginRequest1.aspx"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">https://server/loginRequest1.aspx</SPAN></A><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><A href="https://server/loginRequest2.aspx"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">https://server/loginRequest2.aspx</SPAN></A><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">https://server/loginRequest3.aspx<SPAN style="COLOR: #993300"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: #993300; FONT-FAMILY: Arial">...</SPAN><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">https://server/loginRequestN.aspx<SPAN style="COLOR: #993300"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: #993300; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">Login requests after appending suffixes will be</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN>&nbsp;</P><SPAN style="FONT-FAMILY: Arial">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><A href="https://server/loginRequest1.aspx"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">https://server/loginRequest1.aspx</SPAN></A><SPAN style="COLOR: #993300">LoginRequestFirst</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial"><A href="https://server/loginRequest2.aspxLoginRequest"><SPAN style="COLOR: windowtext; TEXT-DECORATION: none; text-underline: none">https://server/loginRequest2.aspx</SPAN></A><SPAN style="COLOR: #993300">LoginRequest</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">https://server/loginRequest3.aspx<SPAN style="COLOR: #993300">LoginRequest<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: #993300; FONT-FAMILY: Arial">...</SPAN><SPAN style="FONT-FAMILY: Arial"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="FONT-FAMILY: Arial">https://server/loginRequestN.aspx<SPAN style="COLOR: #993300">LoginRequestLast<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><SPAN style="COLOR: #993300; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<OL style="MARGIN-TOP: 0in" type=1 start=4>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Add the&nbsp;Web test and request plug-ins to all of your Web tests</SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Add the web tests to a load test scenario</SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Optional. Add the load test plug-in to the load test if you want to output the number of login test executed. You can generate your own report by modifying the Stop() in WebTestUserMonitor class.<o:p></o:p></SPAN></LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><STRONG>WebTestPlugin.cs<o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Microsoft.VisualStudio.TestTools.WebTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestMixPlugins<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">TestPlugin</SPAN> : <SPAN style="COLOR: teal">WebTestPlugin<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> PreWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.PreWebTest(sender, e);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> PostWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.PostWebTest(sender, e);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><STRONG>WebRequestPlugin.cs<o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Microsoft.VisualStudio.TestTools.WebTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestMixPlugins<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">RequestPlugin</SPAN> : <SPAN style="COLOR: teal">WebTestRequestPlugin<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> PreRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.login_PreRequest(sender, e);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">void</SPAN> PostRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = e.WebTest.Context.ContainsKey(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.LOGIN) ? (<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.LOGIN] : <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isLastLoginRequest = e.WebTest.Context.ContainsKey(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.IS_LAST_LOGIN_REQUEST) ? (<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.IS_LAST_LOGIN_REQUEST] : <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// if login = true &amp;&amp; this is the last login request<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (login &amp;&amp; isLastLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.login_PostRequest(sender, e);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">return</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><STRONG>LoadTestPlugin.cs<o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Microsoft.VisualStudio.TestTools.LoadTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestMixPlugins<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">LoadTestPlugin</SPAN> : <SPAN style="COLOR: teal">ILoadTestPlugin</SPAN><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> Initialize(<SPAN style="COLOR: teal">LoadTest</SPAN> loadTest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_loadTest = loadTest;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_loadTest.LoadTestStarting += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>(m_loadTest_LoadTestStarting);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_loadTest.LoadTestFinished += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>(m_loadTest_LoadTestFinished);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">void</SPAN> m_loadTest_LoadTestStarting(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">EventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.Start();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">void</SPAN> m_loadTest_LoadTestFinished(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">EventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.Stop();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">LoadTest</SPAN> m_loadTest;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: Arial">VUserInfo.cs<o:p></o:p></SPAN></B></P><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> System;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> System.Collections.Generic;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> System.Text;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000> TestProject1<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">class</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">VUserInfo<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: green">// This class stores a vuser's information during test execution<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> VUserInfo(</FONT><SPAN style="COLOR: blue">int</SPAN><FONT color=#000000> userId)<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_userId = userId;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_numTestExecuted = 0;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_loginContext = </FONT><SPAN style="COLOR: blue">new</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">Dictionary</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: blue">object</SPAN><FONT color=#000000>&gt;();<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>m_testList = </FONT><SPAN style="COLOR: blue">new</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">List</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>&gt;();<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">int</SPAN><FONT color=#000000> UserId<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">get</SPAN><FONT color=#000000> { </FONT><SPAN style="COLOR: blue">return</SPAN><FONT color=#000000> m_userId; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: green">// Number of tests that have been completed by the user <o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">int</SPAN><FONT color=#000000> NumTestExecuted<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">get</SPAN><FONT color=#000000> { </FONT><SPAN style="COLOR: blue">return</SPAN><FONT color=#000000> m_numTestExecuted; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">set</SPAN><FONT color=#000000> { m_numTestExecuted = </FONT><SPAN style="COLOR: blue">value</SPAN><FONT color=#000000>; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: green">// Web test context needed to issue non-login requests for a return user<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">Dictionary</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: blue">object</SPAN><FONT color=#000000>&gt; LoginContext<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">get</SPAN><FONT color=#000000> { </FONT><SPAN style="COLOR: blue">return</SPAN><FONT color=#000000> m_loginContext; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">set</SPAN><FONT color=#000000> { m_loginContext = </FONT><SPAN style="COLOR: blue">value</SPAN><FONT color=#000000>; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">public</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">List</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>&gt; TestList<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>{<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">get</SPAN><FONT color=#000000> { </FONT><SPAN style="COLOR: blue">return</SPAN><FONT color=#000000> m_testList; }<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p><FONT color=#000000>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">private</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">int</SPAN><FONT color=#000000> m_userId;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">private</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: blue">int</SPAN><FONT color=#000000> m_numTestExecuted;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">private</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">Dictionary</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>, </FONT><SPAN style="COLOR: blue">object</SPAN><FONT color=#000000>&gt; m_loginContext;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></SPAN><SPAN style="COLOR: blue">private</SPAN><FONT color=#000000> </FONT><SPAN style="COLOR: teal">List</SPAN><FONT color=#000000>&lt;</FONT><SPAN style="COLOR: blue">string</SPAN><FONT color=#000000>&gt; m_testList;<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><FONT color=#000000>}<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">&nbsp;&nbsp;&nbsp;&nbsp;</P></SPAN></SPAN></o:p></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><STRONG>WebTestUserMonitor.cs<o:p></o:p></STRONG></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p><STRONG>&nbsp;</STRONG></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.IO;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Microsoft.VisualStudio.TestTools.WebTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestMixPlugins<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> Instance<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> s_instance; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> PreWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> userId = e.WebTest.Context.WebTestUserId;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isNewUser = e.WebTest.Context.IsNewUser;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">lock</SPAN> (s_usersLock)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!s_users.ContainsKey(userId))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users.Add(userId, <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">VUserInfo</SPAN>(userId));<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> numTestExecuted = s_users[userId].NumTestExecuted;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// if this is a new user, enable login<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// if this is a returning user, add the login context needed for the test <o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isNewUser || numTestExecuted == 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>login = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN_CONTEXT, s_users[userId].LoginContext);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN, login);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> PostWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> userId = e.WebTest.Context.WebTestUserId;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> testName = e.WebTest.Name;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">lock</SPAN> (s_usersLock)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].NumTestExecuted++;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].TestList.Add(testName);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (e.WebTest.Context.IsNewUser)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users.Remove(userId);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// save the login context for future usage<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">if</SPAN> ((<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[LOGIN])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].LoginContext = (<SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)e.WebTest.Context[LOGIN_CONTEXT];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = e.WebTest.Context.ContainsKey(LOGIN) ? (<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[LOGIN] : <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (login)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_numOfLoginTest++;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> login_PreRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = e.WebTest.Context.ContainsKey(LOGIN) ? (<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[LOGIN] : <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isFirstLoginRequest = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isLastLoginRequest = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isLoginRequest = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>isFirstLoginRequest = e.Request.Url.Contains(<SPAN style="COLOR: maroon">"LoginRequestFirst"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>isLastLoginRequest = e.Request.Url.Contains(<SPAN style="COLOR: maroon">"LoginRequestLast"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>isLoginRequest = e.Request.Url.Contains(<SPAN style="COLOR: maroon">"LoginRequest"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// remove the suffix from the request<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> endPos = e.Request.Url.IndexOf(<SPAN style="COLOR: maroon">"LoginRequest"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (endPos &gt; 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Request.Url = e.Request.Url.Substring(0, endPos);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (login)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isFirstLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// copy the context before the first login request is issued<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[] contextBeforeLogin = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[e.WebTest.Context.Count];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.CopyTo(contextBeforeLogin, 0);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(CONTEXT_BEFORE_LOGIN, contextBeforeLogin);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isLastLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(IS_LAST_LOGIN_REQUEST, <SPAN style="COLOR: blue">true</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// login is not needed, skip the login requests<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.Instruction = <SPAN style="COLOR: teal">WebTestExecutionInstruction</SPAN>.Skip;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isFirstLoginRequest)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Copy the Login context required for the rest of the test<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> count = ((<SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)e.WebTest.Context[LOGIN_CONTEXT]).Count;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[] loginContext = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[count];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>((<SPAN style="COLOR: teal">ICollection</SPAN>&lt;<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;&gt;)e.WebTest.Context[LOGIN_CONTEXT]).CopyTo(loginContext, 0);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>System.Collections.<SPAN style="COLOR: teal">IEnumerator</SPAN> ienum = loginContext.GetEnumerator();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> (ienum.MoveNext())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair = (<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)ienum.Current;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(keyValuePair.Key, keyValuePair.Value);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> login_PostRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// this is the last login request<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; contextBeforeLogin = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; contextChangedByLogin = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>System.Collections.<SPAN style="COLOR: teal">IEnumerator</SPAN> ienum = ((<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[])e.WebTest.Context[CONTEXT_BEFORE_LOGIN]).GetEnumerator();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> (ienum.MoveNext())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair = (<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)ienum.Current;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>contextBeforeLogin.Add(keyValuePair.Key, keyValuePair.Value);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// compare the contexts before and after login, get the context changed by the login <o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair <SPAN style="COLOR: blue">in</SPAN> e.WebTest.Context)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> key = keyValuePair.Key;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> value1 = keyValuePair.Value;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (contextBeforeLogin.ContainsKey(key))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">object</SPAN> value2 = contextBeforeLogin[key];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (value1.ToString().ToUpper().CompareTo(value2.ToString().ToUpper()) != 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>contextChangedByLogin.Add(key, value1);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>contextChangedByLogin.Add(key, value1);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN_CONTEXT, contextChangedByLogin);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Remove(IS_LAST_LOGIN_REQUEST);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> Start()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">FileInfo</SPAN> file = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">FileInfo</SPAN>(m_logFile);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (file.Exists)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>file.Delete();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> Stop()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">lock</SPAN> (s_usersLock)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">File</SPAN>.AppendAllText(m_logFile, <SPAN style="COLOR: maroon">"Number of login tests executed: "</SPAN> + s_numOfLoginTest.ToString());<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">readonly</SPAN> <SPAN style="COLOR: blue">string</SPAN> LOGIN = <SPAN style="COLOR: maroon">"Login"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">readonly</SPAN> <SPAN style="COLOR: blue">string</SPAN> IS_LAST_LOGIN_REQUEST = <SPAN style="COLOR: maroon">"IsLastLoginRequest"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">string</SPAN> CONTEXT_BEFORE_LOGIN = <SPAN style="COLOR: maroon">"ContextBeforeLogin"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">string</SPAN> LOGIN_CONTEXT = <SPAN style="COLOR: maroon">"LoginContext"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">readonly</SPAN> <SPAN style="COLOR: blue">string</SPAN> m_logFile = <SPAN style="COLOR: maroon">"d:\\result.txt"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">object</SPAN> s_usersLock = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: blue">object</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">int</SPAN> s_numOfLoginTest = 0;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> s_instance = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">int</SPAN>, <SPAN style="COLOR: teal">VUserInfo</SPAN>&gt; s_users = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">int</SPAN>, <SPAN style="COLOR: teal">VUserInfo</SPAN>&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p></o:p></SPAN>&nbsp;</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"></o:p></SPAN></P></o:p></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><o:p><FONT color=#000080 size=2>=====================================================================</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial">B. To do this using coded web tests:<o:p></o:p></SPAN></P>
<OL style="MARGIN-TOP: 0in" type=1>
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Create a new test project.<o:p></o:p></SPAN> 
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Add VUserInfo.cs and WebTestUserMonitor.cs to the project.<o:p></o:p></SPAN> 
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Create the web tests. Each web test should include the same set of login request(s).<o:p></o:p></SPAN> 
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Generate coded Web tests from the existing ones.<o:p></o:p></SPAN> 
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Modify the coded Web tests as suggested in the following code sample.<o:p></o:p></SPAN> 
<LI class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo1; tab-stops: list .5in"><SPAN style="FONT-FAMILY: Arial">Add the coded Web tests to a load test.</SPAN> </LI></OL>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;</SPAN></SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: Arial">WebTestUserMonitor.cs<o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.IO;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Microsoft.VisualStudio.TestTools.WebTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestProject1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> WebTestUserMonitor()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> Instance<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">get</SPAN> { <SPAN style="COLOR: blue">return</SPAN> s_instance; }<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> PreWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> userId = e.WebTest.Context.WebTestUserId;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: green">// Is this a new user<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> isNewUser = e.WebTest.Context.IsNewUser; <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = <SPAN style="COLOR: blue">false</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">lock</SPAN> (s_usersLock)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!s_users.ContainsKey(userId))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users.Add(userId, <SPAN style="COLOR: blue">new</SPAN> VUserInfo(userId));<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> numTestExecuted = s_users[userId].NumTestExecuted;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// If this is a new user, enable login<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// If this is a return user, add the login context needed for the test <o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (isNewUser || numTestExecuted == 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>login = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN_CONTEXT, s_users[userId].LoginContext);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN, login);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">void</SPAN> PostWebTest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostWebTestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> userId = e.WebTest.Context.WebTestUserId;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> testName = e.WebTest.Name;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">lock</SPAN> (s_usersLock)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].NumTestExecuted++;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].TestList.Add(testName);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (e.WebTest.Context.IsNewUser)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users.Remove(userId);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// save the login context for future usage<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: blue">if</SPAN> ((<SPAN style="COLOR: blue">bool</SPAN>)e.WebTest.Context[LOGIN])<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>s_users[userId].LoginContext = (<SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)e.WebTest.Context[LOGIN_CONTEXT];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P></o:p></SPAN>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none">
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p></o:p></SPAN></P><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> login_PreRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PreRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[] contextBeforeLogin = <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[e.WebTest.Context.Count];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Get a copy of the context before the login request is issued<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.CopyTo(contextBeforeLogin, 0);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(CONTEXT_BEFORE_LOGIN, contextBeforeLogin);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">void</SPAN> login_PostRequest(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">PostRequestEventArgs</SPAN> e)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; contextBeforeLogin = <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; contextChangedByLogin = <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>System.Collections.<SPAN style="COLOR: teal">IEnumerator</SPAN> ienum = <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>((<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>,<SPAN style="COLOR: blue">object</SPAN>&gt;[])e.WebTest.Context[CONTEXT_BEFORE_LOGIN]).GetEnumerator();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> (ienum.MoveNext())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair = <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>(<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)ienum.Current;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>contextBeforeLogin.Add(keyValuePair.Key, keyValuePair.Value);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Compare the contexts before and after login, and<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// get the context changed by the login <o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair <SPAN style="COLOR: blue">in</SPAN> e.WebTest.Context)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> key = keyValuePair.Key;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> value1 = keyValuePair.Value;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (contextBeforeLogin.ContainsKey(key))<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> value2 = contextBeforeLogin[key];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (value1.ToString().ToUpper().CompareTo(value2.ToString().ToUpper()) != 0)<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>contextChangedByLogin.Add(key, value1);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>contextChangedByLogin.Add(key, value1);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>e.WebTest.Context.Add(LOGIN_CONTEXT, contextChangedByLogin);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">string</SPAN> CONTEXT_BEFORE_LOGIN = <SPAN style="COLOR: maroon">"ContextBeforeLogin"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">string</SPAN> LOGIN_CONTEXT = <SPAN style="COLOR: maroon">"LoginContext"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">string</SPAN> LOGIN = <SPAN style="COLOR: maroon">"Login"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: blue">object</SPAN> s_usersLock = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: blue">object</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN> s_instance = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">int</SPAN>, VUserInfo&gt; s_users = <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">int</SPAN>, VUserInfo&gt;();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}</SPAN><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: Arial">WebTestCoded.cs<o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">namespace</SPAN><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> TestProject1<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> System;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> System.Collections.Generic;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> System.Text;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> TestMixPlugins;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> Microsoft.VisualStudio.TestTools.WebTesting;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">using</SPAN> Microsoft.VisualStudio.TestTools.WebTesting.Rules;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">class</SPAN> <SPAN style="COLOR: teal">WebTest2Coded</SPAN> : <SPAN style="COLOR: teal">WebTest<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> WebTest2Coded()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.PreAuthenticate = <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//---------------------------------------<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Modification 1<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//---------------------------------------<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Add the following two lines to your coded web test<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.PreWebTest += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">PreWebTestEventArgs</SPAN>&gt;(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.PreWebTest);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">this</SPAN>.PostWebTest += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">PostWebTestEventArgs</SPAN>&gt;(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.Instance.PostWebTest);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">public</SPAN> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: teal">IEnumerator</SPAN>&lt;<SPAN style="COLOR: teal">WebTestRequest</SPAN>&gt; GetRequestEnumerator()<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//---------------------------------------<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Modification 2 - Login Section<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//---------------------------------------<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">bool</SPAN> login = Context.ContainsKey(<SPAN style="COLOR: maroon">"Login"</SPAN>) ? (<SPAN style="COLOR: blue">bool</SPAN>)Context[<SPAN style="COLOR: maroon">"Login"</SPAN>] : <SPAN style="COLOR: blue">true</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Incorporate the following if-else block into the login section<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (login) <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: teal">WebTestRequest</SPAN> loginRequest = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestRequest</SPAN>(<SPAN style="COLOR: maroon">"https://server/site/login.aspx"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">ExtractHiddenFields</SPAN> rule1 = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">ExtractHiddenFields</SPAN>();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>rule1.ContextParameterName = <SPAN style="COLOR: maroon">"1"</SPAN>;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>loginRequest.ExtractValues += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">ExtractionEventArgs</SPAN>&gt;(rule1.Extract);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Insert the PreRequest and PostRequst handlers for the login request<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>loginRequest.PreRequest += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">PreRequestEventArgs</SPAN>&gt;(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.login_PreRequest);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>loginRequest.PostRequest += <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">PostRequestEventArgs</SPAN>&gt;(<SPAN style="COLOR: teal">WebTestUserMonitor</SPAN>.login_PostRequest);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">yield</SPAN> <SPAN style="COLOR: blue">return</SPAN> loginRequest;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">else</SPAN> <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Copy the Login context required for the test<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">int</SPAN> count = ((<SPAN style="COLOR: teal">Dictionary</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)Context[<SPAN style="COLOR: maroon">"LoginContext"</SPAN>]).Count;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;[] loginContext = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>,<SPAN style="COLOR: blue">object</SPAN>&gt;[count];<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>((<SPAN style="COLOR: teal">ICollection</SPAN>&lt;<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;&gt;)Context[<SPAN style="COLOR: maroon">"LoginContext"</SPAN>]).CopyTo(loginContext, 0);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>System.Collections.<SPAN style="COLOR: teal">IEnumerator</SPAN> ienum = loginContext.GetEnumerator();<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">while</SPAN> (ienum.MoveNext())<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt; keyValuePair = (<SPAN style="COLOR: teal">KeyValuePair</SPAN>&lt;<SPAN style="COLOR: blue">string</SPAN>, <SPAN style="COLOR: blue">object</SPAN>&gt;)ienum.Current;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>Context.Add(keyValuePair.Key, keyValuePair.Value);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// End of Modification 2<o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestRequest</SPAN> request1 = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestRequest</SPAN>(<SPAN style="COLOR: maroon">"https://server/site/page1.aspx"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">yield</SPAN> <SPAN style="COLOR: blue">return</SPAN> request1;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestRequest</SPAN> request2 = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestRequest</SPAN>(<SPAN style="COLOR: maroon">"https://server/site/page2.aspx"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">yield</SPAN> <SPAN style="COLOR: blue">return</SPAN> request2;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: teal">WebTestRequest</SPAN> request3 = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">WebTestRequest</SPAN>(<SPAN style="COLOR: maroon">"https://server/site/page3.aspx"</SPAN>);<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">yield</SPAN> <SPAN style="COLOR: blue">return</SPAN> request3;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p>&nbsp;</o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 8pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"></SPAN>&nbsp;</P></SPAN>]]></content:encoded>
    </item>
    <item>
      <title>Controller article posted</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/controller-article-posted</link>
      <pubDate>Wed, 08 Feb 2006 10:26:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/controller-article-posted/</guid>
      <description><![CDATA[Check out this article on how the controller works.
Understanding the Visual Studio Load Agent...]]></description>
      <content:encoded><![CDATA[<p>Check out this article on how the controller works.</p>
<p><a HREF="/vstsloadtestblog/articles/527597.aspx">Understanding the Visual Studio Load Agent Controller</a></p>
<p>Ed.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Understanding the Visual Studio Load Agent Controller</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/understanding-the-visual-studio-load-agent-controller</link>
      <pubDate>Wed, 08 Feb 2006 10:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/understanding-the-visual-studio-load-agent-controller/</guid>
      <description><![CDATA[Understanding the Visual Studio Load Agent...]]></description>
      <content:encoded><![CDATA[<h1 style="MARGIN: 9pt 0in 3pt"><font face=Verdana size=5>Understanding the Visual Studio Load Agent Controller</font></h1>
<p class=text0 style="MARGIN: 3pt 0in"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><a href="https://msdn.microsoft.com/vstudio/products/vsts/test/default.aspx"><strong><span style="FONT-SIZE: 12pt">Visual Studio 2005 Team Edition for Software Testers</span></strong></a></span></p>
<p class=text0 style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a href="https://msdn.microsoft.com/vstudio/products/vsts/load/default.aspx"><strong><span style="FONT-SIZE: 12pt">Visual Studio 2005 Team Test Load Agent</span></strong></a></span></p>
<p class=Text style="MARGIN: 3pt 0in"><b style="mso-bidi-font-weight: normal"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><font face=Verdana size=2>&nbsp;</font></o:p></b></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Summary</b>: A deeper Look at settings and how the controller in Microsoft Visual Studio Team Load Agent 2005 works. </font></font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Introduction</font></h2>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">The Microsoft Visual Studio Team Load Agent 2005 Controller (controller) is a Windows Service that can manage one or more agent machines.<span style="mso-spacerun: yes">&nbsp; </span>The configuration settings of a test run and attributes of the test cases in the run determine the actions and scheduling the controller will perform.<span style="mso-spacerun: yes">&nbsp; </span>This document will describe the algorithms the controller runs through to start and monitor test runs.</p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>What Happens At Startup</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in"><b style="mso-bidi-font-weight: normal"><font size=2><font face=Verdana>Configuration File<o:p></o:p></font></font></b></p>
<p class=Text style="MARGIN: 3pt 0in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">When the controller service starts it first opens the configuration file, QTController.exe.config.<span style="mso-spacerun: yes">&nbsp; </span>The settings in the configuration file determine what port the controller should listen on, the working directory for temporary files, whether to create a log file or not and a few other items described here:<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">WorkingDirectory: Base directory for staging deployment and reverse deployment files. Setting this value overrides a call to ‘Environment.SpecialFolder.LocalApplicationData’.<span style="mso-spacerun: yes">&nbsp; </span>The directory you specify here must already exist.<span style="mso-spacerun: yes">&nbsp; </span>Subdirectories are created for each test run submitted to the controller and have the form: VSEQT\QTController\&lt;GUID&gt;.<span style="mso-spacerun: yes">&nbsp; </span>The GUID is a generated value and uniquely identifies each test run.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">CreateTraceListener: Indicates to the service it needs to create a trace log (VSTTController.log ) file in installation directory. Default: no, override with "yes".<span style="mso-spacerun: yes">&nbsp; </span>When trouble shooting issues with test runs, creating this log file is very helpful, although it can get fairly large quickly depending on the trace level.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">ControllerServicePort: TCP port used by controller.<span style="mso-spacerun: yes">&nbsp; </span>Changing this value will require you to change the controller port the agent service uses to connect to the controller.<span style="mso-spacerun: yes">&nbsp; </span>These values must match.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">BindTo: the name of the NIC to bind to for communication.<span style="mso-spacerun: yes">&nbsp; </span>This allows you to dedicate a single NIC card to test tools infrastructure communication and any other cards for load tests and other network activities.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">AgentSyncTimeoutInSeconds: The number of seconds before the agent is considered unresponsive synchronizing test run start.<span style="mso-spacerun: yes">&nbsp; </span>The test run is aborted when this timeout period is hit.<span style="mso-spacerun: yes">&nbsp; </span>This applies only to load tests.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">LogSizeLimitInMegs: Maximum allowable size of the VSTTController.log file.<span style="mso-spacerun: yes">&nbsp; </span>Setting this value to ‘0’ allows size limited by disk space.<span style="mso-spacerun: yes">&nbsp; </span>The default is 20megs.<span style="mso-spacerun: yes">&nbsp; </span>When the log file hits this size it is backed up and a new file is created.<span style="mso-spacerun: yes">&nbsp; </span>If there is already one back up it is overwritten.<span style="mso-spacerun: yes">&nbsp; </span>The controller monitors the log file size on 20 second intervals, so it is likely the file will not be backed up at exactly the file size limit.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">ControllerJobSpooling: Set to false to turn off automatic test run spooling.<span style="mso-spacerun: yes">&nbsp; </span>When spooling is enabled test run events are captured and stored on the controller.<span style="mso-spacerun: yes">&nbsp; </span>This feature allows you to disconnect from a test and reconnect at a future time through the ‘Test Runs’ window in Visual Studio, even if the test run completed.<span style="mso-spacerun: yes">&nbsp; </span>All the events are played back to the connecting instance of Visual Studio.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">ControllerUsersGroup: When the controller is installed setup creates a group called ‘TeamTestControllerUsers’.<span style="mso-spacerun: yes">&nbsp; </span>By default this setting references that group.<span style="mso-spacerun: yes">&nbsp; </span>This is a group the controller will do role checking against.<span style="mso-spacerun: yes">&nbsp; </span>Any user added to this group can submit, stop and view owned tests.<span style="mso-spacerun: yes">&nbsp; </span>They can not view details or stop another users test runs.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l1 level1 lfo1; tab-stops: list .5in">ControllerAdminsGroup: A setting used for administrative role checking.<span style="mso-spacerun: yes">&nbsp; </span>By default the setting references a group created during setup, ‘TeamTestControllerAdmins’.<span style="mso-spacerun: yes">&nbsp; </span>Users in the group can submit, stop and view any test and perform administrative actions.<span style="mso-spacerun: yes">&nbsp; </span>Note that ‘Administrators’ on the controller machine can perform these same actions.</li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">If any of these settings are changed, the controller service needs to be stopped and restarted.<span style="mso-spacerun: yes">&nbsp; </span>Removing some settings will cause the controller to default to the value specified in the configuration file.<span style="mso-spacerun: yes">&nbsp; </span>Removing functional settings such as the ‘ControllerServicePort’ will keep the controller service from starting.<span style="mso-spacerun: yes">&nbsp; </span>Any event keeping the controller from starting will be logged in the event viewer. Some events may be difficult to diagnose the exact cause.<span style="mso-spacerun: yes">&nbsp; </span>For instance, if any invalid xml formatting is used an error will be logged, but the exact line or value is not always determinable. Removing the settings ‘ControllerUsersGroup’ and ‘ControllerAdminsGroup’ effectively turns off role validation.<span style="mso-spacerun: yes">&nbsp; </span>It is recommended that you use role validation as a security emasure.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Here are the default values set in the qtcontroller.exe.config file:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp; </span>&lt;appSettings&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="LogSizeLimitInMegs" value="20"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="AgentSyncTimeoutInSeconds" value="120"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerServicePort" value="6901"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerUsersGroup" value="TeamTestControllerUsers"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerAdminsGroup" value="TeamTestControllerAdmins"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="CreateTraceListener" value="no"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp; </span>&lt;/appSettings&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Say you want to change the working directory to, “c:\ControllerWorkingDir”.<span style="mso-spacerun: yes">&nbsp; </span>First create the directory on the controller machine.<span style="mso-spacerun: yes">&nbsp; </span>And then add the ‘WorkingDirectory’ key to the ‘&lt;appSettings&gt;’ section in the config file:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp; </span>&lt;appSettings&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt; COLOR: blue"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="WorkingDirectory" value="c:\ControllerWorkingDir"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="LogSizeLimitInMegs" value="20"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="AgentSyncTimeoutInSeconds" value="120"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerServicePort" value="6901"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerUsersGroup" value="TeamTestControllerUsers"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="ControllerAdminsGroup" value="TeamTestControllerAdmins"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;add key="CreateTraceListener" value="no"/&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><span style="mso-spacerun: yes">&nbsp; </span>&lt;/appSettings&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><b style="mso-bidi-font-weight: normal">Agent Settings<o:p></o:p></b></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">After reading the settings above the controller reads the agents it will manage, and the assciated agent attributes (persisted in qtcontrollerconfig.xml).<span style="mso-spacerun: yes">&nbsp; </span>There is a user interface for modifying this file so you should not need to modify it by hand.<span style="mso-spacerun: yes">&nbsp; </span>Any agent not in this list is ignored if it tries to connect to the controller.<span style="mso-spacerun: yes">&nbsp; </span>It is denied the connection if the user the agent is running as is not in the ‘TeamTestAgentService’ group.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Submitting a Test Run – What Happens?</font></h2>
<h3 style="MARGIN: 12pt 0in 3pt"><span style="FONT-WEIGHT: normal; FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">When a test run is submitted to the controller it is placed in a queue. If any files are deployed with the test run a deployment job is created.<span style="mso-spacerun: yes">&nbsp; </span>Deployment must complete before a test run is placed into a ‘ready to execute’ state.<span style="mso-spacerun: yes">&nbsp; </span>If a problem occurs during deployment from the host application, such as Visual Studio, the test run will be aborted.<o:p></o:p></span></h3>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Deployment</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">If files are deployed as part of the test run, the controller does not use a regular file copy buts copies the data over the connection from VS. The path of each file in the file list is relative to the client machine (the machine from which the test run was submitted).<span style="mso-spacerun: yes">&nbsp; </span>The controller calls back into the host application and asks it for a block of the file currently being copied.<span style="mso-spacerun: yes">&nbsp; </span>The files are copied into a directory under the WorkingDirectory. Using the example above:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt">c:\ControllerWorkingDir\VSEQT\QTController\620bd97a-94aa-401e-b58e-0ec1c09558ca\deployment</span> </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Once all the blocks of a file has been copied, the same steps are taken for the next file.<span style="mso-spacerun: yes">&nbsp; </span>Once all the files are copied the test run is placed in a ‘ready to execute’ state.<span style="mso-spacerun: yes">&nbsp; </span>When the test run begins to execute, the same deployment process occurs between the controller and each of the agents the test is submitted - before actual test execution can begin.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">When an agent completes the test run it may return files back to the controller, these are stored here:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt">c:\ControllerWorkingDir\VSEQT\QTController\620bd97a-94aa-401e-b58e-0ec1c09558ca\results\&lt;agent_machine_name&gt;</span> </p>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Test Run Scheduling – Part 1</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">After completion of the deployment stage the test run will remain idle until it is popped off the queue for execution.<span style="mso-spacerun: yes">&nbsp; </span>Scheduling the test run is determined by a number of variables contained in the test run configuration and the list of test cases in the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Initially the controller splits the test cases up into a set of tasks.<span style="mso-spacerun: yes">&nbsp; </span>This allows for the possibility of multiple test cases to execute simultaneously.<span style="mso-spacerun: yes">&nbsp; </span>Based on what was just stated, a test run can be thought of as a job, and the job manages a set of one or more tasks.<span style="mso-spacerun: yes">&nbsp; </span>Before you go further some terminology needs to be defined.</p>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Terminology</font></strong></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in">Bucketing is the term used to describe a way to split up a large number of non-load tests.<span style="mso-spacerun: yes">&nbsp; </span>Simply put, it is a subset of the tests specified in a test run.</li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level2 lfo3; tab-stops: list 1.0in">BucketThreshold - is the number of non-load tests in a test run before buckets are created.<span style="mso-spacerun: yes">&nbsp; </span>The default value is 1000. This is really optimized for unit tests – small, fast running tests. Consider a much smaller bucket size for slower tests as it will increase the parallelism achieved in the run.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level2 lfo3; tab-stops: list 1.0in">BucketSize – the size of each bucket once the threshold has been hit. The default value is 200.</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">An agent can only execute one test at a time, and should a catastrophic error occur during execution the run may be aborted leaving many tests unexecuted.<span style="mso-spacerun: yes">&nbsp; </span>Bucketing helps in a couple of ways: a) it allows the test cases to execute simultaneously on different agent machines; b) if a catastrophic error occurs during execution, only the remaining tests in a bucket will go unexecuted.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">One bucket at a time is sent to each agent that has been selected to execute the test run.<span style="mso-spacerun: yes">&nbsp; </span>If more than one agent is available to execute a test run, then more than one bucket can be executing at a time.<span style="mso-spacerun: yes">&nbsp; </span>As an agent completes the execution of a bucket, it is sent another if more exist.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">If 1000 or more non-load tests exist in a submitted test run, buckets of size 200 will be created.<span style="mso-spacerun: yes">&nbsp; </span>You can change these values, in a test run configuration file, but note there is no user interface to make the changes.<span style="mso-spacerun: yes">&nbsp; </span>In the test run configuration file (*.testrunconfig), the following two tags exist:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&lt;bucketSize type="System.Int32"&gt;200&lt;/bucketSize&gt;<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">&lt;bucketThreshold type="System.Int32"&gt;1000&lt;/bucketThreshold&gt;</span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">You change at your own risk – do not save the file without making a back up.<span style="mso-spacerun: yes">&nbsp; </span>If the file is saved with invalid xml formatting the file may become unreadable and you will not be able to run tests with this test run configuration.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in">A Controller Job (job) is the executing component of a test run. A job manages a set of tasks that need to happen for a test run to execute and complete.</li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l0 level1 lfo3; tab-stops: list .5in">A Controller Task (task) is managed by a Controller Job.<span style="mso-spacerun: yes">&nbsp; </span>It manages a specific set of tests and agent selection to execute those tests.<span style="mso-spacerun: yes">&nbsp; </span>The set of tests can be a bucket as defined above, a load test, or a simple test list. Tasks can execute independently of one another as long as the agent resources exist.</li></ul>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Test Run Scheduling - Part 2</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">When a job is scheduled to execute it first creates a set of tasks to execute the tests within a test run. Tasks are created using the following algorithm:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">If the test is a load test type, a task is created to manage the load test.<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>Tasks manage a single load test.<span style="mso-spacerun: yes">&nbsp; </span>If there is more than one load test in a test run, a task is created for each.</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">Once the load tests have had tasks created the remaining number of tests is checked.<span style="mso-spacerun: yes">&nbsp; </span>If the remaining total is greater than the bucketThreashold, then the tests are broken up into buckets of size bucketSize.<span style="mso-spacerun: yes">&nbsp; </span>Each bucket gets its own task. </li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">If agent constraints are specified so agents meeting specific criteria are used, this will override bucketing.<span style="mso-spacerun: yes">&nbsp; </span>For instance, say 4 available agents meet the selection criteria and there are 100 tests in the test run.<span style="mso-spacerun: yes">&nbsp; </span>Each agent will get 25 tests and they will execute simultaneously.</li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">For example, say you have a test run with the following tests in it:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">LoadTest1</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">UnitTest1</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">LoadTest2</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">OrderedTest1</li>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l2 level1 lfo2; tab-stops: list .5in">UnitTest2-UnitTest999</li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Task1: LoadTest1. </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Task2: LoadTest2.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">All the non-load tests total 1000 (UnitTest1-UnitTest999 + OrderedTest1).<span style="mso-spacerun: yes">&nbsp; </span>Five tasks would be created:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Task3: OrderesTest1 + 199 Unit tests</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Task4: 200 unit tests</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Task5-7: 200 unit tests each</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">If there are enough agent machines, it is possible Tasks3-Task7 will execute simultaneously.<span style="mso-spacerun: yes">&nbsp; </span>Load tests use all available agents so Task1 and Task2 are idle until all agents are available to execute.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Multiple test runs can execute at the same time.<span style="mso-spacerun: yes">&nbsp; </span>The initial test run popped from the queue will always have first rights to any agents meeting the test run configuration criteria.<span style="mso-spacerun: yes">&nbsp; </span>Subsequent test runs can use any agents still available that meet test run configuration criteria associated with the test run.<span style="mso-spacerun: yes">&nbsp; </span>Note that an agent must be marked online to be available for execution. </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">See section ‘Miscellaneous’, ‘<b style="mso-bidi-font-weight: normal">Examples of Agent Selection and Scheduling’</b> for some example test run submissions.<b style="mso-bidi-font-weight: normal"><o:p></o:p></b></p>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Executing Test Types</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Load tests require a synchronized start.<span style="mso-spacerun: yes">&nbsp; </span>As each agent selected to execute a load test completes any deployment it signals the controller it is ready to execute the test.<span style="mso-spacerun: yes">&nbsp; </span>Once all the agents have entered this state, the controller will send a start event to all agents.<span style="mso-spacerun: yes">&nbsp; </span>The agents will then begin execution.<span style="mso-spacerun: yes">&nbsp; </span>Load tests will use a thread-pool when executing Web Tests and multiple threads to execute non-Web tests.<span style="mso-spacerun: yes">&nbsp; </span>This allows multiple tests to execute simultaneously.<span style="mso-spacerun: yes">&nbsp; </span>This is all managed by the test adapter plug-in.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Non-load tests do not require a synchronized start.<span style="mso-spacerun: yes">&nbsp; </span>If more than one agent is used to execute non-load tests they will begin executing immediately after deployment, no matter the state of the other agents.<span style="mso-spacerun: yes">&nbsp; </span>These tests are executed synchronously one after another.</p>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Monitoring Test Runs</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">The controller task is charged with monitoring the test list the job assigned it – making sure the tests/agents remain responsive.<span style="mso-spacerun: yes">&nbsp; </span>It does this by monitoring events returned by the agents.<span style="mso-spacerun: yes">&nbsp; </span>If an agent does not return a test result within the timeout period specified in the test run configuration, the task will attempt to abort the current test case and execute the next one on the agent.<span style="mso-spacerun: yes">&nbsp; </span>This applies to all test types.<span style="mso-spacerun: yes">&nbsp; </span>Note that load tests send aggregated result messages back typically every few seconds.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">The controller job is charged with monitoring the overall execution time of the entire test run.<span style="mso-spacerun: yes">&nbsp; </span>If the test run does complete within the specified run timeout, the job will stop all the tasks and eventually the entire run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">Timeouts can be accessed from the Visual Studio ‘Test’ menu.<span style="mso-spacerun: yes">&nbsp; </span>Click ‘Test’, selected ‘Edit Run Configurations’ and select the run configuration you want to edit.<span style="mso-spacerun: yes">&nbsp; </span>A dialog will appear, in the left pane select ‘Test Timeouts’.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=StyleHeading3h3Level3TopicHeadingVerdana18ptGray-25 style="MARGIN: 9pt 0in 3pt"><strong><font face=Verdana color=#c0c0c0 size=5>Miscellaneous</font></strong></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><strong>&nbsp;</strong></o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo4; tab-stops: list .5in"><b style="mso-bidi-font-weight: normal">Connecting to the Controller</b> </li></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">Firewall and some proxy devices can block the communication between the controller and agents, or the controller and Visual Studio.<span style="mso-spacerun: yes">&nbsp; </span>Be sure to open the listening ports used for the controller and agent to allow communication.<span style="mso-spacerun: yes">&nbsp; </span>See the InstallGuide.htm on the installation CD for more information on this. As noted above the listening port setting for the controller is in the qtcontroller.exe.config file. The setting for the agent is in it’s respective configuration file, qtagentservice.exe.config or qtagentserviceui.exe.config.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">By default Visual Studio uses any available port to communicate with the controller.<span style="mso-spacerun: yes">&nbsp; </span>Since the port can change from run to run, you would need to open all ports on your firewall device for proper communication between the controller and Visual Studio. You can set a specific port or port range for Visual Studio to use when communicating with the controller by doing the following:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">You can tell Visual Studio to use a specific port by adding this registry key:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\VisualStudio\8.0\EnterpriseTools\QualityTools\ListenPortRange</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">After creating the key, add two new DWORD values:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">PortRangeStart</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">PortRangeEnd</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">To use a single port you can just specify a value in ‘PortRangeStart’.<span style="mso-spacerun: yes">&nbsp; </span>If you specify a value in ‘PortRangeStart’ and ‘PortRangeEnd’ Visual Studio will attempt to listen on the ports starting from ‘PortRangeStart’ to ‘PortRangeEnd’. Once it successfully opens a port it will stop looking for a port in the port range. </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">If there is a proxy or firewall device between Visual Studio and the controller machine you will need to open the port or port range you add.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">You can verify Visual Studio is listening on the specified port or a port in the specified range by:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">netstat -a</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">You should see one of the ports you specified in a listening state.<span style="mso-spacerun: yes">&nbsp; </span>For example:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">TCP<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>&lt;machine&gt;:6905<span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mymachine.microsoft.com:0<span style="mso-spacerun: yes">&nbsp; </span>LISTENING</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level1 lfo4; tab-stops: list .5in"><b style="mso-bidi-font-weight: normal">Examples of Agent Selection and Scheduling<o:p></o:p></b></li></ul>
<p style="MARGIN-LEFT: 0.5in">For more information of ‘Agent Constraints’ see <a HREF="/controlpanel/blogs/posteditor.aspx?SelectedNavItem=Posts&amp;sectionid=5818&amp;postid=527572">Distributed Functional Testing with Visual Studio 2005 Team System</a></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">Here are some examples the controller scheduling and agent selection given various test run configurations:</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in">Controller is managing 3 agents</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 1</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in">bucketSize<span style="mso-spacerun: yes">&nbsp; </span>= 5 </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">bucketThreshold<span style="mso-spacerun: yes">&nbsp; </span>= 6</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">Using a mix of 12 Unit and Web tests. <span style="mso-spacerun: yes">&nbsp;&nbsp;</span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">No agent constraints specified. </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">Submit the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The test list is split into 3 buckets of sizes 5, 5, and 2 and the buckets are executed simultaneously.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 2</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in">bucketSize<span style="mso-spacerun: yes">&nbsp; </span>= 5 </p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">bucketThreshold<span style="mso-spacerun: yes">&nbsp; </span>= 6</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">Using a mix of 12 Unit and Web tests. <span style="mso-spacerun: yes">&nbsp;&nbsp;</span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to each agent.<span style="mso-spacerun: yes">&nbsp; </span>All 3 agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The test list is split into 3 buckets of sizes 4, 4, and 4 and the buckets are executed simultaneously.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 3</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">Using a mix of 12 Unit and Web tests.<span style="mso-spacerun: yes">&nbsp;&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Submit the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Only the two agents are used for the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 4</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: 0.25in">Using a mix of 12 Unit and Web tests.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">While the test is executing submit another test run with 10 more Unit and Web tests.<span style="mso-spacerun: yes">&nbsp; </span>This run will execute on the unused third agent.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 5</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Using a load test.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 6</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Using a load test.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.<span style="mso-spacerun: yes">&nbsp; </span>While the test is executing submit another test run with 10 more Unit and Web tests.<span style="mso-spacerun: yes">&nbsp; </span>This run will execute on the unused third agent.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 7</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Using a load test.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.<span style="mso-spacerun: yes">&nbsp; </span>While the test is executing submit another load test with no agent constraints specified.<span style="mso-spacerun: yes">&nbsp; </span>This run will idle until all agents become available for execution.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.75in"><o:p>&nbsp;</o:p></p>
<ul style="MARGIN-TOP: 0in" type=disc>
<ul style="MARGIN-TOP: 0in" type=circle>
<li class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-list: l3 level2 lfo4; tab-stops: list 1.0in">Example 8</li></ul></ul>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Using a load test.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The same name/value attributes are assigned to two agents.<span style="mso-spacerun: yes">&nbsp; </span>Two agents meet the selection criteria.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Assign a different name/value attribute to the third agent.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">Submit the test run.<span style="mso-spacerun: yes">&nbsp; </span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in"><o:p>&nbsp;</o:p></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in">The load test is executed on the two agents meting the criteria.<span style="mso-spacerun: yes">&nbsp; </span>While the test is executing submit another load test with agent constraints specified that match the third agent.<span style="mso-spacerun: yes">&nbsp; </span>This run will execute without waiting for the other two agents to become available.</p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Conclusion</font></h2>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt">The Microsoft Visual Studio Team Load Agent 2005 Controller offers a lot of flexibility for executing test runs.<span style="mso-spacerun: yes">&nbsp; </span>A combination of the test run configuration and the settings in the qtcontroller.exe.config file allow a number of flags to adjust.<span style="mso-spacerun: yes">&nbsp; </span>The controller will use the settings as hints for agent selection, the scheduling of test runs and the scheduling of test cases to utilize the agents efficiently.<span style="mso-spacerun: yes">&nbsp; </span>It will monitor the test runs and take appropriate action if a test or test run gets into a bad state.<span style="mso-spacerun: yes">&nbsp; </span></p>]]></content:encoded>
    </item>
    <item>
      <title>Agent Article Posted</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/agent-article-posted</link>
      <pubDate>Wed, 08 Feb 2006 10:03:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/agent-article-posted/</guid>
      <description><![CDATA[Check out this article:
Distributed Functional Testing with Visual Studio 2005 Team System]]></description>
      <content:encoded><![CDATA[<p>Check out this article:</p>
<p><a HREF="/vstsloadtestblog/articles/527572.aspx">Distributed Functional Testing with Visual Studio 2005 Team System</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Related Bloggers</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/related-bloggers</link>
      <pubDate>Wed, 08 Feb 2006 09:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/related-bloggers/</guid>
      <description><![CDATA[This is the load test team's blog. We are the team that built the new web and load testing features...]]></description>
      <content:encoded><![CDATA[<p>This is the load test team's blog. We are the team that built the new web and load testing features in Visual Studio 2005. A few team members also have blogs: <a HREF="/joshch">Josh Christie</a>, <a HREF="/billbar">Bill Barnett</a>, and <a HREF="/edglas">Ed Glas</a>. Be sure to check them out! </p>
<p>We'll also be posting different articles about web and load testing, as well as using a test rig.</p>
<p>Ed.</p>]]></content:encoded>
    </item>
    <item>
      <title>Distributed Functional Testing with Visual Studio 2005 Team Test Load Agent</title>
      <link>https://docs.microsoft.com/archive/blogs/vstsloadtestblog/distributed-functional-testing-with-visual-studio-2005-team-test-load-agent</link>
      <pubDate>Wed, 08 Feb 2006 09:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Ed Glas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/vstsloadtestblog/2006/02/08/distributed-functional-testing-with-visual-studio-2005-team-test-load-agent/</guid>
      <description><![CDATA[Distributed Functional Testing with Visual Studio 2005 Team System
Applies...]]></description>
      <content:encoded><![CDATA[<h1 style="MARGIN: 9pt 0in 3pt"><font face=Verdana size=5>Distributed Functional Testing with Visual Studio 2005 Team System</font></h1>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Applies to:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a class=showroom href="https://msdn.microsoft.com/vstudio/products/vsts/test/default.aspx" ?><strong><font face="Times New Roman" size=3>Visual Studio 2005 Team Edition for Software Testers</font></strong></a></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><a class=showroom href="https://msdn.microsoft.com/vstudio/products/vsts/load/default.aspx"><strong><font face="Times New Roman" size=3>Visual Studio 2005 Team Test Load Agent</font></strong></a></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Summary</b>: This article describes the features of Microsoft Visual Studio Team Test Load Agents that can be used for distributed functional testing.</font></font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Introduction</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Belying its name, Team Test Load Agents were designed to run both functional tests and distributed load tests. It is easy to set up a “rig” consisting of a controller and set of test agents. The agents can then be used both for distributed load testing and for distributed functional testing. </font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The key features that agents provide for load testing are:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Scale out load generation</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Efficient load generation (1000 users from a typical machine running a typical web test)</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>IP Switching for testing web farms</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Per CPU licensing (no vUser licensing)</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Performance counters collected on Load Agents and machines under test</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Data (stats and logs) rolled up in central SQL Server for analysis</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Load Test Monitor enables monitoring a test in progress</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The key features agents provide for running unit and functional tests are:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Parallel distributed functional test execution</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Run a large set of unit and functional tests at the same time</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Agent selection enables matrix testing</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Code Coverage</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Better quality of service: test restart if test process dies</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Run tests from VS or Command Line</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Deployment of test code, reverse deployment of logs/test results</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Share test lab hardware with a team</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Multiple clients can submit test runs</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Controller queues runs and manages agents </font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Platform for test tools</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Extensible architecture supports third party test types</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo5; tab-stops: list .5in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>•</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Team Foundation Server integration</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Reporting</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Work Item tracking</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Build Server</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 1in; TEXT-INDENT: -0.25in; mso-list: l4 level2 lfo5; tab-stops: list 1.0in"><span style="FONT-FAMILY: 'Times New Roman'"><span style="mso-list: Ignore"><font size=2>–</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Source Code Control</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>Visual Studio Team Test Edition can execute tests locally,&nbsp;which can cover many needs of verifying product code.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>This article focuses on the feature that can be used to perform distributed functional and unit testing on a rig.</font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Test Run Configuration</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Test Run Configurations are files that keep different settings for how you wish to execute tests.<span style="mso-spacerun: yes">&nbsp; </span>There are many settings that can affect the data collected and how the test will be executed.<span style="mso-spacerun: yes">&nbsp; </span>The focus here will be on settings that can affect the execution of a test run: timeout values, executing locally, executing remotely, setup and cleanup scripts, executing with specific agent machines, and deployment.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>You can have many configuration files within a single solution. This allows you to quickly select a group of settings for a set of given tests.<span style="mso-spacerun: yes">&nbsp; </span>Any Test Run Configuration can be used for any selected set of tests.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>The Test Run Configuration dialog is accessed from the ‘Test’ menu.<span style="mso-spacerun: yes">&nbsp; </span>Selecting the ‘Test’ menu and clicking on the ‘Edit Test Runs Configurations’ one or more available Test Run configuration files will be available.<span style="mso-spacerun: yes">&nbsp; </span><b style="mso-bidi-font-weight: normal"><o:p></o:p></b></font></font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Local and Remote</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Selecting ‘Local’ the test will run in a separate test process called VSTestHost.exe on the same machine as VS. VSTestHost.exe will run under the same user account running Visual Studio.<span style="mso-spacerun: yes">&nbsp; </span>Running locally allows you to do much the same testing you would do in a remote environment.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Some things to note:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font size=2><font face=Verdana>With this configuration the execution of tests is affected by any locally running processes, which may skew results.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>You can not disconnect from a test and reconnect at a later time.<span style="mso-spacerun: yes">&nbsp; </span>That is, if you stop VS the test will stop. </font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>You can do User Interface (UI) testing.</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo3; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>If the test crashes VSTestHost.exe there is no restart functionality.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>Selecting ‘Remote’ you need to also type in the IP or computer name of the machine the Microsoft Visual Studio Team Load Agent controller has been installed.<span style="mso-spacerun: yes">&nbsp; </span>This controller may have one or more agents it manages.<span style="mso-spacerun: yes">&nbsp; </span>You will see later how to determine what agent it manages.<span style="mso-spacerun: yes">&nbsp; </span>The controller may reside on the local machine or may be in a remote lab (ensure your firewall has exceptions for Visual Studio and the controller so you can connect to remote machines).<span style="mso-spacerun: yes">&nbsp; </span>You can also specify agent properties to select which agents to run your tests on. We will cover this feature in more depth later.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Once you select a controller and save the Test Run Configuration any tests executed using this Test Run Configuration will be sent to the specified controller using the specified settings.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Deployment/Reverse Deployment</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Deployment allows you to select files you want copied to the working directory on the agent(s) and available for your tests to use during execution.<span style="mso-spacerun: yes">&nbsp; </span>Bring up the Test Run Configuration dialog.<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>Click on ‘Deployment’ in the left pane.<span style="mso-spacerun: yes">&nbsp; </span>You can add a single file by clicking ‘Add File…’ or add all the files in a given directory by clicking ‘Add Directory…’ Target assemblies are deployed using this mechanism.<span style="mso-spacerun: yes">&nbsp; </span>This is useful if you have a special file containing data you need for the product code (also referred to as code under test) or data files for your tests (say a file with a list of users). </font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>You can find the file location using the test context passed into your test.</font></p>
<p class=Text style="MARGIN: 3pt 0in; TEXT-INDENT: 0.25in"><font size=2><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">string </span></b><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes">deployDir</span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> = this</span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: windowtext; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">.TestContext.TestDeploymentDir;</span></b><font face=Verdana> </font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>This will return a path to the deployment files.<span style="mso-spacerun: yes">&nbsp; </span>Add your file name to the path returned and you can open your file for reading.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Deploying files from the agent(s) back to the local machine is called Reverse Deployment.<span style="mso-spacerun: yes">&nbsp; </span>To have a generated file returned from the agent(s) create or copy your file at the end of the test execution to the path returned by this variable:</font></p>
<p class=Text style="MARGIN: 3pt 0in; TEXT-INDENT: 0.25in"><font size=2><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">string </span></b><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 'Courier New'; mso-no-proof: yes">logDir</span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> = this</span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: windowtext; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">.TestContext.TestLogsDir;</span></b></font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Setup and Cleanup Scripts</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>Setup and Cleanup scripts are deployed to agent(s) and executed before execution of a test run and/or at the end of a test run respectively.<span style="mso-spacerun: yes">&nbsp; </span>Bring up the Test Run Configuration dialog.<span style="mso-spacerun: yes">&nbsp; </span>Click on ‘Setup and Cleanup Scripts’ in the left pane.<span style="mso-spacerun: yes">&nbsp; </span>To specify a setup or cleanup script type in the path to a *.bat or *.cmd file or click on the appropriate ‘…’ and select the file in the file list.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The scripts are sent as strings to the agent(s).<span style="mso-spacerun: yes">&nbsp; </span>The agent(s) take the string and generate a setup (qtsetup.bat) and cleanup (qtcleanup.bat) script file as appropriate, adding test run specific environment variables before executing your commands.<span style="mso-spacerun: yes">&nbsp; </span>For example, say you specify myCleanup.cmd as the cleanup script.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>myCleanup.cmd:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>echo CleanupScript<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>echo %AgentName%<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><o:p><font face=Verdana>&nbsp;</font></o:p></span></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The final script on the agent will look like this:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM ****************************************************************************<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM *<span style="mso-spacerun: yes">&nbsp; </span>This is a generated file by Quality Tools Agent Service<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM *<span style="mso-spacerun: yes">&nbsp; </span>Copyright(c) Microsoft Corporation 2004<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM *<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM ****************************************************************************<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set TotalAgents=1<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set ControllerName=ERICNWA2<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set AgentName=ERICNWA2<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set AgentWeighting=100<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set TestLogsDir=D:\Documents and Settings\LocalService.NT AUTHORITY.000\Local Settings\Application Data\VSEQT\QTAgent\d93be121-5407-47ce-84b1-61b52dbec744\Results<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set TestDeploymentDir=D:\Documents and Settings\LocalService.NT AUTHORITY.000\Local Settings\Application Data\VSEQT\QTAgent\d93be121-5407-47ce-84b1-61b52dbec744\Deployment<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set AgentId=1<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>set TestDir=D:\Documents and Settings\LocalService.NT AUTHORITY.000\Local Settings\Application Data\VSEQT\QTAgent\d93be121-5407-47ce-84b1-61b52dbec744<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM ****************************************************************************<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM *<span style="mso-spacerun: yes">&nbsp; </span>User Commands<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM *<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>REM ****************************************************************************<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>echo CleanupScript<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><span style="FONT-SIZE: 8pt; FONT-FAMILY: 'Letter Gothic'"><font face=Verdana>echo %AgentName%<o:p></o:p></font></span></p>
<p class=Text style="MARGIN: 3pt 0in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>Notice the executed cleanup script in this example contained the two ‘echo’ lines which are the ‘User Commands’ sections above.<span style="mso-spacerun: yes">&nbsp; </span>These are the script commands from myCleanup.cmd. The environment variables in the first section of the script file (shown in <span style="COLOR: blue">blue</span>) are test run specific.<span style="mso-spacerun: yes">&nbsp; </span>Meaning they are only valid for that test run, other test runs will have a different generated ID.<span style="mso-spacerun: yes">&nbsp; </span>A setup script would have the same environment variables set at the top of the script as the example cleanup script.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Note that these variables are not available when the tests is actually executing, they are only available during the execution of the user script.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Agent Selection</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>Agent Selection is one of the more powerful features of the controller.<span style="mso-spacerun: yes">&nbsp; </span>By entering constraints on what properties an agent must have for the given Test Run Configuration you get a lot of flexibility utilizing resources.<span style="mso-spacerun: yes">&nbsp; </span>Some example selection criteria:<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Only use agents that have Windows XP sp2</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Only select agents that have software package Y installed</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Only use agents that belong to my group</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1; tab-stops: list .5in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>Use all Windows 2000 machines no matter what SP is installed</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>It was mentioned above when you selected a controller in the Test Run Configuration, you could also specify agent properties.<span style="mso-spacerun: yes">&nbsp; </span>Click on the ‘Test’ menu and click ‘Edit Test Run Configurations’ and select a run configuration.<span style="mso-spacerun: yes">&nbsp; </span>The test run configuration dialog will come up. Select ‘Controller and Agent’ in the left pane.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The agent properties grid is unavailable if a remote controller is not selected.<span style="mso-spacerun: yes">&nbsp; </span>Select remote if it is not.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The grid represents name value pairs each agent must have defined to be selected for executing a test run using this test run configuration.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Say we have the grid defined as follows:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>OS<span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WindowsXp</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>SP<span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SP1</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Group<span style="mso-tab-count: 1"> </span>A</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>When a test run is submitted using this test run configuration, any agent with the same above properties assigned will be selected to execute the test run.<span style="mso-spacerun: yes">&nbsp; </span>Not necessarily all of them are used.<span style="mso-spacerun: yes">&nbsp; </span>All the properties specified above must exactly match those defined for each agent; otherwise, the agent is not selected.<span style="mso-spacerun: yes">&nbsp; </span>If the agent only has two of the above name value pairs defined, it will not be a selectable agent.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>You can have policy that test runs submitted by a certain group must have A, B, or C defined for the ‘Group’.<span style="mso-spacerun: yes">&nbsp; </span>This would allow multiple teams to share a agent lab through a single controller.<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>The above example is stating that the agent must have a property name of ‘OS’ and it’s value must be ‘WindowsXP’, AND it must have a property defined ‘SP’ with a value of ‘SP1’, finally the agent must have a property, ‘Group’ with a value of ‘A’.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana>You could set up a test run configuration to select all agents having the property named ‘OS’ with a value ‘WindowsXp’.<span style="mso-spacerun: yes">&nbsp; </span>In the ‘Name’ column type ‘OS’ and in the value column, type ‘WindowsXP’.<span style="mso-spacerun: yes">&nbsp; </span></font></font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>This is the only row of data needed to get all agent machines with the same property and value.<span style="mso-spacerun: yes">&nbsp; </span>Agents may have many name/value pairs defined, name/values pairs that apply to other test run configurations.<span style="mso-spacerun: yes">&nbsp; </span>In order for them to be selected for a test run they need to match the name/value pairs entered in this dialog grid.<span style="mso-spacerun: yes">&nbsp; </span>You enter the agent name/value pairs in the ‘Administer Test Controller’ dialog.<span style="mso-spacerun: yes">&nbsp; </span>See below for details.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Test Timeouts</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Bring up the Test Run Configuration dialog.<span style="mso-spacerun: yes">&nbsp; </span>Click on ‘Timeouts’ in the left pane.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>There are two types of time outs available for any given test run; a) total execution time of all tests in a given test run; b) execution time of individual tests.<span style="mso-spacerun: yes">&nbsp; </span>Total execution time of the entire run allows a test run to be aborted if the run exceeds the amount of time specified. <span style="mso-spacerun: yes">&nbsp;</span>Your organization may have a policy that states verification tests must complete in 20 minutes.<span style="mso-spacerun: yes">&nbsp; </span>Any tests that were not executed before this timeout will be marked as ‘not Executed’.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Individual test timeouts will cause an individual test to be aborted if it exceeds the execution time specified.<span style="mso-spacerun: yes">&nbsp; </span>The next test will be started and the run will continue to execute.<span style="mso-spacerun: yes">&nbsp;&nbsp; </span>The default is 5 minutes.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Note: Load tests do not use these timeout values, except in the case a unit test is added to a load test.<span style="mso-spacerun: yes">&nbsp; </span>Unit tests will have the individual timeouts applied if a value is provided in the dialog box. </font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Administering the Test Controller</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Administering the controller and setting agent properties is handled through the ‘Administer Test Controller’ dialog.<span style="mso-spacerun: yes">&nbsp; </span>To access, click on the ‘Test’ menu and select, ‘‘Administer Test Controller’.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Initially this dialog will come up with a controller: &lt;local&gt;.<span style="mso-spacerun: yes">&nbsp; </span>‘&lt;local&gt;’ is the local machine, <i style="mso-bidi-font-style: normal">not</i> a controller installed on the local machine.<span style="mso-spacerun: yes">&nbsp; </span>You can only delete temporary files from the local machine using this dialog.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Enter the name of a computer that has the Microsoft Visual Studio Team Load Agent 2005 controller installed.<span style="mso-spacerun: yes">&nbsp; </span>If there are not agents assigned to the controller you will get a pop indicating no agents are configured.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Agent Status</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The initial dialog shows the agents the controller manages and their status.<span style="mso-spacerun: yes">&nbsp; </span>Possible status values:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Ready: The agent is ready to execute a test</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Running test: The agent is currently running a test.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Disconnected: the agent is marked online, but is disconnected.<span style="mso-spacerun: yes">&nbsp; </span>Here might be why:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list .75in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>The agent service or agent service UI version may not be running</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list .75in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>The agent can not connect to the controller (firewall, security settings)</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo2; tab-stops: list .75in"><span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"><span style="mso-list: Ignore"><font size=2>·</font><span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><font face=Verdana size=2>The agent may not have restarted yet.<span style="mso-spacerun: yes">&nbsp; </span>Click the ‘Refresh’ button</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Offline: the agent is marked offline</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Editing Agent Properties</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Once you have added an agent to controller, you can set the agent’s properties in the Administer Controller dialog. Agents are automatically added to a controller when the agent is setup. Agent properties are:</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Weighting</b>: This affects the load generated on the agent.<span style="mso-spacerun: yes">&nbsp; </span>Each agent is assigned a weighting, faster machines should be given a bigger weighting.<span style="mso-spacerun: yes">&nbsp; </span>A bigger weighting indicates the agent is capable of simulating a larger portion of users for a load test.<span style="mso-spacerun: yes">&nbsp; </span>For instance say you had the following two agents with the specified weightings and the number of users you want to use for my test:</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Agent1 Weighting: 50</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Agent2 Weighting: 100</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Total weighting: 150</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Agent1 will get 1/3 of the load, Agent2 will get 2/3.</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>So if the load = 1000:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Number of users Agent1 would simulate: ((50 * 1000) / 150) = 333</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 67.5pt"><font face=Verdana size=2>Number of users Agent2 would simulate: ((100 * 1000)/ 150) +1= 667 </font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>If all the agents have the same weighting, then the user distribution is the same on each agent.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">IP Switching</b>:<span style="mso-spacerun: yes">&nbsp; </span>Will allow agents to cycle through an IPv4 address range during a load test.<span style="mso-spacerun: yes">&nbsp; </span>This allows you to effectively test a web farm that may have a load balancer distributing requests to the backend web servers.<span style="mso-spacerun: yes">&nbsp; </span>If all the requests were coming from a single all IP they would be routed to the same web server each time.</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">NIC</b>: This is the network interface card to use to add IPv4 addresses.<span style="mso-spacerun: yes">&nbsp; </span>Note: if the machine status is not ‘Ready’ the available NIC cards will not appear.<span style="mso-spacerun: yes">&nbsp; </span>Close this dialog and mark the agent as online and make sure the state is ‘Ready’ and reopen this dialog.</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Base Address</b>: Enter the first three segments of you Ipv4 address.<span style="mso-spacerun: yes">&nbsp; </span>For example: 192.168.0</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:place w:st="on"><st1:placename w:st="on"><b style="mso-bidi-font-weight: normal">Start</b></st1:placename><b style="mso-bidi-font-weight: normal"> <st1:placetype w:st="on">Range</st1:placetype></b></st1:place>: This is the starting number to use in the IPv4 address range.<span style="mso-spacerun: yes">&nbsp; </span>Say the value it 10.<span style="mso-spacerun: yes">&nbsp; </span>When the agent begins generating IPv4 addresses with will start with base address and this number: 192.168.0.&lt;start range&gt; = 192.168.0.10</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><st1:place w:st="on"><st1:placename w:st="on"><b style="mso-bidi-font-weight: normal">End</b></st1:placename><b style="mso-bidi-font-weight: normal"> <st1:placetype w:st="on">Range</st1:placetype></b></st1:place>: This is the last number used in the IPv4 address range.<span style="mso-spacerun: yes">&nbsp; </span>Say it is 15.<span style="mso-spacerun: yes">&nbsp; </span>The agent will generate addresses from the <st1:placename w:st="on">Start</st1:placename> <st1:placetype w:st="on">Range</st1:placetype> to the <st1:place w:st="on"><st1:placename w:st="on">End</st1:placename> <st1:placetype w:st="on">Range</st1:placetype></st1:place>: </font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal"><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </span></b>192.168.0.10</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>192.168.0.11</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>…</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>192.168.0.15</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Subnet Mask: </b>The subnet mask to use with the generated IPv4 addresses.<span style="mso-spacerun: yes">&nbsp; </span>For example: 255.255.255.0</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.75in"><font face=Verdana size=2>Notes: if the static or DHCP address of the machine is in the range specified here, it will cause an error and not all of the addresses will be added to the NIC card.<span style="mso-spacerun: yes">&nbsp; </span>Also note if the IPv4 address specified is not routable in your network, you will not see any load generated by the client.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Attributes:<span style="mso-spacerun: yes">&nbsp; </span></b>These are name/value pairs assigned to the agent.<span style="mso-spacerun: yes">&nbsp; </span>These name/value pairs are used for agent selection when the test run configuration has agent constraints specified.</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.25in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Attribute Name: </b>The name of the attribute you want to use for agent selection, for example, ‘OS’.<span style="mso-spacerun: yes">&nbsp; </span>Refer to ‘Agent Selection’ for more context.</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.25in"><font size=2><font face=Verdana><b style="mso-bidi-font-weight: normal">Attribute Value:</b> The value for the given name, for example, “WindowsXP’.</font></font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Say you have Agent1 and you assign a number of name/value pairs in the grid:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Attribute Name<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Attribute Value</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>OS<span style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WindowsXP</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>SP<span style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SP1</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Group<span style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Software<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>MSOffice</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Processor<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>MULTICORE</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Agent2 has the following attributes:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Attribute Name<span style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Attribute Value</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>OS<span style="mso-tab-count: 5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WindowsXP</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>SP<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SP2</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Group<span style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>A</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Processor<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>SINGLECORE</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Using the sample data from the ‘Agent Selection’ in the previous section, you can now select agents for a given test run. </font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Say you want agents that have ‘Processor’ attribute equal to ‘MULTICORE’:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Click on the ‘Test’ menu and click ‘Edit Test Run Configurations’ and select a run configuration.<span style="mso-spacerun: yes">&nbsp; </span>The test run configuration dialog will come up. Select ‘Controller and Agent’ in the left pane.<span style="mso-spacerun: yes">&nbsp; </span>In the agent properties grid, enter the following:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Name<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Processor<span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>MULTICORE</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>When a test run is submitted Agent1 will match the agent constraints.</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>You want agents that have ‘OS’ attribute equal to ‘WindowsXP’</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>In the agent properties grid in the test run configuration dialog, enter the following:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Name<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>OS<span style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WindowsXP</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Both Agent1 and Agent2 can be used for the test run since both match the agent constraints.</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>You want agents that have ‘OS’ attribute equal to ‘WindowsXP’ and ‘GROUP’ attribute equal to ‘B’</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>In the agent properties grid in the test run configuration dialog, enter the following:</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Name<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>OS<span style="mso-tab-count: 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>WindowsXP</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>GROUP<span style="mso-tab-count: 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>B</font></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><o:p><font face=Verdana size=2>&nbsp;</font></o:p></p>
<p class=Text style="MARGIN: 3pt 0in 3pt 0.5in"><font face=Verdana size=2>Neither agent has ‘GROUP’ attribute equal to ‘B’, both agents have ‘GROUP’ attribute equal to ‘A’.<span style="mso-spacerun: yes">&nbsp; </span>No agent is returned that can execute the test run and the test run is aborted.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Remove</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Clicking ‘Remove’ removes an agent from the agent list.<span style="mso-spacerun: yes">&nbsp; </span>Note that if the agent is running, it will continue to try to connect to the controller (and fail). So in addition you will need to stop the agent service running on the agent.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Offline/Online</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>If an agent is marked offline the controller will not attempt to use the agent to execute a test run. You can use offline to perform maintenance on the agent or investigate test results.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Restart</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The controller will attempt to restart the agent through the service control manager interface (unless the agent name has an ‘*’ next to it).<span style="mso-spacerun: yes">&nbsp; </span>Typically the service control manager will stop and restart the agent service. Note that this is the same interface that is used in the Computer Management administrative tool.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>If the controller cannot contact the agent (firewall) or the controller service user does not have the rights to stop/start a service on the agent machine, or the agent name has an ‘*’ next to it, the controller will bypass the service control manager and call into the agent service to tell it to exit the process.<span style="mso-spacerun: yes">&nbsp; </span>If the agent was running as a service, the service controller manager will restart it.<span style="mso-spacerun: yes">&nbsp; </span>If the agent was running as a normal process (has a ‘*’ next to the name) and was started through the supplied script file, QTAgentServiceUI.bat, the process will be restarted.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>It takes a few seconds for the agent to restart and reregister with the controller.<span style="mso-spacerun: yes">&nbsp; </span>Clicking the ‘Refresh’ button will refresh the agent states in the dialog box.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Refresh</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The ‘Refresh’ button causes the controller to query the agents for their state.<span style="mso-spacerun: yes">&nbsp; </span>Ant state changes are reflected in the main dialog’s agent list.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Delete Temp Files</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Test runs will leave temporary files on the controller and agent machines (these may be deployed files, temporary test files, code coverage data files, …).<span style="mso-spacerun: yes">&nbsp; </span>They are kept in case there is a need to reference them.<span style="mso-spacerun: yes">&nbsp; </span>It is recommended that the temporary files be deleted when it is known they are no longer needed.</font></p>
<h3 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#c0c0c0 size=5>Restart Rig</font></h3>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Restarts the controller service and the agents the controller manages.</font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>UI Testing on an Agent</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>If you want to run a test that has a UI or interacts with the desktop or user settings, you will need to use QTAgentServiceUI on the agent instead of QTAgentService.exe. QTAgentServiceUI works exactly like QTAgentService, except that it runs as a user process rather than a service. We recommend you configure your agent to automatically logon as a test user, and then in the startup for that user run QTAgentServiceUI.bat. This bat file simply runs QTAgentServiceUI over and over, so that if the agent service dies it will be automatically restarted.</font></p>
<h2 style="MARGIN: 9pt 0in 3pt"><font face=Verdana color=#808080>Conclusion</font></h2>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>The combination of Visual Studio Team Test Edition 2005 and Microsoft Visual Studio Team Load Agent 2005 allow for a flexible and powerful approach to testing.<span style="mso-spacerun: yes">&nbsp; </span>The combination allows you to execute tests on the local machine or with a pool of agents managed by a controller.<span style="mso-spacerun: yes">&nbsp; </span>You can create custom environments on agent machines and execute test runs in those environments using agent selection.<span style="mso-spacerun: yes">&nbsp; </span>You can control the load of each agent through weighting and simulate many browser requests from different locations using IP Switching. You can deploy custom data to agent machines and return custom data utilizing Deployment and Reverse Deployment.<span style="mso-spacerun: yes">&nbsp; </span>Through scripting you can further modify an agent environment and revert it to its original state when a test completes.</font></p>
<p class=Text style="MARGIN: 3pt 0in"><font face=Verdana size=2>Visual Studio Team Test Edition 2005 and Microsoft Visual Studio Team Load Agent 2005 give you the tools and flexibility you need to effectively test in today’s complex environments.</font></p>]]></content:encoded>
    </item>
  </channel>
</rss>