<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://ciontfs.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>TFS Advantage</title><link>http://ciontfs.com/blogs/</link><description>Furthering Continuous Integration Efforts on Microsoft Visual Studio Team System Team Foundation Server</description><dc:language>en-US</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Creating and using a test base class</title><link>http://ciontfs.com/blogs/tim/archive/2008/06/26/creating-and-using-a-test-base-class.aspx</link><pubDate>Thu, 26 Jun 2008 05:45:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:32</guid><dc:creator>tim</dc:creator><slash:comments>0</slash:comments><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;After writing unit tests for awhile, you will observe there are common patterns and common needs.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;One way to fulfill some of these needs is to use a “test base class” or an “abstract test class”.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Using such a pattern for &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms182469(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;MSTest&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; can help you create more robust unit tests with less code.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;The concept is pretty straight forward.&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;Basically, create a base class that can perform some mundane or defensive programming tasks for you.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;In &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms182469(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;MSTest&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;, this is accomplished by create a new class (or unit test class) in either your test assembly or a common assembly (that is also a test assembly).&lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/span&gt;You cannot make it truly abstract (that leads to some funkiness), but you can inherit from in when you create a new unit test class by decorating it with the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testmethodattribute(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;TestMethod&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; attribute. &lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;You can push the typical &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms404699(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;TestContext&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; property up to a base unit test class, as well as provide virtual methods for &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testinitializeattribute(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;TestInitialize&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt; and &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testcleanupattribute(VS.80).aspx"&gt;&lt;font face="Calibri" size="3"&gt;TestCleanup&lt;/font&gt;&lt;/a&gt;&lt;font face="Calibri" size="3"&gt;.&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Things to think about for you Test Base class:&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;Mock out items and clean up all your mocking&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="MARGIN:0in 0in 0pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;Clean up your dead files&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="FONT:7pt &amp;#39;Times New Roman&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;Add support methods to copy test files&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;using System;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using Microsoft.VisualStudio.TestTools.UnitTesting;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;namespace TestSupport&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Summary description for UnitTest1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;/summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TestClass]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class TestBase&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private TestContext testContextInstance;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///Gets or sets the test context which provides&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///information about and functionality for the current test run.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&amp;lt;/summary&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public virtual TestContext TestContext&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return testContextInstance;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; testContextInstance = value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ClassInitialize]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MyClassInitialize(TestContext testContext) { }&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ClassCleanup]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void MyClassCleanup() { }&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected bool _testInitializedRan;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TestInitialize]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public virtual void MyTestInitialize() &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _testInitializedRan = true;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TestCleanup]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public virtual void MyTestCleanup() { }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TestClass]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class MyTestClass : TestBase &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [TestMethod]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void ShowsThatTestInitializeRan()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.IsTrue(_testInitializedRan);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="MARGIN:0in 0in 10pt 0.5in;TEXT-INDENT:-0.25in;mso-list:l0 level1 lfo1;"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-no-proof:yes;"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/span&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=32" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/TDD/default.aspx">TDD</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/templates/default.aspx">templates</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/Typemock/default.aspx">Typemock</category></item><item><title>Survey questions for customized training session on Visual Studio 2008 - Unit Testing - TDD - Continuous Integration - Team Foundation Server</title><link>http://ciontfs.com/blogs/tim/archive/2008/06/10/survey-questions-for-customized-training-session-on-visual-studio-2008-unit-testing-tdd-continuous-integration-team-foundation-server.aspx</link><pubDate>Wed, 11 Jun 2008 03:48:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:27</guid><dc:creator>tim</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m putting on a two day training session for a group where some participants might be completely new to unit testing and/or TDD.&amp;nbsp; Almost all are new to TFS.&amp;nbsp; I put together a survey for the participants to gauge my audience.&amp;nbsp; I thought this might be a useful resource for others for looking into training, thinking about training or perhaps even job interview material.&amp;nbsp; Here it is in its raw format directly from the survey engine.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="S_content"&gt;
&lt;h1&gt;TFS Advantage - Continuous Integration Development with Team Foundation Server 2008&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;How much professional programming experience do you have?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt; 1 yr 
&lt;li&gt;1 - 2 years 
&lt;li&gt;3 - 5 years 
&lt;li&gt;6 - 10 years 
&lt;li&gt;Let&amp;#39;s swap stories about the price per megabyte of your first hard drive 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;How much experience (formal or informal) do you have with designing or writing unit tests?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;What&amp;#39;s a unit test? 
&lt;li&gt;I&amp;#39;ve played around with writing a few unit tests in my spare time. 
&lt;li&gt;Some experience on some project somewhere 
&lt;li&gt;I participated in writing a lot of unit tests before in my recent project(s) as part of my daily activities 
&lt;li&gt;It&amp;#39;s the first thing I think of before writing production code. 
&lt;li&gt;Some people like to refer to me as Kent Beck, Jr. 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;Which best describes how you think writing unit tests will impact your software project’s development life cycle?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;Writing unit tests is a waste of time. 
&lt;li&gt;Writing unit tests will ensure our success. 
&lt;li&gt;Writing unit tests is one activity that helps in our development cycle. 
&lt;li&gt;Writing unit tests is something quality assurance (QA) should be doing. 
&lt;li&gt;Writing unit tests is a good idea, but it slows us down too much. 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;Which answer best describes your experience with continuous integration? &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;What&amp;#39;s continuous integration? 
&lt;li&gt;Someone else&amp;#39;s project used that once, it looked intriguing. 
&lt;li&gt;I worked with it on a project or two in the past. 
&lt;li&gt;My experience has shown me it&amp;#39;s a valuable part of the software development life cycle. 
&lt;li&gt;This stuff rocks, I should be the build master! 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;Which answer best describes the optimal time to write unit tests in your software development process?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;Before you even create the production code. 
&lt;li&gt;When you are having a tough time figuring out how to design a component of your system. 
&lt;li&gt;Before you check in your code. 
&lt;li&gt;When you find a bug in your component. 
&lt;li&gt;Again, isn&amp;#39;t this QA&amp;#39;s job? 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;Which answer best describes how many files is a “good” submission to the source code repository participating in a continuous integration process?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;A few files, even if the component is just beginning to take shape. 
&lt;li&gt;No more than ten, otherwise it’s tough to perform a code review. 
&lt;li&gt;You should be completely done with your component before checking in, so as many files as it takes. 
&lt;li&gt;Thirty or fewer, one minute per file in the build, you can&amp;#39;t wait longer than that. 
&lt;li&gt;None. With continuous integration, the build server does most of the coding for you. 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;Which answer best describes your perception of the term “TDD” or “test driven development” or “test driven design”?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;#39;s another fad in software engineering we will all have a good chuckle about in five years. 
&lt;li&gt;I write some pretty solid code, but this is good stuff for junior developers. 
&lt;li&gt;I&amp;#39;m intrigued, tell me more! 
&lt;li&gt;I think it will help us produce higher quality software. 
&lt;li&gt;I think it could be the only way I approach developing software from here on out. 
&lt;li&gt;Kent Beck, Jr? Some people call me Kent Beck, Sr! 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="qDiv"&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;If you have a class (managed .net class, unmanaged C++ class, basic unit of code, etc) in your software’s source code that is 200 lines of code, how many lines of test code would you consider being sufficient or reasonable?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="note" class="note"&gt;(Please tick just &lt;span class="b"&gt;one&lt;/span&gt; of the following boxes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class="qt400" class="qt400"&gt;
&lt;ul&gt;
&lt;li&gt;about 50 lines 
&lt;li&gt;about 50 - 150 lines 
&lt;li&gt;about 150 - 300 lines 
&lt;li&gt;about 300 - 600 lines 
&lt;li&gt;about 600 - 1200 lines 
&lt;li&gt;The more the better, I&amp;#39;m not done writing tests for my first &amp;#39;hello world&amp;#39; program yet! 
&lt;li&gt;This question does not apply to my participation in the sessions.&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;What would you like to learn from these sessions? (Feel free to mention specific technologies, methodologies, patterns, etc.)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;
&lt;table class="q" class="q"&gt;

&lt;tr&gt;
&lt;td class="qt" class="qt"&gt;What activities do you find the most effective for your learning style in training sessions like these?&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=""&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;br /&gt;&lt;span class="line"&gt;_____________________________________________________________________&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=27" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/TDD/default.aspx">TDD</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/TFS/default.aspx">TFS</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/Training/default.aspx">Training</category></item><item><title>Building Compact Framework Unit Tests in Microsoft Team Foundation Server with Team Foundation Build</title><link>http://ciontfs.com/blogs/tim/archive/2008/06/04/building-compact-framework-unit-tests-in-microsoft-team-foundation-server-with-team-foundation-build.aspx</link><pubDate>Wed, 04 Jun 2008 12:13:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:21</guid><dc:creator>tim</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You still can&amp;#39;t run compact framework unit tests in Team Foundation Build very easily.&amp;nbsp; &amp;lt;ShamelessPlug&amp;gt;You&amp;#39;ll be able to with &lt;a href="http://ciontfs.com/content/THCF.aspx"&gt;TFS Advantage - Compact Framework Edition&lt;/a&gt;&amp;lt;/ShamelessPlug&amp;gt;&amp;nbsp; Anyway, you would think you could compile them consistently though, right?&lt;/p&gt;
&lt;p&gt;Well, that&amp;#39;s not always the case.&amp;nbsp; I was helping out &lt;a href="http://blog.opennetcf.com/ctacke/"&gt;Chris Tacke&lt;/a&gt; of &lt;a href="http://blog.opennetcf.com/"&gt;OpenNETCF&lt;/a&gt;&amp;nbsp;with a problem he was having with build failures on solutions that contained:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;Compact Framework (CF) projects&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Compact Framework unit test projects&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;MSTest private&amp;nbsp;accessors&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Were participating in a continuous integration process under Team Foundation Build using&amp;nbsp;Microsoft Team Foundation Server.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;He has had success with all of these technologies independently, but when combined together, it went boom!&amp;nbsp; You know when a problem mentions four different technologies it&amp;#39;s always a fun one to solve. ;-)&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;The Setup&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Chris has CF projects, CF unit test assemblies, &lt;em&gt;&lt;b&gt;some&lt;/b&gt;&lt;/em&gt; private accessors and he submits to the build.&amp;nbsp; The build fails with &amp;quot;API restriction&amp;quot;.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the error:&lt;/p&gt;&lt;font face="Courier New"&gt;
&lt;hr /&gt;

&lt;p&gt;Using &amp;quot;BuildShadowTask&amp;quot; task from assembly &amp;quot;C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest\Microsoft.VisualStudio.TestTools.BuildShadowsTask.dll&amp;quot;.&lt;/p&gt;
&lt;p&gt;Task &amp;quot;BuildShadowTask&amp;quot;&lt;/p&gt;
&lt;p&gt;C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest\Microsoft.TeamTest.targets(14,5): error : API restriction: The assembly &amp;#39;file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll&amp;#39; has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.&lt;/p&gt;
&lt;p&gt;Done executing task &amp;quot;BuildShadowTask&amp;quot; -- FAILED.&lt;/p&gt;
&lt;p&gt;Done building target &amp;quot;ResolveTestReferences&amp;quot; in project &amp;quot;TestProject1.csproj&amp;quot; -- FAILED.&lt;/p&gt;
&lt;hr /&gt;
&lt;/font&gt;
&lt;p&gt;What&amp;#39;s going on here?&amp;nbsp; I don&amp;#39;t know &lt;strong&gt;&lt;em&gt;exactly&lt;/em&gt;&lt;/strong&gt;, but I&amp;#39;ve got some bits and a workaround.&lt;/p&gt;
&lt;p&gt;The BuildShadowTask is a component used by the Microsoft.TeamTest.targets used to build the private accessor DLL (e.g. myproject_accessor.dll) that a unit test uses to get at private and protected members of a test target.&lt;/p&gt;
&lt;p&gt;It in turn calls the Publicize.exe executable to do the actual work.&lt;/p&gt;
&lt;p&gt;A bit more on Chris Tacke&amp;#39;s scenario.&amp;nbsp; He&amp;#39;s taken one of my patterns and created a TestClassBase that does some common initialization, cleanup and provides some test specific helper functions.&amp;nbsp; This has been put into a CF unit test assembly that has no real unit tests in it.&amp;nbsp; Since it has no real unit tests in it, it has no private accessors in it either.&lt;/p&gt;
&lt;p&gt;This was essentially the item that triggers the downfall, albeit, he wasn&amp;#39;t doing anything really wrong.&lt;/p&gt;
&lt;p&gt;It appears that when MSBuild, BuildShadowsTask and Publicize do their work, they&amp;#39;re pulling in some copy/version of &lt;font face="Courier New"&gt;Microsoft.VisualStudio.SmartDevices.UnitTestFramework&lt;/font&gt; from somewhere else besides where the rest of the MSBuild process is going to get it from.&amp;nbsp; And, somehow it is being kept in the same AppDomain as the rest of the MSBuild process.&amp;nbsp; (So, I doubt that it is publicize.exe that&amp;#39;s the problem).&amp;nbsp; Or vice versa, MSBuild is pulling one in and then BuildShadowsTask is attempting too as well.&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;The Workaround&lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;

&lt;p&gt;If you are going to use private accessors in any compact framework unit test assembly in your solution, use it in all compact framework unit test assemblies.&amp;nbsp; Even if you have to refer to something you don&amp;#39;t need to make a private accessor.&amp;nbsp; Even if you create a &amp;quot;shill target&amp;quot; assembly, you need to have in it in all of them.&lt;/p&gt;
&lt;p&gt;Also, we had previously attempted to overcome the inability of Team Build to find the &lt;font face="Courier New"&gt;Microsoft.VisualStudio.SmartDevices.UnitTestFramework.dll&lt;/font&gt;&amp;nbsp;by registering it in the GAC.&amp;nbsp; As always, when you mess with fire you get burnt.&amp;nbsp; At this point, I have had Chris has add the following to his build scripts (update&amp;nbsp;the path as appropriate to find &lt;font face="Courier New"&gt;Microsoft.VisualStudio.SmartDevices.UnitTestFramework.dll&lt;/font&gt;)&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;ItemGroup&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;AdditionalReferencePath&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:red;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Include&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\&lt;/span&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;ItemGroup&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt; 
&lt;hr /&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=21" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/TDD/default.aspx">TDD</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/TFS/default.aspx">TFS</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/broken+builds/default.aspx">broken builds</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/private+accessors/default.aspx">private accessors</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/compact+framework/default.aspx">compact framework</category></item><item><title>Code Snippets For Unit Testing (w/Typemock)</title><link>http://ciontfs.com/blogs/tim/archive/2008/06/02/code-snippets-for-unit-testing-w-typemock.aspx</link><pubDate>Mon, 02 Jun 2008 08:17:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:20</guid><dc:creator>tim</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I have uploaded some &lt;a href="http://msdn.microsoft.com/en-us/vs2005/aa718338.aspx"&gt;code snippets&lt;/a&gt; to &lt;a href="http://tfsadvantage.com/files/folders/snippets/entry24.aspx"&gt;download&lt;/a&gt; that use some of my common patterns for unit testing using &lt;a href="http://msdn.microsoft.com/en-us/library/ms182448(VS.80).aspx"&gt;MSTest&lt;/a&gt;.&amp;nbsp; Some are &lt;a href="http://typemock.com/"&gt;Typemock &lt;/a&gt;centric.&amp;nbsp; Some depend on helper methods which are unpublished; implement in your own code or delete the references to them.&amp;nbsp; They&amp;#39;re not polished for release by any means, but you may find them useful.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a quick list of what&amp;#39;s in there.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Unit Test For ctor&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utc&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet for a ctor unit test.&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Property = null&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utpn&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet for unit test to test setting a non-nullable property to a null value.&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Unit Test A Property&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utp&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet for unit test to test a property&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Unit Test&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utcp&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet for unit test to test a ctor that accepts a value that sets a property.&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Property = (argument out of range)&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utpiv&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet to unit test setting a property to an invalid value and receiving a ArgumentOutRangeException.&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Unit Test a method on a target.&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;utm&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet to unit test a method on the target.&amp;lt;/Description&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Title&amp;gt;Typemock Recorder Block&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Shortcut&amp;gt;rx&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Description&amp;gt;Code snippet for a recorder block for TypeMock&amp;lt;/Description&amp;gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=20" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/TDD/default.aspx">TDD</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/private+accessors/default.aspx">private accessors</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/Typemock/default.aspx">Typemock</category></item><item><title>Some keys to success with continuous integration and VSTS</title><link>http://ciontfs.com/blogs/tim/archive/2008/05/28/some-keys-to-success-with-continuous-integration-and-vsts.aspx</link><pubDate>Wed, 28 May 2008 11:59:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:16</guid><dc:creator>tim</dc:creator><slash:comments>0</slash:comments><description>&lt;h3 style="MARGIN:10pt 0in 0pt;"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font size="3"&gt;&lt;font color="#4f81bd"&gt;&lt;font face="Cambria"&gt;Third Party Software&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;All third party software should be treated as part of the source code.&amp;nbsp; It needs to be included in the VSTS source code repository using the same &lt;b&gt;&lt;u&gt;relative&lt;/u&gt;&lt;/b&gt; paths as would be expected on a developer’s machine.&amp;nbsp; The exception to this is binaries installed in the GAC (which&amp;nbsp; really is the developer’s enemy, not his friend, but that’s a subject for later).&amp;nbsp; Additionally, the only way to get the same results everywhere is to use the same version everywhere.&amp;nbsp; If the developers are using Acme.dll, version 1.2.3.4 on their machines, the version in source control needs to match.&amp;nbsp; All developers upgrade at the same time.&amp;nbsp; This will prevent late night tail chasing of a build or test failure.&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;To accomplish these goals, place all third party software into an appropriate folder in the “thirdparty” directory of any of your VSTS projects.&amp;nbsp; I typically will place the files there first, then go reference them from my projects.&amp;nbsp; Using this practice, you avoid the “prototyping” and forgetting to update a path before checking in.&amp;nbsp; After setting these references, remember to go into the Source Code Explorer and add them to the appropriate place(s).&amp;nbsp; Include them with your initial check-in of their usage.&lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Most third party software does not require installation, nor registration on a build server to be successful.&lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;h3 style="MARGIN:10pt 0in 0pt;"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font size="3"&gt;&lt;font color="#4f81bd"&gt;&lt;font face="Cambria"&gt;Unit Testing&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;font face="Calibri" size="3"&gt;Couple of items of note about writing unit tests.&amp;nbsp; Unit tests should be automatable, predictable and reproducible.&amp;nbsp; This means no UI elements popping up in them.&amp;nbsp; I rarely recommend modifying production code for testing infrastructure needs.&amp;nbsp; (e.g. exposing a property with a higher than originally intended scope, compiler directives, etc).&amp;nbsp; MSTest does have some great facilities to get to the innards of a production class without having to actual modifying the production code.&amp;nbsp; These are the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms184807.aspx"&gt;&lt;font face="Calibri" size="3"&gt;private accessors&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;;&amp;nbsp; I find these meet 99% of your needs for accessing private members, I chalk the other 1% up to, “oh well, that part won’t be tested as well.”&amp;nbsp; BTW, when I say not to modify production code to meet your testing infrastructure, I mean only that.&amp;nbsp; I modify production code daily to make it more testable, but that’s a completely different development activity.&lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;h3 style="MARGIN:10pt 0in 0pt;"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font size="3"&gt;&lt;font color="#4f81bd"&gt;&lt;font face="Cambria"&gt;Single Directory Compilation&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;It takes a little more upfront work, but I recommend (especially for managed assemblies) to adopt a single output folder strategy. &amp;nbsp;(this might be trickier with unmanaged C++) I do this for a number of reasons:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Non referenced (or loosely coupled assemblies) will be available to other assemblies.&amp;nbsp; In other words, if I have a assembly I build and its pulled into the application at run time, but nothing &lt;b&gt;&lt;i&gt;references&lt;/i&gt;&lt;/b&gt; directly as a project, it will be there from the last compilation.&amp;nbsp; This negates a manual copy/paste operation, or monkeying with post build events in the projects.&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;It’s faster – quite simply, if you do this and set “Copy Local = false”, the compiler/operating system doesn’t have to copy and move all of your referenced assemblies around to keep the dependent assemblies up to date.&amp;nbsp; It builds it into the obj directory, puts a copy into the output, and that’s it.&amp;nbsp; In a larger solution of 100 projects with tons of references and a large dependency tree, compile times skyrocket.&amp;nbsp; This &lt;b&gt;&lt;i&gt;mitigates&lt;/i&gt;&lt;/b&gt; that problem.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;You always know where your outputs are and can quickly see what is up to date and what’s not.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;You can do a “hard clean” (Shift-Del) &lt;b&gt;&lt;i&gt;REAL &lt;/i&gt;&lt;/b&gt;easy.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Oh, and it’s the way the build server is going to build your software anyway, so when you look like the build server, the build server becomes your friend, not your enemy.&amp;nbsp; Some hinky problem that might come up in the build will more than likely produce itself on your box, &lt;b&gt;&lt;i&gt;before&lt;/i&gt;&lt;/b&gt;&lt;i&gt; &lt;/i&gt;you check in.&lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;font face="Calibri" size="3"&gt;My trick to doing this is to prefix your &lt;/font&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;OutputPath&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;font face="Calibri" size="3"&gt; value in your project files with the &lt;/font&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;$(SolutionDir)&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;property (macro), and subsequently your project templates (located in a path similar to &lt;/font&gt;&lt;u&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;C:\Users\tim\Documents\Visual Studio 2008\Templates\ProjectTemplates&lt;/span&gt;&lt;/u&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;/span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;) to have the following.&amp;nbsp; This automagically puts into a single directory compilation strategy.&amp;nbsp; It does NOT set your CopyLocal = false.&lt;/font&gt;&lt;/font&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt; &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:red;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Condition&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt; &amp;#39;$(Configuration)|$(Platform)&amp;#39; == &amp;#39;Debug|AnyCPU&amp;#39; &lt;/span&gt;&amp;quot;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;DebugSymbols&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;true&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;DebugSymbols&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;DebugType&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;full&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;DebugType&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;Optimize&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;false&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;Optimize&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;OutputPath&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;BACKGROUND:aqua;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;mso-highlight:aqua;"&gt;$(SolutionDir)&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE:12pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;\bin\Debug\&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;OutputPath&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;DefineConstants&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;DEBUG;TRACE&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;DefineConstants&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;ErrorReport&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;prompt&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;ErrorReport&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;br /&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;WarningLevel&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;4&lt;span style="COLOR:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#a31515;"&gt;WarningLevel&lt;/span&gt;&lt;span style="COLOR:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="FONT-SIZE:10pt;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&lt;span style="COLOR:blue;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:#a31515;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;PropertyGroup&lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:blue;FONT-FAMILY:&amp;#39;Courier New&amp;#39;;"&gt;&amp;gt;&lt;/span&gt; &lt;/blockquote&gt;
&lt;h3 style="MARGIN:10pt 0in 0pt;"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font face="Cambria" color="#4f81bd" size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 style="MARGIN:10pt 0in 0pt;"&gt;&lt;span style="mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;"&gt;&lt;font size="3"&gt;&lt;font color="#4f81bd"&gt;&lt;font face="Cambria"&gt;&lt;a class="" id="Monitor" title="Monitor" name="Monitor"&gt;&lt;/a&gt;Monitoring The Build&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/h3&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Monitor the build after submitting changes, monitor the status.&amp;nbsp; You can do this using several methods:&lt;/font&gt;&lt;/font&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;ul&gt;
&lt;li&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;The build explorer is available from the Team Explorer right in VS.net.&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font face="Calibri" size="3"&gt;If you install the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/tfs2008/bb980963.aspx"&gt;&lt;font face="Calibri" size="3"&gt;Team Foundation Server Power Tools&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt; (highly recommended), you can run the Build Notification tray app.&lt;/font&gt;&lt;/font&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="FONT-FAMILY:Symbol;mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol;"&gt;&lt;span style="mso-list:Ignore;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;Project Alerts – will email you the results of every build.&amp;nbsp; I have an Outlook rule that moves the successful ones to a subfolder and leaves failed builds in my inbox.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;font face="Calibri" size="3"&gt;On this note, it is pretty important that you come up with your guidelines on what to do when you have a broken build.&amp;nbsp; There are &lt;/font&gt;&lt;a href="http://www.google.com/search?q=blog+%22broken+build%22&amp;amp;rls=com.microsoft:*&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;startIndex=&amp;amp;startPage=1"&gt;&lt;font face="Calibri" size="3"&gt;many blogs are how people handle them&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;&lt;font face="Calibri"&gt;.&amp;nbsp; My practices (depending on the size of the development team) range from the casual to the tightly controlled.&amp;nbsp; In smaller groups, usually the developer who’s submission it was and figures it out and gets if fixed in a reasonable amount of time.&amp;nbsp; When working with large development teams with some reckless developers, I have helped them institute the 3/30 rule, “You get three attempts or 30 minutes.&amp;nbsp; If not fixed by then, roll it back and get out of the way.”&amp;nbsp; What is important is that you come up with your own procedures.&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=16" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/unit+test/default.aspx">unit test</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/templates/default.aspx">templates</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/broken+builds/default.aspx">broken builds</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/third+party+software/default.aspx">third party software</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/private+accessors/default.aspx">private accessors</category></item><item><title>Reinstallation of SQL Server for Team Foundation Server:  Error 29015</title><link>http://ciontfs.com/blogs/tim/archive/2008/05/06/reinstallation-of-sql-server-for-team-foundation-server-error-29015.aspx</link><pubDate>Wed, 07 May 2008 02:08:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:9</guid><dc:creator>re101184</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I was completing an installation of a single-tier TFS system today.&amp;nbsp; Another contractor thought he was going to just get it installed with a click-click-next-next.&amp;nbsp; Anyway, to make a long story shorter, the SQL Server install was completely wrong to meet the TFS needs.&amp;nbsp; So, my inclination was to re-image the server, but that would not be available until the next day.&amp;nbsp; Relunctantly, I opted to do an uninstall/reinstall of SQL Server.&amp;nbsp; I have tried this in the past to no avail.&amp;nbsp; Today would be different, right?&amp;nbsp; Yes and no.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The SQL Server reinstall went pretty good.&amp;nbsp; I got through 80% of the TFS install when I get this message:&amp;nbsp; Error 29105.Team Foundation Report Server Configuration: The SQL Reporting Services databases were not created.&amp;nbsp; Retry?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img height="135" alt="" src="http://tfsadvantage.com/sitefiles/1000/TF29015error.jpg" width="1210" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Someone made the C: drive 2 GB on this server;&amp;nbsp; I don&amp;#39;t know why, but it is.&amp;nbsp; Has this killed me?&amp;nbsp; Oh no, six hours of work down the drain, just when I was feeling pretty good!&lt;/p&gt;
&lt;p&gt;Nope.&amp;nbsp; Turns out, SQL Server leaves the database files in place when you uninstall it.&amp;nbsp; This makes sense.&amp;nbsp; The reporting files are still there and the install does not want to overwrite them.&lt;/p&gt;
&lt;p&gt;In my case, I got it install by deleting the following files from the SQL Server data directory.&lt;/p&gt;
&lt;p&gt;&lt;img height="136" alt="" src="http://tfsadvantage.com/sitefiles/1000/TF29015error2.jpg" width="360" border="0" /&gt;&lt;/p&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=9" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/Installation/default.aspx">Installation</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/TFS/default.aspx">TFS</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/Reporting+Server/default.aspx">Reporting Server</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>How to find all Assemblies with MSTest test classes in a directory in a single LINQ statement</title><link>http://ciontfs.com/blogs/tim/archive/2008/05/05/how-to-find-all-assemblies-with-mstest-test-classes-in-a-directory-in-a-single-linq-statement.aspx</link><pubDate>Mon, 05 May 2008 11:45:00 GMT</pubDate><guid isPermaLink="false">3aab267c-1ab1-44d8-9b64-4b4a48070ee3:5</guid><dc:creator>re101184</dc:creator><slash:comments>0</slash:comments><description>&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;I needed a component that would examine a directory and find all test&amp;nbsp;assemblies in a directory.&amp;nbsp; This sounded like a job for LINQ.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;var&lt;/font&gt;&lt;font size="2"&gt; allFiles = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;from&lt;/font&gt;&lt;font size="2"&gt; fileName &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;in&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Directory&lt;/font&gt;&lt;font size="2"&gt;.GetFiles(directory.FullName, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;*.dll&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;let&lt;/font&gt;&lt;font size="2"&gt; assembly = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Assembly&lt;/font&gt;&lt;font size="2"&gt;.LoadFile(fileName)&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;let&lt;/font&gt;&lt;font size="2"&gt; types = assembly.GetExportedTypes()&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;from&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Type&lt;/font&gt;&lt;font size="2"&gt; t &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;in&lt;/font&gt;&lt;font size="2"&gt; types&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;where&lt;/font&gt;&lt;font size="2"&gt; t.GetCustomAttributes(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;typeof&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;TestClassAttribute&lt;/font&gt;&lt;font size="2"&gt;), &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;).Length &amp;gt; 0&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;select&lt;/font&gt;&lt;font size="2"&gt; assembly ;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;The above LINQ query will:&lt;/font&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;font size="2"&gt;Get all DLL (assemblies) files.&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="2"&gt;Use the *non-preferred* way to load each of the files as an assembly using &lt;a href="http://msdn.microsoft.com/en-us/library/b61s44e8.aspx"&gt;Assembly.LoadFile()&lt;/a&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="2"&gt;Reflect all the public types in the assembly using &lt;a href="http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexportedtypes.aspx"&gt;Assembly.GetExportedTypes()&lt;/a&gt;&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="2"&gt;Retrieve an array of any &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testclassattribute(VS.80).aspx"&gt;TestClassAttribute&lt;/a&gt;s from each type&amp;nbsp;and check to see if there are any&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;&lt;font size="2"&gt;Put the results of into an &lt;a href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable.aspx"&gt;IEnumerable&amp;lt;Assembly&amp;gt;&lt;/a&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;font size="2"&gt;Using this above, in a single statement, I have a managable list of all assemblies in the directory that have a least on &lt;a href="http://msdn.microsoft.com/en-us/library/ms182489(VS.80).aspx"&gt;MSTest&lt;/a&gt; test class in them.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://ciontfs.com/aggbug.aspx?PostID=5" width="1" height="1"&gt;</description><category domain="http://ciontfs.com/blogs/tim/archive/tags/TDD/default.aspx">TDD</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/MSTEST/default.aspx">MSTEST</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://ciontfs.com/blogs/tim/archive/tags/Relection/default.aspx">Relection</category></item></channel></rss>