<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.objectsharp.com/CS/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Dave Lloyd's 2 Cents</title><subtitle type="html">A .NET Developer's Perspective</subtitle><id>http://blogs.objectsharp.com/CS/blogs/dave/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.objectsharp.com/CS/blogs/dave/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61129.2">Community Server</generator><updated>2009-09-17T15:14:56Z</updated><entry><title>Generate a Data Driven Coded UI Test from an Action Recording</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2010/03/17/generate-a-data-driven-coded-ui-test-from-an-action-recording.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2010/03/17/generate-a-data-driven-coded-ui-test-from-an-action-recording.aspx</id><published>2010-03-16T23:02:03Z</published><updated>2010-03-16T23:02:03Z</updated><content type="html">&lt;p&gt;One of the very cool new features of VS 2010 and TFS is the ability to turn a manual test into an Automated UI test. As if that wasn’t cool enough how about making it Data Driven and bind it to the original Test Case created by QA. &lt;/p&gt;  &lt;p&gt;Using the new Test Manager that comes with VS Ultimate 2010 your test team can create Test Cases using parameters instead of hard coded data values. This allows the manual test to be executed over multiple iterations and validate several scenarios using just one Test Case. &lt;/p&gt;  &lt;p&gt;If you have such a Test Case stored in TFS it will look something like this. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_7C498965.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_069AADC6.png" width="569" height="319" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the @Value1, @Value2 and @Result under the Action and Expected Result. They represent parameters whose values that are listed below, the steps. &lt;/p&gt;  &lt;p&gt;Assuming the test team executed this Test Case and created an Action Recording. Which means they let Test Manager record their actions while they ran through a manual test of the application. During the manual test and subsequent recording they will have easily, and possibly without even knowing it bound the Parameters to controls in the application. &lt;/p&gt;  &lt;p&gt;From this you can create a Coded UI Test that you can use in part of your arsenal of automated tests against the User Interface.&lt;/p&gt;  &lt;p&gt;Here is what you need to do. &lt;/p&gt;  &lt;p&gt;Open the Test Project where you want to store the Coded&amp;#160; UI Test. And select &lt;strong&gt;Test | New Test…&lt;/strong&gt; from the Visual Studio menu. On the New Test dialog select Coded UI Test, name it and select the test project to add it to. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_257121A4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_047DAEFD.png" width="469" height="395" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As the test is being added to the project you will be prompted with a choice to either Record this test yourself of use an existing action recording. Select &lt;strong&gt;Use an existing action recording.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_48716D47.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_20CAF11D.png" width="483" height="275" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next you will be prompted to select a test case. Find and select the test case created by your QA team that contains Parameters and an action recording discussed earlier. &lt;/p&gt;  &lt;p&gt;The Coded UI test will be generated for you. Minus the Assertions, we’ll add those ourselves. &lt;/p&gt;  &lt;p&gt;You should end up with a Multiplytests class that contains a CodedUITestMethod1(). Rename the method to something more appropriate. In my case I will name it MultiplyTestMethodUI().&lt;/p&gt;  &lt;p&gt;The method will look something like this. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image15_4C9B450C.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image15_thumb_2ACF6C7B.png" width="797" height="192" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the reference to Value1 and Value2. &lt;/p&gt;  &lt;p&gt;We need to add the assertion to this test. &lt;/p&gt;  &lt;p&gt;Place the cursor on a blank line just before the CloseCalc() method call, right click and select &lt;strong&gt;Generate Code for Coded UI Test | Use Coded UI Test Builder…&lt;/strong&gt; from the popup menu. &lt;/p&gt;  &lt;p&gt;Visual Studio will minimize and you will see the Coded UI Test Builder. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image19_5A3DDB47.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image19_thumb_75E2673D.png" width="273" height="72" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Open the Application and drag the cross hair to the control you want to use to validate the result. In my case it’s the Answer Text Box. You will be presented with a property grid for this control. Select the Text property. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_7980821A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_5FAC4BEB.png" width="612" height="399" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click the Add Assertion button on the property grid toolbar and select AreEqual as the comparator and some value. Then click OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_36C136E2.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_6B61931D.png" width="288" height="177" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click Alt+ G to generate the code for the assertion, when prompted enter a name for the method and click &lt;strong&gt;Add and Generate&lt;/strong&gt;. Stop your recording by clicking on the &lt;strong&gt;X &lt;/strong&gt;in the Coded UI Test Builder. We could have done this all manually. I’m all for letting the tool do it for me. :)&lt;/p&gt;  &lt;p&gt;You will notice back in your test method a call will be added to the assertion method you generated. &lt;/p&gt;  &lt;p&gt;At this point we want to pass the &lt;strong&gt;Result&lt;/strong&gt; to the Assertion method. See code below. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image35_03F1306E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image35_thumb_622557DC.png" width="721" height="178" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Go to the method and add a string parameter use this parameter as the expected value of the assertion. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_470C88CE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_7178B9EB.png" width="584" height="130" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Save and build your solution. Open the Test View window and execute the new Coded UI Test you just created. &lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:a63734ec-9e07-4887-b3f8-7cd524417557" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=9dSPfa95ENA" target="_new"&gt;&lt;img src="http://blogs.objectsharp.com/CS/blogs/dave/video87bec2628f39_6576C9B7.jpg" style="border-style:none;" alt=""&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt; Check the test results to see a pass for each Data Row. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_643230D8.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_15BD9E6E.png" width="368" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Take a look at the DataSource Attribute on your test method. It’s pointing back to Test Case 11. Therefore if the test team adds scenarios to their test case your Coded UI Test will run those scenarios also. &lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=198648" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author></entry><entry><title>Happy New Year</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2010/01/12/happy-new-year.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2010/01/12/happy-new-year.aspx</id><published>2010-01-12T15:16:25Z</published><updated>2010-01-12T15:16:25Z</updated><content type="html">&lt;p&gt;It’s been over a month since I wrote an blog entry. I have reasons, Christmas, time off, New Years. I paved my main machine too, it was time. Put a fresh install of Windows 7 on a brand new Solid State Drive. It’s crazy fast. Of course that means fresh installs of everything. Everyday software gets installed first and then I move on to secondary stuff that I don’t use everyday, like Live writer.&amp;#160; &lt;/p&gt;  &lt;p&gt;I am going to try and get out more Blog entries on what's new in 2010. At the moment I am pretty busy. Besides helping with day to day business. I have several presentations coming up. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Today &lt;a href="http://blogs.msdn.com/adamga/"&gt;Adam Gallant&lt;/a&gt; and I are doing a Web Cast titled &lt;a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032436202&amp;amp;EventCategory=2&amp;amp;culture=en-CA&amp;amp;CountryCode=CA"&gt;Quality Assurance in VSTS 2010&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;On January 21st Jeff Zado&amp;#160; and I will be in Waterloo to discuss &lt;a href="http://www.objectsharp.com/company/events/Pages/default.aspx"&gt;Better Application Lifecycle Management with VS 2010&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;On January 27th &lt;a href="http://blogs.objectsharp.com/cs/blogs/deb/"&gt;Deb Forsyth&lt;/a&gt; and I will be at the CTTDNUG in Kitchener presenting &lt;a href="http://www.cttdnug.org/Events/tabid/55/ModuleID/504/ItemID/22/mctl/EventDetails/Default.aspx?selecteddate=1/27/2010"&gt;What’s new in TFS 2010&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I also have Several ALM Assessments to do, plus Deb and I are writing some new courses. &lt;strong&gt;TFS 2010 for QA&lt;/strong&gt; and &lt;strong&gt;TFS 2010 for Developers&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;I’ll get back into the swing of a regular Blog entry sometime this week.&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=191885" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author></entry><entry><title>Build Process Templates</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/16/build-process-templates.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/16/build-process-templates.aspx</id><published>2009-11-16T15:38:20Z</published><updated>2009-11-16T15:38:20Z</updated><content type="html">&lt;p&gt;Making a build script do exactly what you want is easier with 2010?&lt;/p&gt;  &lt;p&gt;When setting up a build there has always been a separation of concerns. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The Build Definition &lt;/li&gt;    &lt;li&gt;The Build Process &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Creating the build definition is much like you are use to in 2008. Right click on the builds node in the Team Explorer and select New Build Definition. It’s no longer a modal wizard, however it’s the same of information. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;p&gt;Name and Description&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;How you want the build to be triggered&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Working folders &lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Build Server and Drop Location&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;Retention Policy&lt;/p&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;However there is a big difference, and it relates to the separation of concerns I mentioned above. In 2008 you could create a project file, that you would later have to edit to get the build to do anything extra ordinary. When you hit create on the project file tab you would be launched into another wizard that allowed you to select the solution to build, the type of configuration you wanted to build, weather or not you wanted tests executed against the build and or static code analysis performed.&lt;/p&gt;  &lt;p&gt;In 2010 the Process tab contains a type of property grid which allows you to change the configuration of the build. This grid is organized into 3 sections Required, Basic and Advanced, allowing you to specify the solutions to build, define the build number, how to deal with tests and code analysis, weather or not to perform test impact analysis or label the source at this build to name just a few. &lt;/p&gt;  &lt;p&gt;Where is all this defined? How would I add extra functionality to my build? What if I wanted to replace a dev.config with a test.config or deploy extra files to the drop location? &lt;/p&gt;  &lt;p&gt;At the top of this tab is a show details expander. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_7125DCF9.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_1EA6FCBD.png" width="486" height="55" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;After expanding this area you will&amp;#160; be able to select from a list of Build Process Templates. &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_42602457.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_0F23EAEE.png" width="504" height="124" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Each template can contain different build processes. Beta2 comes with three templates to get you going. Click New to create your own by selecting a XAML file you have already created a placed in source control, or copy one of the existing templates as a starting point. You will notice also that you can store your Build Template anywhere in source control. In previous versions they only ever existed in one place under source control. &lt;/p&gt;  &lt;p&gt;With 2010 you can create a build using the default template, which will likely do most, and more likely all of what you need it to do. In my experience most teams do not customize their project build files so for them the default template will suffice.&lt;/p&gt;  &lt;p&gt;If you do want to make changes to your Build process you no longer have to edit a confusing poorly documented XML file. Instead when you open the build template in VS you will be presented with a Windows Workflow editor that allows you to edit your build process template.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_2DFA5ECC.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_1F6F3CDA.png" width="528" height="372" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So why did I start this Blog post with a question? Although it does appear to be easier to add functionality to your build process, For those of us who are Windows Workflow challenged there is some learning to do. The good news is it will be better documented and ultimately easier to find solutions. &lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=187557" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Conflict Resolution in TFS 2010</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/09/conflict-resolution-in-tfs-2010.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/09/conflict-resolution-in-tfs-2010.aspx</id><published>2009-11-09T15:00:17Z</published><updated>2009-11-09T15:00:17Z</updated><content type="html">&lt;p&gt;The conflict resolution in previous versions of VSTS/TFS worked ok, but did not have the best user experience for the developer. When a conflict was detected on check in a modal dialogue was dispatched and the developer could resolve the conflicts from there. However getting to all the information you required to resolve the conflict was not at hand.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;In TFS 2010 when you attempt to check in a conflict VS behaves the way it does when you have violated a Check in Policy. One mark for consistency. You will get a warning message as seen below. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_58F50691.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_63462AF1.png" width="385" height="148" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then you will be redirected to the &lt;strong&gt;Pending Changes - Conflicts Tab&lt;/strong&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;From the conflicts tab you can get at the information you need to help you resolve the conflict. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_3076247D.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_761AAE9B.png" width="525" height="123" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Compare&lt;/strong&gt; – Compare the local file with the latest version in source control.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;History&lt;/strong&gt; – See the complete history of all changes to this file. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Annotate&lt;/strong&gt; – Shows you the source file with change set information in the margin. Including who made the change and when. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_4035B981.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_7469E2C7.png" width="330" height="153" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you know what you need to do, click on the expander for a file and select how you want to resolve this conflict. You can AutoMerge, use the Merge Tool to edit the source, or simply select the server version or the local version.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_45A42A25.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_1599D8A4.png" width="512" height="204" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Happy Merging!&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=186912" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Test Driven Development with VS 2010</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/07/test-driven-development-with-vs-2010.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/07/test-driven-development-with-vs-2010.aspx</id><published>2009-11-07T18:03:40Z</published><updated>2009-11-07T18:03:40Z</updated><content type="html">&lt;p&gt;Test Driven Development proposes you should: write the test, watch it fail, write the code, run the test to see it pass, refactor your code.&lt;/p&gt;  &lt;p&gt;This is difficult when your code won’t compile because you haven’t created the method or even the class you are writing a test for. When you are in the middle of writing unit tests you don’t want to have to switch over to create a class with an empty method, it breaks your train of thought. &lt;/p&gt;  &lt;p&gt;In VS 2008 MS introduced the &lt;strong&gt;Generate Method Stub&lt;/strong&gt;&amp;#160; on the &lt;strong&gt;CTRL+.&lt;/strong&gt; smart tag.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_6A40F643.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_69689059.png" width="416" height="51" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In 2010 they have taken this a step further. There are two new features I want to talk about here &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/exbffbc2(VS.100).aspx" target="_blank"&gt;IntelliSense Suggestion Mode&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/dd409796(VS.100).aspx" target="_blank"&gt;Generate From Usage&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#3a3a3a"&gt;IntelliSense has two modes now &lt;strong&gt;Completion Mode&lt;/strong&gt; and &lt;strong&gt;Suggestion Mode&lt;/strong&gt;. You can toggle between these modes with the key sequence &lt;strong&gt;CTRL+ALT+SPACEBAR&lt;/strong&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#3a3a3a"&gt;In completion mode if you entered the name of a type that does not exist, IntelliSense will make suggestions that match what you typed. I’m sure you have noticed that this can be annoying, with the wrong key stroke you end up with code you didn’t want.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_76CEA35F.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_68902A6F.png" width="343" height="126" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;By switching to Suggestion mode IntelliSense will display an edit control allowing you to continue typing even though there are no matches.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_5CFA6D30.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_5C8E3A3B.png" width="345" height="133" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;IntelliSense will even suggest this new class before it’s actually created. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_02F01D87.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_3B9AC794.png" width="342" height="86" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Once you have completed your statement you can use the &lt;strong&gt;CTRL+.&lt;/strong&gt; smart tag to generate this class. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_13F44B6A.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_4C9EF577.png" width="348" height="143" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Or generate a new type altogether, allowing you to select the project it should go in. &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_12AFB28B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_11D74CA1.png" width="295" height="285" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;You can use this new feature to generate a method or property stub also a class, interface, struct or enum.&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=186717" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Reference Highlighting</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/06/reference-highlighting.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/06/reference-highlighting.aspx</id><published>2009-11-06T14:15:50Z</published><updated>2009-11-06T14:15:50Z</updated><content type="html">&lt;p&gt;I’m going to like the new &lt;a href="http://msdn.microsoft.com/en-us/library/ee349251(VS.100).aspx" target="_blank"&gt;Reference Highlighting&lt;/a&gt; in the 2010 code editor. This is like an in place version of the find all references feature. &lt;/p&gt;  &lt;p&gt;To enable/disable this feature:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;For C# Go to&lt;/strong&gt;&amp;#160; &lt;em&gt;Tools &amp;gt; Options &amp;gt;Text Editor &amp;gt; C# &amp;gt; Advanced &lt;/em&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Check “Highlight references to symbol under cursor”&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;For VB Go to&lt;/strong&gt; &lt;em&gt;Tools &amp;gt; Options &amp;gt;Text Editor &amp;gt; Basic &amp;gt; VB Specific        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Check “Enable highlighting of references and keywords”&lt;/em&gt;&lt;/p&gt;    &lt;p&gt;Once enabled (which is the default in Beta 2) place your cursor on almost any symbol and all other references to that symbol will become highlighted.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_51D90849.png"&gt;&lt;img style="border-right-width:0px;display:block;float:none;border-top-width:0px;border-bottom-width:0px;margin-left:auto;border-left-width:0px;margin-right:auto;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_7C453966.png" width="508" height="256" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can navigate between the highlighted text using &lt;strong&gt;CRTL+SHIFT+UP ARROW&lt;/strong&gt; or &lt;strong&gt;CRTL+SHIFT+DOWN ARROW&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Symbols can include declarations, references, and pretty much anything else that Find All References would return. Including classes, objects, variables, methods, and properties.&lt;/p&gt;  &lt;p&gt;In Visual Basic, this also includes: Select Case, Case, End Select, If, Then, ElseIf, and End If. &lt;/p&gt;  &lt;p&gt;For C# code, reference highlighting is not provided for the switch and if constructions, but is provided for other symbols.&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=186672" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Gated Check-in Build Trigger</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/02/gated-check-in-build-trigger.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/11/02/gated-check-in-build-trigger.aspx</id><published>2009-11-02T01:40:47Z</published><updated>2009-11-02T01:40:47Z</updated><content type="html">&lt;p&gt;VS 2010 has a new feature that allows a developer to validate that their code change will merge and successfully build with the current code base on the server before ever checking it in. It’s called the gated Check-in. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How it works &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Create a build type that uses Gated Check-in as it’s trigger for starting the build. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_4D4BFCDE.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_0C3D7D7A.png" width="447" height="283" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Take the code you want to check in and shelve it. &lt;/p&gt;  &lt;p&gt;Then when you queue the build you can specify the Shelve set to be merged with the source from the server. You can also have the build complete your check in if the build is successful. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_2A3B8B6E.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_67E8732A.png" width="446" height="501" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This should help to diminish the number of broken builds on the server. &lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=186471" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Extending VS 2010</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/10/28/extending-vs-2010.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/10/28/extending-vs-2010.aspx</id><published>2009-10-28T19:29:17Z</published><updated>2009-10-28T19:29:17Z</updated><content type="html">&lt;p&gt;In VS 2010 MS has made adding extensions very very easy using the Extension Manager. &lt;/p&gt;  &lt;p&gt;First you may want to change one option under &lt;strong&gt;Environment &amp;gt; Extension Manager. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You want to Load Per User Extensions when running as administrator. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_7EBB72EF.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_0114F4EE.png" width="574" height="114" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you do that, from the Tools menu open the Extension Manager. The Extension manager shows you what extensions you already have installed, and gives you the ability to uninstall or disable them.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_548BC507.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_72F605F0.png" width="559" height="122" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So where do I get extensions from?&lt;/strong&gt; The extension manager helps here too. Select the Online Gallery and you will be able to pick from a list of published VS extensions. You can filter to just see Controls, Templates or Tools. Sorting is a handy way to see what is popular by rating or most downloaded.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_7CDAF75B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_47EDF21E.png" width="566" height="294" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select the extension you want and click Download. You will be prompted to install the package. Now just restart Visual Studio and enjoy your new VS extension. :)&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=185914" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Code Coverage in VS2010</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/10/27/code-coverage-in-vs2010.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/10/27/code-coverage-in-vs2010.aspx</id><published>2009-10-27T20:25:55Z</published><updated>2009-10-27T20:25:55Z</updated><content type="html">&lt;p&gt;VThis took me a few minutes to find. Perhaps I can save someone else those few minutes.&lt;/p&gt;  &lt;p&gt;To turn on Code Coverage locally you need to edit what used to be the &lt;strong&gt;&amp;lt;Local&amp;gt;.TestRunConfig ,&lt;/strong&gt; which is now called the &lt;strong&gt;&amp;lt;Local&amp;gt;.TestSettings&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;The section is not called Code Coverage anymore it’s under &lt;strong&gt;Data and Diagnostics&lt;/strong&gt;. There are a bunch of&amp;#160; tools you can turn on from here including:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_626B62A9.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_21C9163A.png" width="286" height="186" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Select Code Coverage, and the configure button at the top will become enabled. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_39EC8095.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_3575FFCE.png" width="220" height="47" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To select the DLL’s for code coverage click the Configure button. You will get this window, I think you know what to do from here. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_40335723.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_6CDC10FC.png" width="446" height="340" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=185806" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author><category term="VS2010" scheme="http://blogs.objectsharp.com/CS/blogs/dave/archive/tags/VS2010/default.aspx" /></entry><entry><title>Access 2007 &amp; SharePoint</title><link rel="alternate" type="text/html" href="http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/09/17/access-2007-sharepoint.aspx" /><id>http://blogs.objectsharp.com/CS/blogs/dave/archive/2009/09/17/access-2007-sharepoint.aspx</id><published>2009-09-17T14:14:56Z</published><updated>2009-09-17T14:14:56Z</updated><content type="html">&lt;p align="justify"&gt;If you are responsible for content in SharePoint in any way you should take a look at Access. Weather you are just updating information ongoing, or migrating information from an old site, or from other sources Access is the way to go. &lt;/p&gt;  &lt;p align="justify"&gt;I recently had several hundred items that needed to go into a list. The data was sent to me in an Excel spread sheet. So I thought I would look into the Excel Add-ins for SharePoint.&amp;#160; &lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_0C3A13E4.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;margin-left:0px;border-left-width:0px;margin-right:0px;" title="image" border="0" alt="image" align="right" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_2F870889.png" width="245" height="200" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;I knew &lt;strong&gt;Open with Access&lt;/strong&gt; was an option in the list Actions menu but always dismissed it. I didn’t want to open up Access, I haven’t used that old tool in years. However with a need to insert hundreds of list items and a faint hope that using a client application to edit those lists would be a much nicer experience then&amp;#160; using SharePoint itself I clicked on the menu item. &lt;/p&gt;  &lt;p align="justify"&gt;You can completely manage your list with Access. &lt;/p&gt;  &lt;p&gt;You don’t even have to log in to the SharePoint site via your browser. Open Access, then from the &lt;em&gt;External Data&lt;/em&gt; tab on the ribbon select &lt;em&gt;SharePoint Lists&lt;/em&gt; then &lt;em&gt;Existing SharePoint List&lt;/em&gt;. Enter the URL of the SharePoint site, log in and select the option &lt;strong&gt;Link to the Data source by creating a linked table.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;At this point select the lists you would like to work with and they will be added as tables in Access linked directly to SharePoint. Now that you have your list as an Access table the options for managing that data is endless. &lt;/p&gt;  &lt;p&gt;You can update, insert and Delete using &lt;strong&gt;SQL&lt;/strong&gt; Statements.&lt;/p&gt;  &lt;p&gt;You can import data from multiple sources including Excel, Another SharePoint List, Text, XML, Word Mail merge, HTML, ODBC and more. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.objectsharp.com/CS/blogs/dave/image_752B92A7.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.objectsharp.com/CS/blogs/dave/image_thumb_627698F0.png" width="567" height="97" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Trust me this is an option you will be happy you explored. &lt;/p&gt;&lt;img src="http://blogs.objectsharp.com/CS/aggbug.aspx?PostID=182724" width="1" height="1"&gt;</content><author><name>dave</name><uri>http://blogs.objectsharp.com/CS/members/dave.aspx</uri></author></entry></feed>