<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/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>Shai Raiten&amp;#39;s Blog : TDD</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx</link><description>Tags: TDD</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>מפגש קבוצת ALM בנושא אוטומציה ב–Visual Studio 2012</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/20/alm-visual-studio-2012.aspx</link><pubDate>Mon, 20 May 2013 06:06:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:2053737</guid><dc:creator>shair</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=2053737</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/20/alm-visual-studio-2012.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/20/alm-visual-studio-2012.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p dir="rtl"&gt;בשנתיים האחרונות שאני שומע רק על Coded UI&amp;#160; ב – Visual Studio אבל יש עוד כ”כ הרבה מעבר, במפגש הקרוב אני אדבר על כל יכולות האוטומציה ב – Visual Studio 2012 עבור מפתחים ואנשי אוטומציה.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div&gt;נדבר על Unit Test ויכולת ה – Fakes החדשה שמגיעה עם Visual Studio 2012 (מחליף את Pex &amp;amp; Moles)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;ממשק Web Test Manager שמגיע עם Update 2, אשר מאפשר עבודה עם בדיקות ללא MTM.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;חידושים ודרכים יעילות לכתיבת Coded UI ועבודה עם דפדפנים שונים כגון FireFox ו – Chrome.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;Web Performance Test&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div&gt;Load Testing&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p dir="rtl"&gt;בנוסף לא כדאי להפסיד הרצאה של ליאור פרידמן שידבר על ניהול פרוייקטי Agile.&lt;/p&gt;  &lt;p dir="rtl"&gt;&lt;strong&gt;פרטים נוספים ורישום בלינק זה:&lt;/strong&gt; &lt;/p&gt;  &lt;p dir="rtl"&gt;&lt;a href="http://www.eventbrite.com/event/6729031715"&gt;http://www.eventbrite.com/event/6729031715&lt;/a&gt;&lt;/p&gt;  &lt;p dir="rtl"&gt;אשמח לראותכם במפגש!&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=2053737" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Load/default.aspx">Load</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Web/default.aspx">Web</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Load+Test/default.aspx">Load Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Unit+Test/default.aspx">Unit Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Google+Chrome/default.aspx">Google Chrome</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/WebTest/default.aspx">WebTest</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Web+Access/default.aspx">Web Access</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/User+Group/default.aspx">User Group</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Coded+UI+Test/default.aspx">Coded UI Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Quality+Center+2+Team+System+2010/default.aspx">Quality Center 2 Team System 2010</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/HTML+5/default.aspx">HTML 5</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Native/default.aspx">Native</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/ALM/default.aspx">ALM</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/NUnit/default.aspx">NUnit</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4.5/default.aspx">.NET 4.5</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Microsoft+Test+Manager+2012/default.aspx">Microsoft Test Manager 2012</category></item><item><title>VS/TFS 2012 Update 2  &amp; Update 3 CTP</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/08/vs-tfs-2012-update-2-amp-update-3-ctp.aspx</link><pubDate>Wed, 08 May 2013 06:55:20 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:2008183</guid><dc:creator>shair</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=2008183</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/08/vs-tfs-2012-update-2-amp-update-3-ctp.aspx#comments</comments><description>&lt;div class="wlWriterHeaderFooter" style="float:none;margin:0px;padding:4px 0px 4px 0px;"&gt;&lt;iframe src="http://www.facebook.com/widgets/like.php?href=http://blogs.microsoft.co.il/blogs/shair/archive/2013/05/08/vs-tfs-2012-update-2-amp-update-3-ctp.aspx" scrolling="no" frameborder="0" style="border:none;width:450px;height:80px;"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;p&gt;Couple of days ago Brian Harry post about the new release of Update 2 for Visual Studio and TFS 2012, and today another release of Update 3 that isn’t big a Update 1 and 2 but contains a set of bug fixes that can ease you work.&lt;/p&gt;  &lt;p&gt;Before jumping to Update 3, if for some reason you’re not using Update 2 this is the time to read about it and install it!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update 2&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bharry/archive/2013/04/04/vs-tfs-2012-2-update-2-released-today.aspx" target="_blank"&gt;VS/TFS 2012.2 (Update 2)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bharry/archive/2013/05/06/visual-studio-2012-update-2-vs-2012-2-isos-available.aspx"&gt;Visual Studio 2012 Update 2 (VS 2012.2) ISOs available&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bharry/archive/2013/04/29/team-explorer-everywhere-2012-update-2.aspx"&gt;Team Explorer Everywhere 2012 Update 2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_45AE698F.png"&gt;&lt;img title="image" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;display:inline;padding-right:0px;" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_37BBD7FA.png" width="663" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update 3 – CTP&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bharry/archive/2013/05/07/visual-studio-2012-3-update-3-go-live-ctp-is-now-available.aspx"&gt;Visual Studio 2012.3 (Update 3) “go-live” CTP is now available&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;blockquote&gt;   &lt;p&gt;Installing it should be relatively straight forward – for both VS and TFS, just run the installer.&amp;#160; There should be no compatibility breaks so you need not upgrade all of your components at once, though, over time, you should plan to get them all updated&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;List Of Improvements – &lt;a href="http://support.microsoft.com/kb/2835600" target="_blank"&gt;Full List&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;font color="#0000ff"&gt;Technology improvements&lt;/font&gt; - &lt;b&gt;Team Foundation Server&lt;/b&gt;&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;em&gt;Build settings can be preserved when you upgrade a TFS 2012 instance. &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;Improvements are made in the &lt;strong&gt;New Build Definition &lt;/strong&gt;UI for the Continuous Integration (CI) build in Git-based team projects.&lt;/em&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Visual Studio Test&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;b&gt;Web test&lt;/b&gt;&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;Microsoft Visual Studio 2010 crashes when you create a Web test on a computer that has both Visual Studio 2010 Service Pack 1 (SP1) and Visual Studio 2012 Update 2 installed.&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;&lt;b&gt;Coded UI test&lt;/b&gt;&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;You cannot run coded UI together with the cross browser testing feature by using Selenium components.&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;&lt;b&gt;Load test&lt;/b&gt;&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;When you analyze a load test run, parts of the results are missing from the graph in the default view&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;&lt;b&gt;Unit test&lt;/b&gt;&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;&lt;a href="http://connect.microsoft.com/VisualStudio/feedback/details/783438"&gt;783438: Mstest.exe fails to execute unit because of missing assemblies&lt;/a&gt;&lt;/li&gt;     &lt;/ul&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;b&gt;Administration and Operations&lt;/b&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;The event log does not include stack traces when the administrator console crashes.&lt;/li&gt;      &lt;li&gt;You cannot configure TFS proxy on a computer that belongs to a separate domain from a TFS 2012 server.&lt;/li&gt;      &lt;li&gt;TFS 2012 backup plan wizard does not report an error when you configure a backup plan by using the Local System account.&lt;/li&gt;      &lt;li&gt;A user who does not have read permission on an area path can receive email notifications of changes to work items under the area path.&lt;/li&gt;      &lt;li&gt;Slow performance when you open a work item that has many customized fields in TFS Web Access.&lt;/li&gt;      &lt;li&gt;Fix adds upload retries for Version Control files that are being checked in or shelved to reduce the number of deceptive errors.&lt;/li&gt;      &lt;li&gt;&lt;a href="http://support.microsoft.com/kb/2835600" target="_blank"&gt;More&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;    &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=2008183" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS/default.aspx">TFS</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Administration/default.aspx">TFS Administration</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+Utilities/default.aspx">TFS Utilities</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/WorkItem+Tracking/default.aspx">WorkItem Tracking</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Work+Items/default.aspx">Work Items</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Load+Test/default.aspx">Load Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Unit+Test/default.aspx">Unit Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/HotFix/default.aspx">HotFix</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/WebTest/default.aspx">WebTest</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/ITPRO/default.aspx">ITPRO</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Coded+UI+Test/default.aspx">Coded UI Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TFS+2012/default.aspx">TFS 2012</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Visual+Studio+2012/default.aspx">Visual Studio 2012</category></item><item><title>A-s-shole Driven Development</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2011/02/14/asshole-driven-development.aspx</link><pubDate>Mon, 14 Feb 2011 16:15:22 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:787572</guid><dc:creator>shair</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=787572</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2011/02/14/asshole-driven-development.aspx#comments</comments><description>&lt;h1&gt;A-s-shole Driven Development&lt;/h1&gt;  &lt;p&gt;Yes I know this sound interesting and yes it is! &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.microsoft.co.il/blogs/shair/wlEmoticon-smile_254F0ABB.png" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://yanivkessler.com/" target="_blank"&gt;Yaniv Kessler&lt;/a&gt; has sent my that email and I felt that I need to share this knowledge with you!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.scottberkun.com/" target="_blank"&gt;Scott Berkun&lt;/a&gt; wrote a very nice article of what he think is the reason for all those acronyms and frameworks keep piling up in the software industry.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;*** Driven development (ADD)&lt;/em&gt;&lt;/strong&gt; – &lt;em&gt;Any team where the biggest jerk makes all the big decisions is *** driven development. All wisdom, logic or process goes out the window when Mr. *** is in the room, doing whatever idiotic, selfish thing he thinks is best. There may rules and processes, but Mr. A breaks them and people follow anyway.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.scottberkun.com/blog/2007/***-driven-development/" target="_blank"&gt;&lt;strong&gt;&lt;font size="4"&gt;Read the Full Article&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=787572" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET/default.aspx">.NET</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/OFFTOPIC/default.aspx">OFFTOPIC</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Agile/default.aspx">Agile</category></item><item><title>Run Unit Tests in Parallel using Visual Studio 2010</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2010/12/30/run-unit-tests-in-parallel-using-visual-studio-2010.aspx</link><pubDate>Thu, 30 Dec 2010 23:12:33 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:761446</guid><dc:creator>shair</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=761446</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2010/12/30/run-unit-tests-in-parallel-using-visual-studio-2010.aspx#comments</comments><description>&lt;h1&gt;Run Unit Tests in Parallel using Visual Studio 2010&lt;/h1&gt;  &lt;p&gt;Today almost each and every machine have multiple CPU’s or a CPU with multiple cores, so why not using them in order to speed up your tests runs and run more Tests in parallel.&lt;/p&gt;  &lt;p&gt;In Visual Studio 2010 Microsoft added the ability to run Tests (Only for Unit Tests) in parallel.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Data+Collectors/default.aspx"&gt;Data Collectors&lt;/a&gt; cannot be enabled if using Parallel execution. &lt;/li&gt;    &lt;li&gt;You must have multi-core/CPU machine &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_14F6BDD2.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_5956AF11.png" width="783" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;How To Enable Parallel Execution of Unit Tests&lt;/h2&gt;  &lt;p&gt;1. Create new Test Project in Visual Studio 2010&lt;/p&gt;  &lt;p&gt;2. Right click on “Local.testsettings” and click “Open With”, choose “Xml (Text) Editor” and hit OK.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_5CA820EC.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_6F7CA496.png" width="332" height="142" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_56BD5786.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_4D14E950.png" width="447" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;3. Expand the Execution Tag and add additional attribute called – parallelTestCount:&lt;/p&gt;  &lt;p&gt;What’s are your options:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;0 = Auto configure: We will use as many tests as we can based on your CPU and core count &lt;/li&gt;    &lt;li&gt;Define the number of tests to run in parallel – If you don’t want to use all cores/cpu’s &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1D9654B7.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_1B7955EE.png" width="871" height="152" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is my code for that Demo:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_1D19FBF5.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_2692BA6B.png" width="295" height="542" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see from the picture below I have 4 unit tests running in parallel and another picture below you can see my computer finally working &lt;img style="border-bottom-style:none;border-right-style:none;border-top-style:none;border-left-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blogs.microsoft.co.il/blogs/shair/wlEmoticon-smile_310368BE.png" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_50460F91.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_066787E1.png" width="605" height="302" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/shair/image_2A3013A1.png"&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/shair/image_thumb_68B56147.png" width="873" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=761446" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Unit+Test/default.aspx">Unit Test</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TECH/default.aspx">TECH</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Visual+Studio+2010/default.aspx">Visual Studio 2010</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Team+System+2010/default.aspx">Team System 2010</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/.NET+4/default.aspx">.NET 4</category></item><item><title>Behavior Driven Development</title><link>http://blogs.microsoft.co.il/blogs/shair/archive/2008/05/05/behavior-driven-development.aspx</link><pubDate>Mon, 05 May 2008 20:04:46 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:85689</guid><dc:creator>Shai Raiten</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/shair/rsscomments.aspx?PostID=85689</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/shair/archive/2008/05/05/behavior-driven-development.aspx#comments</comments><description>&lt;h1&gt;Behavior Driven Development&lt;/h1&gt;  &lt;p&gt;&lt;b&gt;Behavior Driven Development&lt;/b&gt; (or &lt;b&gt;BDD&lt;/b&gt;) is an Agile software development technique that encourages collaboration between developers, QAs and non-technical or business participants in a software project. It was originally conceived in 2003 by Dan North as a response to &lt;strong&gt;Test Driven Development&lt;/strong&gt;, and has evolved over the last few years.&lt;/p&gt;  &lt;p&gt;The focus of &lt;strong&gt;BDD&lt;/strong&gt; is the language and interactions used in the process of software development. Behavior-driven developers use their native language in combination with the ubiquitous language of &lt;a href="http://en.wikipedia.org/wiki/Domain_driven_design"&gt;Domain Driven Design&lt;/a&gt; to describe the purpose and benefit of their code. This allows the developers to focus on why the code should be created, rather than the technical details, and minimizes translation between the technical language in which the code is written and the domain language spoken by the business, users, stakeholders, project management etc.&lt;/p&gt;  &lt;h4&gt;BDD Practices&lt;/h4&gt;  &lt;p&gt;The practices of &lt;strong&gt;BDD&lt;/strong&gt; include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Driving development from the outside-in &lt;/li&gt;    &lt;li&gt;Using examples to describe the behavior of the application, or of units of code &lt;/li&gt;    &lt;li&gt;Automating those examples to provide quick feedback and regression testing &lt;/li&gt;    &lt;li&gt;Using &amp;#39;should&amp;#39; to help drive out responsibility and allow the behavior to be questioned &lt;/li&gt;    &lt;li&gt;Using &amp;#39;ensure&amp;#39; to differentiate between outcomes which are the responsibility of the code in question, and those caused by other elements of code as a side-effect &lt;/li&gt;    &lt;li&gt;Using mocks to stand-in for modules of code which have not yet been written &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Outside-In&lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;BDD&lt;/strong&gt; is driven by Business Value; that is, the benefit to the business which accrues once the application is in production. The only way in which this benefit can be realized is through the User Interface(s) to the application, usually (but not always) a GUI.&lt;/p&gt;  &lt;p&gt;In the same way, each piece of code, starting with the UI, can be considered a stakeholder of the other modules of code which it uses. Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.&lt;/p&gt;  &lt;p&gt;The first piece of production code that &lt;strong&gt;BDD&lt;/strong&gt; developers implement is the UI. Developers can then benefit from quick feedback as to whether the UI looks and behaves appropriately. Through code, and using principles of good design and refactoring, developers discover collaborators of the UI, and of every unit of code thereafter. This helps them adhere to the principle of &lt;a href="http://en.wikipedia.org/wiki/YAGNI"&gt;YAGNI&lt;/a&gt;, since each piece of production code is required either by the business, or by another piece of code already written.&lt;/p&gt;  &lt;h4&gt;Scenarios, or Application Examples&lt;/h4&gt;  &lt;p&gt;The requirements of a retail application might be, &amp;quot;Refunded or replaced items should be returned to stock.&amp;quot;&lt;/p&gt;  &lt;p&gt;In &lt;strong&gt;BDD&lt;/strong&gt;, a developer or QA might clarify the requirements by breaking this down into specific examples, eg.&lt;/p&gt;  &lt;p&gt;&lt;a name="Scenario_1:_Refunded_items_should_be_returned_to_stock"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h5&gt;Scenario 1: Refunded items should be returned to stock&lt;/h5&gt;  &lt;ul&gt;   &lt;li&gt;Given a customer buys a black jumper &lt;/li&gt;    &lt;li&gt;and I have three black jumpers left in stock &lt;/li&gt;    &lt;li&gt;when he returns the jumper for a refund &lt;/li&gt;    &lt;li&gt;then I should have four black jumpers in stock &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a name="Scenario_2:_Replaced_items_should_be_returned_to_stock"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h5&gt;Scenario 2: Replaced items should be returned to stock&lt;/h5&gt;  &lt;ul&gt;   &lt;li&gt;Given a customer buys a blue jumper &lt;/li&gt;    &lt;li&gt;and I have two blue jumpers in stock &lt;/li&gt;    &lt;li&gt;and three black jumpers in stock &lt;/li&gt;    &lt;li&gt;when he returns the jumper for a replacement in black &lt;/li&gt;    &lt;li&gt;then I should have three blue jumpers in stock &lt;/li&gt;    &lt;li&gt;and two black jumpers in stock &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Each scenario is an &lt;a href="http://en.wikipedia.org/wiki/Exemplar"&gt;exemplar&lt;/a&gt;, designed to illustrate a specific aspect of behavior of the application.&lt;/p&gt;  &lt;p&gt;When discussing the scenarios, participants question whether the outcomes described always result from those events occurring in the given context. This can help to uncover further scenarios which clarify the requirements. For instance, a domain expert noticing that refunded items are not always returned to stock might reword the requirements as &amp;quot;Refunded or replaced items should be returned to stock unless faulty.&amp;quot;&lt;/p&gt;  &lt;p&gt;This in turn helps participants to pin down the scope of requirements, which leads to better estimates of how long those requirements will take to implement.&lt;/p&gt;  &lt;p&gt;The words Given, When and Then are often used to help drive out the scenarios, but are not mandated.&lt;/p&gt;  &lt;p&gt;These scenarios can also be automated, if an appropriate tool exists to allow automation at the UI level. If no such tool exists then it may be possible to automate at the next level in, ie: if an &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt;Model-view-controller&lt;/a&gt; design pattern has been used, the level of the Controller.&lt;/p&gt;  &lt;h4&gt;Unit-level Examples and Behavior&lt;/h4&gt;  &lt;p&gt;The same principles of examples, using contexts, events and outcomes can be used to drive development at a unit level. For instance, the following examples describe an aspect of behavior of a list:&lt;/p&gt;  &lt;p&gt;Example 1: New lists are empty&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Given a new list &lt;/li&gt;    &lt;li&gt;Then the list should be empty. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Example 2: Lists with things in them are not empty.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Given a new list &lt;/li&gt;    &lt;li&gt;When we add an object &lt;/li&gt;    &lt;li&gt;Then the list should not be empty. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Both these examples are required to describe the behavior of the&lt;/p&gt;  &lt;pre&gt;list.isEmpty()&lt;/pre&gt;

&lt;p&gt;method, and to derive the benefit of the method. These examples can be automated using &lt;strong&gt;TDD&lt;/strong&gt; frameworks. In &lt;strong&gt;BDD&lt;/strong&gt; these examples are usually encapsulated in a single test method, with the name of the method being a complete description of the behavior.&lt;/p&gt;

&lt;p&gt;For instance, using Java and JUnit 4, the above examples might become:&lt;/p&gt;

&lt;pre&gt;public class ListTest {
 
   @Test
   public void shouldKnowWhetherItIsEmpty() {
      List list1 = new List();
      assertTrue(list1.isEmpty());
 
      List list2 = new List();
      list2.add(new Object());
      assertFalse(list2.isEmpty());
   }
}&lt;/pre&gt;

&lt;p&gt;Sometimes the difference between the context, events and outcomes may be made more explicit. For instance:&lt;/p&gt;

&lt;pre&gt;public class WindowControlBehavior {
 
    @Test
    public void shouldCloseWindows() {
 
        // Given
        WindowControl control = new WindowControl(&amp;quot;My AFrame&amp;quot;);
        AFrame frame = new AFrame();
 
        // When
        control.closeWindow();
 
        // Then
        ensureThat(!frame.isShowing());       
    }
}&lt;/pre&gt;

&lt;p&gt;However the example is phrased, the effect should be that of describing the behavior of the code in question. For instance, from the examples above one can derive:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;List should know when it is empty &lt;/li&gt;

  &lt;li&gt;WindowControl should close windows &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The description is useful if the test fails, and provides documentation of the code&amp;#39;s behavior to anyone interested in Lists or WindowControls. Once the examples have been written they are then run and the code implemented to make them work in the same way as &lt;strong&gt;TDD&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;Using Mocks&lt;/h4&gt;

&lt;p&gt;Because of the outside-in nature of &lt;strong&gt;BDD&lt;/strong&gt;, developers will often find themselves trying to use units of code which don&amp;#39;t yet exist. When this happens, an object which is simpler than the desired code, and provides the same interface but predictable behavior, can be injected into the code which needs it.&lt;/p&gt;

&lt;p&gt;These objects can either be created by hand, or created using a mocking framework such as &lt;a href="http://en.wikipedia.org/w/index.php?title=JMock&amp;amp;action=edit&amp;amp;redlink=1"&gt;JMock&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/w/index.php?title=EasyMock&amp;amp;action=edit&amp;amp;redlink=1"&gt;EasyMock&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;BDD proponents claim that the use of &amp;quot;should&amp;quot; and &amp;quot;ensureThat&amp;quot; in &lt;strong&gt;BDD&lt;/strong&gt; examples encourages developers to question whether the responsibilities they&amp;#39;re assigning to their classes are appropriate, or whether they can be delegated or moved to another class entirely. Questioning responsibilities in this way, and using mocks to fulfill the required roles of collaborating classes, encourages the use of &lt;a href="http://en.wikipedia.org/w/index.php?title=Role-based_Interfaces&amp;amp;action=edit&amp;amp;redlink=1"&gt;Role-based Interfaces&lt;/a&gt;. It also helps to keep the classes small and loosely coupled.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=85689" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/TDD/default.aspx">TDD</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/Testing/default.aspx">Testing</category><category domain="http://blogs.microsoft.co.il/blogs/shair/archive/tags/BDD/default.aspx">BDD</category></item></channel></rss>