<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>vikramagrawal</title><link>http://blogs.msdn.com/b/vikramagrawal/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Writing loggers for command line test runner vstest.console.exe</title><link>http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/26/writing-loggers-for-command-line-test-runner-vstest-console-exe.aspx</link><pubDate>Thu, 26 Jul 2012 08:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10332521</guid><dc:creator>Vikram Agrawal [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/vikramagrawal/rsscomments.aspx?WeblogPostID=10332521</wfw:commentRss><comments>http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/26/writing-loggers-for-command-line-test-runner-vstest-console-exe.aspx#comments</comments><description>&lt;p&gt;&lt;font size="3"&gt;Command line test runner for VS 2012 comes with a parameter /logger where user can specify logger to be used. Two loggers shipped with VS are Console and Trx. Console logger is default logger that prints output of test execution to console window. Trx logger is can be used to generate trx file for test run (/logger:trx).&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;Here I am describing how to write a custom logger that can be used with vstest.console.exe&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;There are two requirements for custom test logger&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;1. Implement interface Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestLogger&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="3"&gt;Interface can be found in “C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll”&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;2. Assembly containing logger implementation to be present in place where extensions are searched like &amp;quot;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions&amp;quot;&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="3"&gt;Assembly can be installed with VSIX like test adapters. In that case use /UseVSIXExtensions parameter also.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt;  &lt;p&gt;&lt;font size="3"&gt;ITestLogger has only one method&lt;/font&gt;&lt;/p&gt; &lt;font size="3"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;  &lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;&lt;font size="2"&gt;&lt;/font&gt;    &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;&lt;font size="2"&gt;&lt;/font&gt;      &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Initializes the Test Logger.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;param name=&amp;quot;events&amp;quot;&amp;gt;Events that can be registered for.&amp;lt;/param&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;param name=&amp;quot;testRunDirectory&amp;quot;&amp;gt;Test Run Directory&amp;lt;/param&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Initialize(TestLoggerEvents events, &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; testRunDirectory);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;This function is used to hookup to following events in TestLoggerEvents&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;

&lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 400px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;&lt;font size="2"&gt;&lt;/font&gt;

  &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;&lt;font size="2"&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Raised when a test message is received.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;abstract&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;event&lt;/span&gt; EventHandler&amp;lt;TestRunMessageEventArgs&amp;gt; TestRunMessage;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Raised when a test result is received.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;abstract&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;event&lt;/span&gt; EventHandler&amp;lt;TestResultEventArgs&amp;gt; TestResult;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Raised when a test run is complete.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;abstract&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;event&lt;/span&gt; EventHandler&amp;lt;TestRunCompleteEventArgs&amp;gt; TestRunComplete;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;For Ex: &lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;

&lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 300px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;&lt;font size="2"&gt;&lt;/font&gt;

  &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;&lt;font size="2"&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Initializes the Test Logger.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;param name=&amp;quot;events&amp;quot;&amp;gt;Events that can be registered for.&amp;lt;/param&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;param name=&amp;quot;testRunDirectory&amp;quot;&amp;gt;Test Run Directory&amp;lt;/param&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Initialize(TestLoggerEvents events, &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; testRunDirectory)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;// Register for the events.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    events.TestRunMessage += TestMessageHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    events.TestResult += TestResultHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    events.TestRunComplete += TestRunCompleteHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;Each Event handler now can be used to log event however you want (in file, db, console, etc). Following example prints in on console:&lt;/font&gt;&lt;/p&gt;
&lt;font size="2"&gt;&lt;/font&gt;

&lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 500px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;&lt;font size="2"&gt;&lt;/font&gt;

  &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;&lt;font size="2"&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// Logger for sending output to the console.&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 128, 0);"&gt;&lt;font size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;[ExtensionUri(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;logger://SimpleConsoleLogger/v1&amp;quot;&lt;/span&gt;)] &lt;span style="color: rgb(0, 128, 0);"&gt;/// Uri used to uniquely identify the console logger. &lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;[FriendlyName(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;SimpleLogger&amp;quot;&lt;/span&gt;)] &lt;span style="color: rgb(0, 128, 0);"&gt;/// Alternate user friendly string to uniquely identify the logger.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;internal&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; SimpleConsoleLogger : ITestLogger&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;{&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// Initializes the Test Logger.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;param name=&amp;quot;events&amp;quot;&amp;gt;Events that can be registered for.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;param name=&amp;quot;testRunDirectory&amp;quot;&amp;gt;Test Run Directory&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; Initialize(TestLoggerEvents events, &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; testRunDirectory)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 128, 0);"&gt;// Register for the events.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        events.TestRunMessage += TestMessageHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        events.TestResult += TestResultHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        events.TestRunComplete += TestRunCompleteHandler;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// Called when a test message is received.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; TestMessageHandler(&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; sender, TestRunMessageEventArgs e)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;switch&lt;/span&gt; (e.Level)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;case&lt;/span&gt; TestMessageLevel.Informational:&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;                Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Information: &amp;quot;&lt;/span&gt; + e.Message);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;break&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;case&lt;/span&gt; TestMessageLevel.Warning:&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;                Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Warning: &amp;quot;&lt;/span&gt; + e.Message);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;break&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;case&lt;/span&gt; TestMessageLevel.Error:&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;                Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Error: &amp;quot;&lt;/span&gt; + e.Message);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;break&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;default&lt;/span&gt;:&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;                &lt;span style="color: rgb(0, 0, 255);"&gt;break&lt;/span&gt;;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// Called when a test result is received.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; TestResultHandler(&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; sender, TestResultEventArgs e)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; name = !&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;.IsNullOrEmpty(e.Result.DisplayName) ? e.Result.DisplayName : e.Result.TestCase.FullyQualifiedName;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;&amp;#160;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (e.Result.Outcome == TestOutcome.Skipped)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            Console.WriteLine(name + &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot; Skipped&amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (e.Result.Outcome == TestOutcome.Failed)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        {    &lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            Console.WriteLine(name + &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot; Failed&amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;            &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt;(!String.IsNullOrEmpty(e.Result.ErrorStackTrace))&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;                Console.WriteLine(e.Result.ErrorStackTrace);                    &lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        &lt;span style="color: rgb(0, 0, 255);"&gt;else&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (e.Result.Outcome == TestOutcome.Passed)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;            Console.WriteLine(name + &lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot; Passed&amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// Called when a test run is completed.&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;void&lt;/span&gt; TestRunCompleteHandler(&lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; sender, TestRunCompleteEventArgs e)&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;    {&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Total Executed: {0}&amp;quot;&lt;/span&gt;, e.TestRunStatistics.ExecutedTests);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Total Passed: {0}&amp;quot;&lt;/span&gt;, e.TestRunStatistics[TestOutcome.Passed]);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;        Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Total Failed: {0}&amp;quot;&lt;/span&gt;, e.TestRunStatistics[TestOutcome.Failed]);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;        Console.WriteLine(&lt;span style="color: rgb(0, 96, 128);"&gt;&amp;quot;Total Skipped: {0}&amp;quot;&lt;/span&gt;, e.TestRunStatistics[TestOutcome.Skipped]);&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;font size="2"&gt;    }&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/pre&gt;
    &lt;font size="2"&gt;&lt;!--CRLF--&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;font size="2"&gt;&lt;/font&gt;&lt;/div&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;Once binary is placed at proper location, above logger can be used as&lt;/font&gt;&lt;/p&gt;
&lt;font size="3"&gt;&lt;/font&gt;

&lt;p&gt;&lt;font size="3"&gt;vstest.console.exe &amp;lt;testdll&amp;gt; /logger:SimpleLogger&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;If you've any feedback or issue then please do send us on &lt;/font&gt;&lt;a href="http://connect.microsoft.com/VisualStudio"&gt;&lt;font size="3"&gt;Connect&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; or in the &lt;/font&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstest/threads"&gt;&lt;font size="3"&gt;Forums&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10332521" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Unit+Testing/">Unit Testing</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Command+Line/">Command Line</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/VS+2012/">VS 2012</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Logger/">Logger</category></item><item><title>Running selective unit tests in VS 2012 RC using TestCaseFilter</title><link>http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/23/running-selective-unit-tests-in-vs-2012-rc-using-testcasefilter.aspx</link><pubDate>Mon, 23 Jul 2012 13:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10332545</guid><dc:creator>Vikram Agrawal [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/vikramagrawal/rsscomments.aspx?WeblogPostID=10332545</wfw:commentRss><comments>http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/23/running-selective-unit-tests-in-vs-2012-rc-using-testcasefilter.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;New unit testing platform in Visual Studio 2012 provides a new way to selectively execute test based on filtering condition through TestCaseFilter. TestCaseFilter can as specified as a string while executing tests through command line (vstest.console.exe), Team Build (when running test using “Visual Studio Test Runner”) or through Test platform client API.&lt;/span&gt;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Support for adapters to leverage this feature is provided in test platform. MSTest adapter shipped with Visual Studio 2012 for executing managed test provide basic filtering as described below (more enhanced filtering expression support to be added in future versions).&lt;/span&gt;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;strong&gt;&lt;font size="4"&gt;Specifying TestCaseFilter:&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;ol&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Command Line&lt;/span&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;New command line runner for executing tests in VS 2012 (vstest.console.exe) has an optional command line parameter /TestCaseFilter for specifying filtering expression. /TestCaseFilter cannot be specified with /Tests argument.&lt;/span&gt;        &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. vstest.console.exe test.dll /TestCaseFilter:”TestCategory=Nightly”&lt;/span&gt;&lt;/p&gt;     &lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Team Build&lt;/span&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;When adding a test activity in build definition, if user selects to execute test using “Visual Studio Test Runner” then user get to specify test case filter (optional can be left blank to run all tests).&lt;/span&gt;&lt;/p&gt;     &lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Client API&lt;/span&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;When using Test Platform Client API for executing test then filtering expression can be specified in TestRunCriteria.TestCaseFilter property.&lt;/span&gt;        &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g.&lt;/span&gt;        &lt;br /&gt;&lt;code class="csharp"&gt;&lt;font size="3" face="Arial"&gt;TestRunCriteria runCriteria = CreateTestRunCriteria();            &lt;br /&gt; runCriteria.TestCaseFilter = “TestCategory=Nightly”;&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;     &lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/ol&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;strong&gt;&lt;font size="4"&gt;Syntax for filtering expression:&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Adapters can choose their own syntax for filtering or take advantage of support provided by Test Platform by MSTest adapter syntax. Following is syntax for MSTest adapter for managed test execution. Invalid filtering expressions will be ignored and all tests will be executed.        &lt;br /&gt;&lt;/span&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;u&gt;Operators supported in RC are:&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;= (equals) &lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;!= (not equals)&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;~ (contains or substring only for string values)&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&amp;amp; (and)&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;| (or)&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;( ) (paranthesis for grouping)        &lt;br /&gt;        &lt;br /&gt;Expresssion can be created using these operators as any valid logical condition. &amp;amp; (and) has higher precedence over | (or) while evaluating expression.&lt;/span&gt;&lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;     &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;u&gt;E.g.&lt;/u&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&amp;quot;TestCategory=NAR|Priority=1&amp;quot;        &lt;br /&gt;&amp;quot;Owner=vikram&amp;amp;TestCategory!=UI&amp;quot;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;       &lt;br /&gt;&amp;quot;FullyQualifiedName~NameSpace.Class&amp;quot;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;quot;(TestCategory!=UI&amp;amp;(Priority=1|Priority=2))|(TestCategory=UI&amp;amp;Priority=1)&amp;quot;         &lt;br /&gt;        &lt;br /&gt;&amp;quot;Priority~1&amp;quot; &lt;strong&gt;// Invalid as priority is int not string&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;u&gt;       &lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;u&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;u&gt;Properties supported by MSTest adapter for filtering are&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;  &lt;font size="3" face="Arial"&gt;&lt;/font&gt;  &lt;ol&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Name=&amp;lt;TestMethodDisplayNameName&amp;gt;&lt;/span&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;FullyQualifiedName=&amp;lt;FullyQualifiedTestMethodName&amp;gt;&lt;/span&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Priority=&amp;lt;PriorityAttributeValue&amp;gt;&lt;/span&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;TestCategory=&amp;lt;TestCategoryAttributeValue&amp;gt;&lt;/span&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;ClassName=&amp;lt;ClassName&amp;gt; (Valid only for unit tests for Windows store apps, currently not available for classic MSTest)&lt;/span&gt;&lt;/li&gt;   &lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/ol&gt;  &lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="4" face="Arial"&gt;&lt;strong&gt;Using TestCaseFilter in Test Adapters&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="3" face="Arial"&gt;Adapters can leverage default format of TestCaseFilter that MS Test uses. Parsing and matching is done by &lt;font face="Courier"&gt;ITestCaseFilterExpression&lt;/font&gt; provided by test platform.&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font size="3" face="Arial"&gt;Following method from &lt;font face="Courier"&gt;IRunContext&lt;/font&gt; is for getting an implementation of &lt;font face="Courier"&gt;ITestCaseFilterExpression&lt;/font&gt;.&lt;/font&gt;&lt;/p&gt;    &lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;     &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;       &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;ITestCaseFilterExpression GetTestCaseFilter(IEnumerable&amp;lt;String&amp;gt; supportedProperties, Func&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, TestProperty&amp;gt; propertyProvider);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
  &lt;/div&gt;
  

  &lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;font face="Courier"&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

  &lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;font face="Courier"&gt;ITestCaseFilterExpression&lt;/font&gt; provides following method to match test case (only if MSTest format is used for TestCaseFilter)&lt;/font&gt;&lt;/p&gt;

  &lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;
    &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;
      &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;bool&lt;/span&gt; MatchTestCase(TestCase testCase, Func&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt;&amp;gt; propertyValueProvider);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/blockquote&gt;

&lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;font size="3" face="Arial"&gt;&lt;u&gt;E.g.&lt;/u&gt;&lt;/font&gt;&lt;/p&gt;

&lt;div style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; height: 500px; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 500px; background-color: rgb(244, 244, 244);" id="codeSnippetWrapper"&gt;
  &lt;div style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);" id="codeSnippet"&gt;
    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// Supported properties for filtering &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, TestProperty&amp;gt; supportedPropertiesCache;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum5"&gt;   5:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum6"&gt;   6:&lt;/span&gt; supportedPropertiesCache = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt;, TestProperty&amp;gt;(StringComparer.OrdinalIgnoreCase); &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum7"&gt;   7:&lt;/span&gt; supportedPropertiesCache[“Priority”] = PriorityProperty; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum8"&gt;   8:&lt;/span&gt; supportedPropertiesCache[“TestCategory”] = TestCategoryProperty; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum9"&gt;   9:&lt;/span&gt; supportedPropertiesCache[“FullyQualifiedName”] = TestCaseProperties.FullyQualifiedName; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum10"&gt;  10:&lt;/span&gt; supportedPropertiesCache[“Name”] = TestCaseProperties.DisplayName; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum11"&gt;  11:&lt;/span&gt; supportedPropertiesCache[“MyProperty”] = MyProperty;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum12"&gt;  12:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum13"&gt;  13:&lt;/span&gt; ITestCaseFilterExpression filterExpression = runContext.GetTestCaseFilter(supportedPropertiesCache.Keys, (p) =&amp;gt; PropertyProvider(p));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum14"&gt;  14:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum15"&gt;  15:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;foreach&lt;/span&gt; (TestCase currentTest &lt;span style="color: rgb(0, 0, 255);"&gt;in&lt;/span&gt; tests) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum16"&gt;  16:&lt;/span&gt; { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum17"&gt;  17:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;// Skip test if not fitting filter criteria. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum18"&gt;  18:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt; != filterExpression &amp;amp;&amp;amp; filterExpression.MatchTestCase(currentTest, (p) =&amp;gt; PropertyValueProvider(currentTest, p)) == &lt;span style="color: rgb(0, 0, 255);"&gt;false&lt;/span&gt;) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum19"&gt;  19:&lt;/span&gt;     { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum20"&gt;  20:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;continue&lt;/span&gt;; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum21"&gt;  21:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum22"&gt;  22:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum23"&gt;  23:&lt;/span&gt;     &lt;span style="color: rgb(0, 128, 0);"&gt;// Execute test&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum24"&gt;  24:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum25"&gt;  25:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum26"&gt;  26:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum27"&gt;  27:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum28"&gt;  28:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// Provides value of TestProperty corresponding to property name 'propertyName' as used in filter. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum29"&gt;  29:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// Return value should be a string for single valued property or array of strings for multi valued property (e.g. TestCategory) &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum30"&gt;  30:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum31"&gt;  31:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;object&lt;/span&gt; PropertyValueProvider(TestCase currentTest, &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; propertyName) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum32"&gt;  32:&lt;/span&gt; { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum33"&gt;  33:&lt;/span&gt;     TestProperty testProperty; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum34"&gt;  34:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (supportedPropertiesCache.TryGetValue(propertyName, &lt;span style="color: rgb(0, 0, 255);"&gt;out&lt;/span&gt; testProperty)) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum35"&gt;  35:&lt;/span&gt;     { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum36"&gt;  36:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// Test case might not have defined this property. In that case GetPropertyValue() &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum37"&gt;  37:&lt;/span&gt;         &lt;span style="color: rgb(0, 128, 0);"&gt;// would return default value. For filtering, if property is not defined return null. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum38"&gt;  38:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;if&lt;/span&gt; (currentTest.Properties.Contains(testProperty)) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum39"&gt;  39:&lt;/span&gt;         { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum40"&gt;  40:&lt;/span&gt;             &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; currentTest.GetPropertyValue(testProperty); &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum41"&gt;  41:&lt;/span&gt;         } &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum42"&gt;  42:&lt;/span&gt;     } &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum43"&gt;  43:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum44"&gt;  44:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum45"&gt;  45:&lt;/span&gt;&amp;#160; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum46"&gt;  46:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum47"&gt;  47:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// Provides TestProperty for property name 'propertyName' as used in filter. &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum48"&gt;  48:&lt;/span&gt; &lt;span style="color: rgb(0, 128, 0);"&gt;/// &amp;lt;/summary&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum49"&gt;  49:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;static&lt;/span&gt; TestProperty PropertyProvider(&lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; propertyName) &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum50"&gt;  50:&lt;/span&gt; { &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum51"&gt;  51:&lt;/span&gt;     TestProperty testProperty = &lt;span style="color: rgb(0, 0, 255);"&gt;null&lt;/span&gt;; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum52"&gt;  52:&lt;/span&gt;     supportedPropertiesCache.TryGetValue(propertyName, &lt;span style="color: rgb(0, 0, 255);"&gt;out&lt;/span&gt; testProperty); &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum53"&gt;  53:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;return&lt;/span&gt; testProperty; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span style="color: rgb(96, 96, 96);" id="lnum54"&gt;  54:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;If you've any feedback or issue then please do send us on &lt;/font&gt;&lt;a href="http://connect.microsoft.com/VisualStudio"&gt;&lt;font size="3"&gt;Connect&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; or in the &lt;/font&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstest/threads"&gt;&lt;font size="3"&gt;Forums&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;u&gt;&lt;font size="3" face="Arial"&gt;&lt;/font&gt;&lt;/u&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10332545" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Unit+Testing/">Unit Testing</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Managed/">Managed</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/TestCaseFilter/">TestCaseFilter</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Command+Line/">Command Line</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/VS+2012/">VS 2012</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Test+Adapters/">Test Adapters</category></item><item><title>Running Unit Tests for Windows Metro style apps from Command Line</title><link>http://blogs.msdn.com/b/vikramagrawal/archive/2012/05/06/running-unit-tests-for-windows-metro-style-apps-from-command-line.aspx</link><pubDate>Sun, 06 May 2012 16:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10301555</guid><dc:creator>Vikram Agrawal [MSFT]</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/vikramagrawal/rsscomments.aspx?WeblogPostID=10301555</wfw:commentRss><comments>http://blogs.msdn.com/b/vikramagrawal/archive/2012/05/06/running-unit-tests-for-windows-metro-style-apps-from-command-line.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;a href="http://www.microsoft.com/download/en/details.aspx?id=27543"&gt;Visual Studio 11 Beta&lt;/a&gt; was announced&amp;nbsp;sometime back&amp;nbsp;along with &lt;a href="http://windows.microsoft.com/en-US/windows-8/consumer-preview"&gt;Win 8 consumer preview&lt;/a&gt;&amp;nbsp;in which &lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx"&gt;Unit testing&lt;/a&gt; has been redefined and support for testing Windows Metro style apps is added.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Tests for Metro style apps can be run from Visual Studio, Command Line&amp;nbsp;and Team Build. Steps to create and run&amp;nbsp;unit test from Visual Studio and Team Build&amp;nbsp;are described in &lt;a title="Walkthrough: Creating and Running Unit Tests for Metro style Applications" href="http://msdn.microsoft.com/en-us/library/hh440545(v=VS.110).aspx"&gt;Walkthrough: Creating and Running Unit Tests for Metro style Applications&lt;/a&gt; and &lt;a title="Running Windows 8 Metro style tests in TeamBuild" href="http://blogs.msdn.com/b/bhuvaneshwari/archive/2012/03/08/running-win8-metro-style-tests-in-teambuild.aspx"&gt;Running Windows 8 Metro style tests in TeamBuild&lt;/a&gt;&amp;nbsp;respectively.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;This post explains how to run Unit Test for Metro style apps from Command Line tool (vstest.console.exe)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;strong&gt;Installing Unit Testing Command Line tool&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Unit testing command line tool get installed with Visual Studio 11 Beta. Command Line test runner, vstest.console.exe, is installed at $(VSInstallDir)/Common7/IDE/CommonExtensions/Microsoft/TestWindow. It's also get installed with Remote Debugger SKU.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;Creating App Package for Unit Test Library&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Create a Unit Test Library Project for Managed (C#/VB) or Native (C++) in Visual Studio. Steps for creating project&amp;nbsp;are same as in &lt;a title="Walkthrough: Creating and Running Unit Tests for Metro style Applications" href="http://msdn.microsoft.com/en-us/library/hh440545(v=VS.110).aspx"&gt;Walkthrough: Creating and Running Unit Tests for Metro style Applications&lt;/a&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;After tests are authored and&amp;nbsp;ready to run from command line create an app package (.appx file) as follows:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on the project in Solution Explorer.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Go to Store -&amp;gt; Create App Package...&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Select "Create a package to use locally only" and click Next&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Set desired Package location and Build configuration&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Cl&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;ick Create&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Click OK&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Inside&amp;nbsp;a folder&amp;nbsp;in "Package location" specified in above steps following files can be found:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;filename&amp;gt;.appx -&amp;gt; App package file for test project. It contains test binary and all Unit Testing platform binaries.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;filename&amp;gt;.cer -&amp;gt; Certificate file corresponding&amp;nbsp;to .pfx file used to sign&amp;nbsp;package.&amp;nbsp;It needs to be added to trusted certificates to install package.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;filename&amp;gt;.appxsym -&amp;gt; Package containing public symbols of app package. (Not required for our scenario)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;filename&amp;gt;.bat -&amp;gt; Batch file created with package to install package. (Not required for our scenario)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;If you want to execute test on some other system (like ARM machine with Remote Debugger SKU) then copy .appx and .cer files on to that machine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: x-small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif;"&gt;Executing Unit Tests for Metro style apps from command line&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;Install Dev License:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Install &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465430.aspx"&gt;developer license&lt;/a&gt; on the box where test needs to be executed. This is needed to run unit tests for Metro style apps. This is onetime task per machine (may require renewing license, if expired).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;Installing the certificate:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;On machine where want to run test from command line, install certificate. This is a one time operation per certificate and can be done&amp;nbsp;as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;a. From an elevated command prompt execute command &amp;ldquo;Certutil -addstore root &amp;lt;filename&amp;gt;.cer&amp;rdquo; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;Executing tests:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Test for Metro style app can be executed from command line as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;"&amp;lt;TestToolPath&amp;gt;\vstest.console.exe" "&amp;lt;AppxPath&amp;gt;\&amp;lt;filename&amp;gt;.appx" /InIsolation&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;TestToolPath&amp;gt; is location where vstest.console.exe is installed (VS installs it at $(VSInstallDir)/Common7/IDE/CommonExtensions/Microsoft/TestWindow).&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;lt;AppxPath&amp;gt; is where App Package for test is present.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;/InIsolation is required as tests for Metro style apps can't be run in inproc mode. If option is not given then it will generate a warning.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Command line test runner (vstest.console.exe) will install app package, execute tests and uninstall package.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;More options:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;/Logger:trx option can be used to generate trx file which can be opened in VS to analyze failures.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;/TestCaseFilter can be used to selectively run tests. More info can be found at &lt;a title="TestCaseFilter in VS11 Unit Testing" href="http://blogs.msdn.com/b/vikramagrawal/archive/2012/04/27/testcasefilter-in-vs11-unit-testing.aspx"&gt;TestCaseFilter in VS11 Unit Testing&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;/Tests &amp;amp; /ListTests&amp;nbsp;options&amp;nbsp;are not valid for Metro style app&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;Common Errors and Resolutions:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;a. Don't give dll file directly for test execution. Directly giving dll file will not execute test in appcontainer mode (in which Metro style app executes). Create app package as described above and use it for test execution in appcontainer mode.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;b. Test project has its own manifest file and it is not derived from references. Set proper capabilities required to run tests in manifest file of test project.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;c.&amp;nbsp;To execute test as&amp;nbsp;64 bits&amp;nbsp;on a 64 bits&amp;nbsp;machine, use /platform:x64 option. By default, tests are executed as 32 bits on 64s bit machine.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;d. If you are taking dependency on some SDK (like C++ test project takes dependency on VSLib SDK) then required dependency packages are copied in "Dependencies" folder with app package by package builder. If copying app package to another location or machine then&amp;nbsp;copy "Dependencies" folder along with package.&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;span style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;" lang="EN"&gt;If you've any feedback or issue then please do send us on &lt;a href="http://connect.microsoft.com/VisualStudio"&gt;Connect&lt;/a&gt; or in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstest/threads" target="_blank"&gt;Forums&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10301555" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Unit+Testing/">Unit Testing</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/WinRT/">WinRT</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/VS11/">VS11</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Command+Line/">Command Line</category></item><item><title>TestCaseFilter in VS11 Unit Testing (Beta)</title><link>http://blogs.msdn.com/b/vikramagrawal/archive/2012/04/27/testcasefilter-in-vs11-unit-testing.aspx</link><pubDate>Fri, 27 Apr 2012 05:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10298329</guid><dc:creator>Vikram Agrawal [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/vikramagrawal/rsscomments.aspx?WeblogPostID=10298329</wfw:commentRss><comments>http://blogs.msdn.com/b/vikramagrawal/archive/2012/04/27/testcasefilter-in-vs11-unit-testing.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;(For VS2012 RC new filter operators are described at &lt;a href="http://blogs.msdn.com/b/vikramagrawal/archive/2012/07/23/running-selective-unit-tests-in-vs-2012-rc-using-testcasefilter.aspx"&gt;Running selective unit tests in VS 2012 RC using TestCaseFilter&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;New unit testing platform in Visual Studio 11.0 Beta (&lt;a href="http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx"&gt;http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx)&lt;/a&gt; provides a new way to selectively execute test based on filtering condition through TestCaseFilter. TestCaseFilter can as specified as a string while executing tests through command line (vstest.console.exe), Team Build (when running test using “Visual Studio Test Runner”) or through Test platform client API.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Support for adapters to leverage this feature is provided in test platform. MSTest adapter shipped with Visual Studio 11.0 Beta for executing managed test provide basic filtering in Beta version described below (more enhanced filtering expression support to be added in future versions).&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;strong&gt;Specifying TestCaseFilter:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Command Line&lt;/span&gt;      &lt;br /&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;New command line runner for executing tests in VS 11.0 (vstest.console.exe) has an optional command line parameter /TestCaseFilter for specifying filtering expression. /TestCaseFilter cannot be specified with /Tests argument.&lt;/span&gt;        &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. vstest.console.exe test.dll /TestCaseFilter:”TestCategory=Nightly”&lt;/span&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Team Build&lt;/span&gt;      &lt;br /&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;When adding a test activity in build definition, if user selects to execute test using “Visual Studio Test Runner” then user get to specify test case filter (optional can be left blank to run all tests).&lt;/span&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium; text-decoration: underline;"&gt;Client API&lt;/span&gt;      &lt;br /&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;When using Test Platform Client API for executing test then filtering expression can be specified in TestRunCriteria.TestCaseFilter property.&lt;/span&gt;        &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g.&lt;/span&gt;        &lt;br /&gt;&lt;code class="csharp"&gt;TestRunCriteria runCriteria = CreateTestRunCriteria();         &lt;br /&gt; runCriteria.TestCaseFilter = “TestCategory=Nightly”;&lt;/code&gt;&lt;/p&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;   &lt;br /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;strong&gt;Syntax for filtering expression:&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Adapters can choose their own syntax for filtering or take advantage of support provided by Test Platform by MSTest adapter syntax. Following is syntax for MSTest adapter for managed test execution. Invalid filtering expressions will be ignored and all tests will be executed.     &lt;br /&gt;&lt;/span&gt;    &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Two operators supported in Beta are&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;= (equals): For specifying &amp;lt;property&amp;gt;=&amp;lt;value&amp;gt;. A test is selected for execution if specified property for test has given value. &lt;/span&gt;&lt;/p&gt;      &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. TestCaseFilter=”Priority=1”&lt;/span&gt;&lt;/p&gt;     &lt;span&gt;&lt;code class="csharp"&gt;[TestMethod, Priority(1)] // Executed         &lt;br /&gt;public void TestMethod1(){}          &lt;br /&gt;          &lt;br /&gt;[TestMethod, Priority(2)] // Not Executed as value not matching          &lt;br /&gt;public void TestMethod2(){}          &lt;br /&gt;          &lt;br /&gt;&lt;/code&gt;&lt;/span&gt;      &lt;ol&gt;       &lt;li&gt;         &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Expression having invalid property will be ignored.&lt;/span&gt;            &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. for MSTest filter expression “abcd=xyz” will be ignored as “abcd” is not a valid property.             &lt;br /&gt;              &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Absence of value for property is treated as false.&lt;/span&gt;            &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. TestCaseFilter=”Priority=1”             &lt;br /&gt;&lt;/span&gt;&lt;code class="csharp"&gt;[TestMethod] // Not executed as no priority             &lt;br /&gt; public void TestMethod3(){}              &lt;br /&gt;&amp;#160;&lt;/code&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;For multi valued property like TestCategory, it will check in value in present in all values of property.&lt;/span&gt;            &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. TestCaseFilter=”TestCategory=Nightly”             &lt;br /&gt;&lt;/span&gt;&lt;code class="csharp"&gt;[TestMethod, TestCategory(“TeamBuild”), TestCategory(“Nightly”)] // Execute as one of multiple values matches             &lt;br /&gt; public void TestMethod4(){}              &lt;br /&gt;              &lt;br /&gt;&lt;/code&gt;&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Leading &amp;amp; trailing Spaces for properties and values in filter expressions are ignored.&lt;/span&gt;            &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. TestCaseFilter=” Prioity =&amp;#160; 1 ”             &lt;br /&gt;&lt;/span&gt;&lt;code class="csharp"&gt;[TestMethod, Priority(1)] // Executed as leading and trailing spaces ignored.             &lt;br /&gt; public void TestMethod5(){}              &lt;br /&gt;&amp;#160;&lt;/code&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/li&gt;        &lt;li&gt;         &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Properties and values are case insensitive.&lt;/span&gt;            &lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;E.g. TestCaseFilter=”prioity=1”             &lt;br /&gt;&lt;/span&gt;&lt;code class="cplusplus"&gt;[TestMethod, Priority(1)] // Executed as its case insensitive             &lt;br /&gt; public void TestMethod5(){}              &lt;br /&gt;&lt;/code&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;             &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;       &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;|| (OR): Logical OR for specifying multiple property value pair. If one of the expression joined by || evaluates to true then test is executed else filtered out.         &lt;br /&gt;E.g. TestCaseFilter=”TestCategory=Nightly||Priority=1”&amp;gt;           &lt;br /&gt;&lt;/span&gt;&lt;/span&gt; &lt;span&gt;&lt;code class="csharp"&gt;[TestMethod, Priority(1)] // Executed          &lt;br /&gt; public void TestMethod6(){}          &lt;br /&gt; [TestMethod, TestCategory(“Nightly”)] // Executed           &lt;br /&gt; public void TestMethod7(){}          &lt;br /&gt; [TestMethod, Priority(1), TestCategory(“TeamBuild”)] // Executed           &lt;br /&gt; public void TestMethod8(){}          &lt;br /&gt; [TestMethod, TestCategory(“TeamBuild”)] // Not Executed           &lt;br /&gt; public void TestMethod9(){}          &lt;br /&gt; [TestMethod, Priority(2), TestCategory(“TeamBuild”)] // Not Executed           &lt;br /&gt; public void TestMethod10(){}          &lt;br /&gt;&amp;#160;&lt;/code&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="padding-left: 30px;"&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Properties supported by MSTest adapter for filtering are&lt;/span&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Name=&amp;lt;FullyQualifiedTestMethodName&amp;gt;&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;Priority=&amp;lt;PriorityAttributeValue&amp;gt;&lt;/span&gt;&lt;/li&gt;    &lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;TestCategory=&amp;lt;TestCategoryAttributeValue&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;/span&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Note: MSTest adapter in VS11 Beta also works in legacy mode (equivalent of running tests with mstest.exe) for compatibility. In legacy mode, it can not take advantage of new VS11 features TestCaseFilter. Adapter can switch to legacy mode when .testsettings file is specified, forcelegacymode is set to true in .runsettings file or using attributes like HostType.&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: medium;"&gt;&lt;span style="font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en; mso-fareast-language: en-us; mso-bidi-language: ar-sa;" lang="EN"&gt;If you've any feedback or issue then please do send us on &lt;a href="http://connect.microsoft.com/VisualStudio"&gt;Connect&lt;/a&gt; or in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstest/threads" target="_blank"&gt;Forums&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10298329" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Unit+Testing/">Unit Testing</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/VS11/">VS11</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Managed/">Managed</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/TestCaseFilter/">TestCaseFilter</category></item><item><title>How to write tests in WinRT Component DLL project [for VS11 Beta/Consumer Preview]</title><link>http://blogs.msdn.com/b/vikramagrawal/archive/2012/04/26/how-to-write-tests-in-winrt-component-dll-project-for-vs11-beta-consumer-preview.aspx</link><pubDate>Thu, 26 Apr 2012 10:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10297971</guid><dc:creator>Vikram Agrawal [MSFT]</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/vikramagrawal/rsscomments.aspx?WeblogPostID=10297971</wfw:commentRss><comments>http://blogs.msdn.com/b/vikramagrawal/archive/2012/04/26/how-to-write-tests-in-winrt-component-dll-project-for-vs11-beta-consumer-preview.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;span style="font-size: medium;"&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;In this post&amp;nbsp;I just described a way to enable discovery and execution&amp;nbsp;of&amp;nbsp;tests&amp;nbsp;in a WinRT &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Component DLL. &lt;strong&gt;&lt;span style="color: #ff0000; background-color: #ffffff;"&gt;This is not a recommended or supported way to write unit test for WinRT &lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;&lt;span style="color: #ff0000; background-color: #ffffff;"&gt;Component.&lt;/span&gt;&lt;/strong&gt; Recommended way is to create a separate 'Unit Test Library' project.&amp;nbsp;Hence, side effects of adding manifest file etc. in project&amp;nbsp;are not &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;analyzed. Please use this info at your own risk&amp;nbsp;only&amp;nbsp;if you don't have any other option.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Typically developers should test public APIs of components. Recommended way of testing "WinRT Component DLL" is to add "Unit Test Library" project from "Visual C++" -&amp;gt; "Windows Metro style", take reference of WinRT Componenet DLL and test public APIs.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Following steps can enable discovery and execution of tests&amp;nbsp;in WinRT &lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Component DLL and &lt;/span&gt;is only for cases where you don't have any option but to access non public APIs from WinRT Component DLL for testing.&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add new WinRT Component DLL project&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;File -&amp;gt; New -&amp;gt; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Project...&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Visual C++ -&amp;gt; Windows Metro &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;style -&amp;gt; WinRT Component DLL&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add Test SDK references&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project from &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Solution Explorer -&amp;gt; References ... -&amp;gt; Common Properties -&amp;gt; Framework &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;and References&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add New Reference ... -&amp;gt; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Windows -&amp;gt; Extensions&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Select "Microsoft Visual &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Studio Test Core" and "MSTest for Native Projects"&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add Test Include&amp;nbsp;Directory&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project from Solution Explorer &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;-&amp;gt; Properties ... -&amp;gt; Configuration Properties -&amp;gt; C/C++&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Change "Additional &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Include Directories" to $(ProjectDir);$(IntermediateOutputPath);$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add&amp;nbsp;Test Library Directory&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project from &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Solution Explorer -&amp;gt; Properties ... -&amp;gt; Configuration Properties -&amp;gt; &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Linker&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Change "Additional &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Library Directories" to &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add required Property in vcxproj&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project from &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Solution Explorer -&amp;gt; Unload Project&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project from &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Solution Explorer -&amp;gt; Edit '...vcxproj'&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add following property to &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;vcxproj&amp;nbsp; file: &amp;lt;PropertyGroup&amp;gt;&amp;lt;AppxPackage&amp;gt;true&amp;lt;/AppxPackage&amp;gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Close v&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;cxproj file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Right click on project &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;from Solution Explorer -&amp;gt; Reload Project&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add package.appxmanifest&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add package.appxmanifest from a &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;unit test library project to current project.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add images&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add images folder from a unit &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;test library project and add them to project with relative path "Images\&amp;lt;name&amp;gt;.png"&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;In cpp file where adding tests add&lt;/span&gt;&lt;/strong&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;#include CppUnitTest.h"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;using namespace &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Microsoft::VisualStudio::CppUnitTestFramework;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Add tests in cpp file\&lt;/span&gt;&lt;/strong&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;TEST_CLASS(TestClass1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEST_METHOD(TestMethod1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert::Fail(L"Failing &lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Test");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEST_METHOD(TestMethod2)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert::AreEqual(1, 1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;};&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;strong&gt;Run test&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Compile&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Tests should get discover&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Execute tests&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;Effectively your WinRTComponent DLL will be a unit test library also.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Update: Marcelo has found a way to test WinRT internal class which avoids adding package.appxmanifest file &amp;amp; editing vcxproj. Steps are described in his blog &lt;a href="http://marcecaro.blogspot.com/2012/04/unit-testing-private-classes-using-ccx.html"&gt;http://marcecaro.blogspot.com/2012/04/unit-testing-private-classes-using-ccx.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: arial,helvetica,sans-serif; font-size: small;"&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;" lang="EN"&gt;If you've any feedback or issue then please do send us on &lt;a href="http://connect.microsoft.com/VisualStudio"&gt;Connect&lt;/a&gt; or in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/vstest/threads" target="_blank"&gt;Forums&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10297971" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/Unit+Testing/">Unit Testing</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/WinRT/">WinRT</category><category domain="http://blogs.msdn.com/b/vikramagrawal/archive/tags/VS11/">VS11</category></item></channel></rss>