<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Unit Testing Blog - Typemock</title>
	
	<link>http://www.typemock.com/blog</link>
	<description>Easy Unit Testing Tools for .NET and C++</description>
	<lastBuildDate>Wed, 23 May 2012 07:52:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Typemock" /><feedburner:info uri="typemock" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Typemock</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Automated Testing of ASP.NET MVC Applications</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/gf1LJPOcO_M/</link>
		<comments>http://www.typemock.com/blog/2012/05/22/automated-testing-of-asp-net-mvc-applications/#comments</comments>
		<pubDate>Tue, 22 May 2012 15:19:00 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[Ivonna]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1187</guid>
		<description><![CDATA[The following article was originally printed in Methods &#38; Tools Introduction For many years the developers who practiced Unit Testing were frustrated about numerous problems they had when trying to apply automated testing to ASP.NET sites, in particular, those that were built using the WebForms framework (which was, for many, a synonym of ASP.NET). Not &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/22/automated-testing-of-asp-net-mvc-applications/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><em>The following article was originally printed in <a href="http://www.methodsandtools.com/archive/softwaretestingaspnetmvc.php">Methods &amp; Tools</a></em></p>
<p><strong>Introduction</strong></p>
<p>For many years the developers who practiced Unit Testing were frustrated about numerous problems they had when trying to apply automated testing to ASP.NET sites, in particular, those that were built using the WebForms framework (which was, for many, a synonym of ASP.NET). Not so long ago, Microsoft developed a new ASP.NET framework, called ASP.NET MVC. One of the selling points of this framework was its testability. In this article, we’re discussing what the problems are with testing ASP.NET sites in general, and how the ASP.NET MVC framework tries to solve them.</p>
<p><strong>What’s different about testing ASP.NET applications?</strong></p>
<p>When you are developing a library, or an application, you &#8220;own&#8221; the code. It means that, provided you follow certain guidelines, you can automate testing all, or at least all worth testing, features of your product. While you usually use third party libraries, or system resources like database or Internet connection, they can be considered &#8220;enhancements&#8221; sitting on top of your code.</p>
<p>With ASP.NET, the situation is reversed. What you develop are, essentially, enhancements to the IIS (or another hosting process). This is not unique, of course, to ASP.NET – the same holds true for any plugin development. It is like your code is a &#8220;guest&#8221; in this system, and should behave accordingly. You can add as many classes as you wish, and make them testable, but there is always a boundary layer that communicates with the framework. The host system creates these boundary classes, and calls certain methods that you provide, so that you have a brief moment of control. In WebForms, this layer is made of ASPX pages and code-behind files. In ASP.NET MVC, it is Controllers and Views.</p>
<p>For testing, a developer can take two very distinct paths. A developer can either test the main system together with your custom code (integration testing), or test your code in isolation, somehow dealing with the absence of the main system (unit testing).</p>
<p><strong>Integration Testing</strong></p>
<p>End-to-end, or integration, tests verify the behavior of the system as a whole. One can start, for example, with a certain URL, and inspect the HTML output, plus the side effects (a DB record inserted, an email sent, some money written off of our account, etc). Based on this test, we can assume that everything works as expected, or something is wrong. Given the HTML response, for example, all we can is search for a certain string and hope that if we find it, then everything else is as expected as well. If not, we have an idea that something went wrong, but we don&#8217;t know what. This is known as a &#8220;black box&#8221; testing – we provide an input and inspect the output, but we don’t know what’s inside.</p>
<p>We can push this even further, and test our client code together with the server code. While the former tests mimic a browser (set up an HTTP request, inspect the response), the latter ones mimic a user (&#8220;click&#8221; a button, inspect the content of a certain HTML element). Typically, we write code that &#8220;drives&#8221; a browser, automating all the clicking for us. There are some important qualities that characterize such tests:</p>
<ul>
<li>We are testing the system behavior as it is presented to the end user, so if the tests pass, the system is expected to work correctly.</li>
<li>If a test is broken, we don&#8217;t know whether it is a problem with the client or the server code, or the incompatibility between these two.</li>
<li>Such tests are really slow. The clicking happens faster than a human would do it, but still much slower than the code processing. A complex system can take several hours to test.</li>
<li>Complicated setup and cleanup: Often we have to perform several steps before we even get to the page we want to test. For example, testing a password protected page would require visiting the login page first.</li>
<li>Tests are hard to maintain, as there is a lot of test code involved that is not directly related to the system.</li>
</ul>
<p>Whether we use client code testing or not, there are some general problems with such tests, and these problems do not depend on a particular framework or programming language:</p>
<ul>
<li>If something’s wrong, we are not sure about what needs to be fixed.</li>
<li>More often than not, some tests start to fail because of a non-functional change (such as changing an ID of an HTML tag).</li>
<li>It is hard to control the external dependencies. For example, if we test an e-commerce application, we don’t want to bill somebody’s account each time we run a test, yet we need to get a positive response from the billing system, so that we can feed it into our system.</li>
<li>Integration tests alone do not drive your system to a better design. After all, they don’t care about the implementation.</li>
</ul>
<p>So, while integration tests are very important, and should be a part of any test suite in order to ensure that your system works properly as a whole, it is essential to use unit testing in your development process.</p>
<p><strong>Unit testing</strong></p>
<p>As we saw, when working with a framework that hosts your code, you have to create a number of &#8220;boundary&#8221; classes that interface with that framework. It is these classes that are sometimes hard to test, and have to be designed carefully in order to keep both your hosting framework and your test runner happy. One of the biggest challenges is to test your boundary class without the &#8220;real&#8221; hosting system up and running. For example, the WebForms framework is responsible for parsing the ASPX pages, assembling the controls into a web page, and firing certain events now and then. In order to write a sensible test for a WebForm page, you need at least the page itself built up properly, meaning that you should do a lot of work that normally is done for you by the framework. Another problem is that often the tested code depends on certain objects that only the framework can provide. For example, the infamous HttpContext object, that cannot be created manually, and its &#8220;children&#8221; – HttpRequest, HttpResponse, etc.</p>
<p>Typically, the only way out of this situation is make the boundary classes to serve as mere adaptors, and put the real &#8220;meat&#8221; in other classes, those that do not interact directly with the framework, or at least are easy to setup manually and tested in isolation. This supposedly leads to a better code as well, since, for example, moving the business and DAL logic away from the code-behind leads to more maintainable applications. The boundary classes themselves are left untested. One example is when, rather than put your data access in the code behind, you move it to DataObject classes that are used by ObjectDataSource controls. These classes, although being created and used by the framework, are relatively easy created and tested in isolation.</p>
<p>Here, the point whether the framework design cares for testability becomes important. A lot of people (me included) tried to follow this path for WebForms applications, trying to apply the MVP pattern. What happened is a lot of plumbing code that required an amount of effort far exceeding the testability benefits, and making the code harder, to maintain.</p>
<p><strong>ASP.NET MVC: Testability Paradise</strong></p>
<p>After listening to developers criticize the WebForms design and testability issues for several years, Microsoft gave us the ASP.NET MVC framework. It has been designed to solve many shortcomings of WebForms, including the testability problems. The main &#8220;boundary&#8221; classes are now Controllers. Although they are created by the framework, and have to conform to some rules, they are quite easy to setup in tests, and they can happily exist without the ASP.NET request pipeline. What’s important, we are not limited to default constructors: we can inject dependencies into our controllers, making it possible to mock our services and test controllers in isolation. Another major benefit is that controllers are totally independent of the UI. It is widely agreed that the UI is hard to test, and Codebehind classes were suffering from this &#8220;burden&#8221;. Now we’ve got Views, which are still hard to test (although some effort is made into that direction, <a href="http://blog.davidebbo.com/2011/06/unit-test-your-mvc-views-using-razor.html">one blog post from an architect on the ASP.NET team</a>), but this does not affect testing our Controllers.</p>
<p>Another step toward testability is addressing the HttpContext nightmare. Microsoft took the &#8220;thin wrapper&#8221; approach, which, admittedly, is the only way when you deal with the vast amount of existing code which should be easily upgradeable to the new ASP.NET version. In terms of testability, I’d say it’s moving from impossible to very hard. And if we recall the popular belief that testability equals good design, this case is a great example of the opposite. So, what we gained here is a possibility to write unreadable tests with chained partial mocks, plus having to use Http** wrappers in your production code without any real benefit to the application design.</p>
<p>Most developers tend towards one of two extremities. One, the &#8220;Big Ball of Mud&#8221; approach (that MVC does <em>not</em> save us from), is to put all the request handling code in the Action method of the controller. Writing tests for such methods is essential, since the code can become very complicated. That would be, of course, integration tests: each would test everything that happens during the request. However, the size of the &#8220;black box&#8221; is now much smaller, and we can even peek at what’s inside it, since our test is now in the same process as the code being tested.</p>
<p>The other tendency, dubbed &#8220;Slim Controller&#8221;, follows the idea that the sole responsibility of a controller is to wire up various services and model classes. Each Action method looks like a piece of configuration in an executable form. Typically, a test for such a method involves lots of mocking, and essentially duplicates the method itself (although in an unreadable form). Such tests should be generally avoided, since they don’t add any value to the system, being only a maintenance problem. The rest of the classes involved in the Action method are either business layer services (which are testable or not regardless of the framework), or infrastructure classes like custom Action Filters, Model Binders etc., which are mostly testable, but with some considerable effort (see, for example, <a href="http://www.hanselman.com/blog/SplittingDateTimeUnitTestingASPNETMVCCustomModelBinders.aspx">Scott Hanselman’s post about unit testing ASP.NET MVC Custom Model Binders</a>).</p>
<p>So, there are two extremities: bad design with integration tests, or good design with brittle and useless unit tests. This is why many developers that tend towards good design tend to not write tests for controllers at all, instead concentrating their efforts on testing the underlying classes.</p>
<p><strong>How about test-driving our design?</strong></p>
<p>Controller testability can be a good encouragement for a better Action method design. For example, it’s a bad idea to use HttpContext.Current in your code. And while you can use HttpContextBase as a mockable dependency (see our discussion of the Http* wrappers above), the mere fact that your tests are hard to write and maintain should also give you an idea that you shouldn’t do it either. Fortunately, you can use Model Binders, Action Method Filters, and other infrastructure classes to shield your code from the framework. That still leaves you with a piece not covered by tests, but at least this piece is part of the infrastructure now, and is not supposed to be changed often. Such classes are very simple, since their responsibility is just to extract the information from the framework specific classes and present it in a framework agnostic form.</p>
<p><strong>Is it perfect?</strong></p>
<p>As with most applications, unit testing is not enough. This is especially true when your code interface with a framework that does not participate in your unit tests. Since the boundary part is not tested for the most part, and can become rather wide (especially if you start using the infrastructure classes, like custom Route Providers and Model Binders), it is essential that you write a number of tests that make sure all your parts work together as expected.</p>
<p>Another potential problem is testing the Views. While this problem should discourage you from using considerable amounts of code in your Views, sometimes in order to make your Views maintainable you have to use Helpers, Partials, and even render Child Actions, and the result can become much more complicated than a simple piece of data bound HTML. Add to the mix a lot of &#8220;magic&#8221; that the framework conveniently does for you, and you’ll find yourself in a situation when making a simple change suddenly breaks things in an unpredictable way. Having a safety net of at least simple smoke tests can save you from numerous regression bugs.</p>
<p>I guess the correct question would be not &#8220;is it perfect,&#8221; but rather &#8220;could they make it better.&#8221; My answer is, given the circumstances, not much. On one hand, looking at the FubuMVC framework which I started to use recently, I see that it <em>can</em> be better. On the other hand, the general idea of making a Ruby on Rails clone for ASP.NET must have forced a number of API decisions (e.g. returning an ActionResult from the Action method). If we go deeper and try to test some advanced infrastructure code (e.g. a custom convention for View location), we discover that the Microsoft’s infamous preference of inheritance over composition does a poor job for writing such tests.</p>
<p>However, I should admit that for 99% of development efforts these issues are not a big problem. It is definitely good that Microsoft realized the importance of automated testing, and made testability one of the cornerstone principles of the ASP.NET MVC framework. Thanks to that decision, and its proper implementation, developers can make Web sites that are fully tested and have much less bugs. Because of that, the Web has become a better place.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><em>Artëm Smirnov, Developer of Ivonna for Typemock Isolator, </em><a href="http://www.typemock.com/"><em>www.typemock.com</em></a></p>
<p>Download <a href="http://ivonna.biz/">Ivonna</a> now and start testing ASP.NET MVC applications. Ivonna is an extension to Typemock Isolator. <a href="http://www.typemock.com/isolator-product-page?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=testing-asp-mvc">Download Isolator</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=gf1LJPOcO_M:zcB_pKiaFu0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/gf1LJPOcO_M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/22/automated-testing-of-asp-net-mvc-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/22/automated-testing-of-asp-net-mvc-applications/</feedburner:origLink></item>
		<item>
		<title>Webinar – Speeding Up the development of SharePoint Web Parts</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/D5SYbNphans/</link>
		<comments>http://www.typemock.com/blog/2012/05/17/webinar-speeding-up-the-development-of-sharepoint-web-parts/#comments</comments>
		<pubDate>Thu, 17 May 2012 07:08:36 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[web parts]]></category>
		<category><![CDATA[Webcast]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1180</guid>
		<description><![CDATA[Many Web Parts in SharePoint render for capturing data that is stored in a SharePoint list. This means that to test the Web Part you have to load the the Web Part within a SharePoint server. Then how do you test it? During this webinar, Richard Fennell will show how you can use Typemock Isolator &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/17/webinar-speeding-up-the-development-of-sharepoint-web-parts/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.typemock.com/blog/wp-content/uploads/2012/05/SharePoint_2010_Logo.jpg"><img class="alignright size-full wp-image-1183" title="SharePoint_2010_Logo" src="http://www.typemock.com/blog/wp-content/uploads/2012/05/SharePoint_2010_Logo.jpg" alt="" width="200" height="47" /></a>Many Web Parts in SharePoint render for capturing data that is stored in a SharePoint list. This means that to test the Web Part you have to load the the Web Part within a SharePoint server. Then how do you test it?</p>
<p>During this webinar, Richard Fennell will show how you can use Typemock Isolator to allow the development and testing of your Web Part without the need to keep redeploying it to SharePoint to check every minor change</p>
<p><a href="http://www.typemock.com/using-typemock-isolator-to-speed-up-sharepoint-development-may-webinar">Learn how to speed up your SharePoint development and test web parts</a></p>
<p>When: Tuesday, May 22 at 7:00 AM Eastern US, 12:00 BST (UK), 21:00 Australia Standard Time</p>
<p>Sign up: <a href="http://www.typemock.com/using-typemock-isolator-to-speed-up-sharepoint-development-may-webinar">http://www.typemock.com/using-typemock-isolator-to-speed-up-sharepoint-development-may-webinar</a></p>
<p>We will also be raffling licenses of Typemock Isolator V7 and Isolator for SharePoint. Attend to win</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=D5SYbNphans:uDvAHHiHPEM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/D5SYbNphans" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/17/webinar-speeding-up-the-development-of-sharepoint-web-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/17/webinar-speeding-up-the-development-of-sharepoint-web-parts/</feedburner:origLink></item>
		<item>
		<title>Webinar–Introduction to Unit Testing</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/S02-ThtmhOM/</link>
		<comments>http://www.typemock.com/blog/2012/05/14/webinarintroduction-to-unit-testing/#comments</comments>
		<pubDate>Mon, 14 May 2012 06:58:59 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Introduction to Unit Testing]]></category>
		<category><![CDATA[Unit test]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1178</guid>
		<description><![CDATA[Coworker won’t do unit tests? Or worse, is bugging you to start unit testing and don’t understand what’s all the fuss? Discover the secrets of unit testing. In order to prevent bugs and release quality code to market, you also need unit testing. Discover why you should start unit testing, and how you can get &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/14/webinarintroduction-to-unit-testing/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Coworker won’t do unit tests? Or worse, is bugging you to start unit testing and don’t understand what’s all the fuss?</p>
<p>Discover the secrets of unit testing.</p>
<p> In order to prevent bugs and release quality code to market, you also need unit testing. Discover why you should start unit testing, and how you can get started with automated tests quickly. </p>
<p>When: Wednesday May 16 at 10:00 AM Eastern (NY), 15:00 United Kingdom</p>
<p><a href="http://www.typemock.com/introduction-to-unit-testing-may">Sign up now</a></p>
<p>Learn:     <br />• Benefits of unit testing     <br />• xUnit Frameworks     <br />• The difference between unit testing and test driven development (TDD).     <br />Join this webinar to learn what you need to know in order to start testing today.     <br />We will also be raffling away Typemock Isolator/Isolator++ licenses and t-shirts. You must attend to win.</p>
<p>Also develop in C/C++? This webinar will specifically focus on some of the issues and difficulties of testing in C/C++. <a href="http://www.typemock.com/introduction-to-unit-testing-may">Sign up now.</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=S02-ThtmhOM:A7EGH69ROcE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/S02-ThtmhOM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/14/webinarintroduction-to-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/14/webinarintroduction-to-unit-testing/</feedburner:origLink></item>
		<item>
		<title>The role of architecture in an Agile environment</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/AtXPpaYjS8I/</link>
		<comments>http://www.typemock.com/blog/2012/05/13/the-role-of-architecture-in-an-agile-environment/#comments</comments>
		<pubDate>Sun, 13 May 2012 14:58:57 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[architect]]></category>
		<category><![CDATA[architecture]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1176</guid>
		<description><![CDATA[Last week, software architect Raffaele Garofalo hosted a Typemock webinar on Agile architecture. There were lots of questions and we weren’t able to get to all of them in the webinar, so Rafe generously agreed to answer the questions after the webinar. You can watch the webinar here. Patrik asked: Q: Can you elaborate on &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/13/the-role-of-architecture-in-an-agile-environment/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Last week, software architect Raffaele Garofalo hosted a Typemock webinar on Agile architecture. There were lots of questions and we weren’t able to get to all of them in the webinar, so Rafe generously agreed to answer the questions after the webinar.</p>
<p> <a title="Webinar by rutty, on Flickr" href="http://www.flickr.com/photos/rutty/5597417669/"><img style="margin: 5px; display: inline; float: right" alt="Webinar" align="right" src="http://farm6.staticflickr.com/5223/5597417669_c35372ab77_m.jpg" width="240" height="240" /></a>
<p>You can watch the webinar <a href="http://www.typemock.com/software-architecture-in-an-agile-environment-webinar?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=software-architecture-in-agile-environment">here</a>.</p>
<p>Patrik asked:</p>
<p><strong>Q: Can you elaborate on what you mean with the &quot;design phase&quot;_</strong></p>
<p>Ok, during the first iteration, the envision, there is a light design phase. You should design some scratches of your envision, representing the architecture and the UI, but you should not invest too much time.</p>
<p>Design phase while modeling means adopting UML to design your models.</p>
<p><strong>Q: I didn&#8217;t quite catch the TFS workflow and how Raf used it.. Can you show it again? (also, is that view new in the tfs preview? Looks awesome)</strong></p>
<p>The TFS I was working with is the new version called 2011 preview. The workflow has been adapted by me, I will publish the Agile Architecture workflow for TFS in the future.</p>
<p><strong>Q: How does your &quot;Iter: 0&quot; relate to the PO, backlog and sprint planning?</strong></p>
<p>Ah ah, interesting. The envision or iteration 0 is tricky to fit into SCRUM. Take the classic meter to measure an iteration, like 1 or 2 weeks. Inside this timeframe you should have enough space and time to prepare the necessary analysis and mocks required by next steps. So you may consider iter 0 like a beginning sprint. </p>
<p><strong>Q: Couldn&#8217;t the use-case diagram be enough for the modeling phase? I&#8217;m interested in hearing your reasoning because I&#8217;m currently in this situation in my current project. What level of detail is enough when it comes to architecture that lets developers use their brain and problem solving power?</strong></p>
<p>No, the use case is not enough because it may incur into personal interpretation. With the use case and the acceptance you and your team are ready for the modeling phase, where you create the architectural style for that feature. The modeling should be enough to represent the current feature and it should not be implemented, the implementation occurs in the next phase where you apply TDD against the model discussed in the previous part. It is hard to keep the model the blueprint of the code and often it doesn&#8217;t provide value. It is important that the model represents what you are delivering.</p>
<p><strong>Q: Does the Process workflow you describe impact the philosophy of embracing change? How can we perform radical change when we get a bigger up-front model? </strong></p>
<p>No, it doesn&#8217;t because Agile Architecture pretends the flexibility into your model. Model just enough to represents the feature and remember that you can always come back and re-model and re-factor. Embracing Agile Architecture will force you to have a dynamic more agnostic and flexible model than using a classic architecture approach. </p>
<p>Why would you get a radical change request with a radical model upfront? Of you adopt Agile you should structure these changes into small iterations.</p>
<p><strong>Q: How can it be TDD when you have specified the methods/attributes before writing tests that requires them?</strong></p>
<p>I still believe that you are applying TDD and XP in the most strictly way. You can model UML and decide the behaviors of your model, Then with TDD you will implement the model. I don&#8217;t think that TDD should drives your naming convention or model terminology. </p>
<p>&#160;</p>
<p>Huet asks:</p>
<p><strong>&quot;Q: Shouldn&#8217;t the arrow be going from the support team to the team members?</strong></p>
<p>If you mean the dependency adopted in UML, yes the arrow should be in that way. My intention was to represent the transfer of knowledge between the various members of the various teams.</p>
<p><strong>Q: Acceptance Tests should have been written before the model.</strong></p>
<p>Not really, if you adopt the strict TDD all the acceptance tests should be written before, but when you envision the architecture, it is too early to write acceptance tests. When you start the iteration and you have your requirements define, you may start to model against the acceptance criteria for that iteration. But remember that the modeling part should be light enough to provide value for the next step.</p>
<p><strong>Q: These tests should be built to support the acceptance tests.</strong></p>
<p>Again, you are referring to a strictly TDD approach, which is not wrong but differ a little bit from the entire Agile Architecture process.</p>
<p><strong>Q: ATDD &#8211; Acceptance Test Driven Development</strong></p>
<p>In the webinar I was talking about Agile Model Driven Development.</p>
<p><a href="http://www.agileModeling.com/essays/amdd.htm">http://www.agileModeling.com/essays/amdd.htm</a></p>
<p><strong>Q: the functions of the architect are clear, but it is not clear how these functions are intended to fit into the Sprints.</strong></p>
<p>The sprint is composed by three parts, modeling, brainstorm and coding. The architect will perfectly fit into each of this phase. I think I have explained this concept during the webinar, but just to be sure. During modeling and brainstorm the architect should help with his knowledge and collaborate in the modeling, during the coding he should be an active coder too and contribute to the technical decisions providing knowledge and expertise.</p>
<p><strong>Q: What is a &quot;mock&quot;? &#8211; do you mean a wireframe mock-up?</strong></p>
<p>A: Typemock will be hosting several webinars on mock objects. Check out <a href="http://www.typemock.com/webinars/">http://www.typemock.com/webinars/</a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>Thanks Rafe!</p>
<p>For more Typemock webinars, or to watch past webinars, and learn how to start unit testing go to <a href="http://www.typemock.com/webinars/">http://www.typemock.com/webinars/</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=AtXPpaYjS8I:jw8ocZy0VCg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/AtXPpaYjS8I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/13/the-role-of-architecture-in-an-agile-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/13/the-role-of-architecture-in-an-agile-environment/</feedburner:origLink></item>
		<item>
		<title>What is the cost of avoiding unit testing and the cost of software bugs?</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/Q5shfbQDR3o/</link>
		<comments>http://www.typemock.com/blog/2012/05/08/what-is-the-cost-of-avoiding-unit-testing-and-the-cost-of-software-bugs/#comments</comments>
		<pubDate>Tue, 08 May 2012 16:15:00 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[cost]]></category>
		<category><![CDATA[cost of bugs]]></category>
		<category><![CDATA[developer testing]]></category>
		<category><![CDATA[developereconomics]]></category>
		<category><![CDATA[economics]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1174</guid>
		<description><![CDATA[More than a third of the cost of software bugs – over $25 billion in the US alone – could be avoided if better software testing was performed in the initial stages of development? The cost of inadequate infrastructure for software testing in the United States was $59.6 billion, or about 0.6 percent of US &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/08/what-is-the-cost-of-avoiding-unit-testing-and-the-cost-of-software-bugs/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p><i>More than a third of the cost of software bugs – over $25 billion in the US alone – could be avoided if better software testing was performed in the initial stages of development?</i></p>
<p>The cost of inadequate infrastructure for software testing in the United States was $59.6 billion, or about 0.6 percent of US GDP, according to a report by the National Institute of Standards and Technology (NIST). Over half of the costs are borne by software users and the remainder by software developers and vendors. </p>
<p>According to NIST, while software bugs can’t be completely avoided, more than a third of this cost could be avoided if better software testing was performed and bugs were found during the development stage.<a href="file://appserver/docs/Marketing/Products/Armadillo/Articles/#_ftn1_1371" name="_ftnref1_1371">[1]</a> Based on 2010-2011 labor costs, the cost of preventable software bugs has increased to at least $25.8 billion in the United States alone.</p>
<p>So, how does this break down? According to NIST’s estimates, approximately 10 percent of computer programmers’ and 35 percent of software engineers’ time is spent debugging and correcting errors. According to NIST, this is equal to at least 302,450 full time employees engaged in testing and debugging activities, representing approximately one-fourth of all computer programmers and software engineers in the United States. Half of labor when developing software is spent on testing.<a href="file://appserver/docs/Marketing/Products/Armadillo/Articles/#_ftn2_1371" name="_ftnref2_1371">[2]</a></p>
<p>The <a href="http://www.bls.gov/oco/ocos303.htm#earnings">median salary</a> in 2010-2011 of American computer applications software engineer was $85,430 and the median wage of computer systems software engineers was $92,430. At the lower wages of American computer applications software engineers, assuming that no additional employees are required to engage in testing and debugging activities, this yields a minimum cost of at least $25,838,303,500 spent on debugging and correcting errors per year.</p>
<p>Currently, over half of all errors are found “downstream” in the development process, after the code has already been sent to QA or during post-sale software use. However, as the above shows, by engaging in development practices that are more likely to find bugs upstream, such as unit testing, overall costs can be reduced. </p>
<p><a href="http://c2.com/cgi-bin/wiki?FirstLawOfProgramming">Ward Cunningham’s First Law of Programming</a> states that “lowering quality lengthens development time.” According to Cunningham:</p>
<blockquote><p>Quality software takes the least amount of time to develop. If you have code that is simple as possible, tests that are complete and a design that fits just right, additions and changes happen in the fastest possible way because the impact is lowest. Consequently, if you hack something out, the more you hack the slower you go because the cost of addition or change grows with each line of code.</p>
</blockquote>
<p>By preventing bugs in the development process, long-term costs are saved. The average lifespan of a software system can be decades. According to <a href="http://msdn.microsoft.com/en-us/magazine/ee819135.aspx">David Laribee</a>, “The idea that you have a development team that completes a project then throws it over the wall to a maintenance team is fundamentally flawed.”</p>
<p>Hence, if you unit test, you will:</p>
<ul>
<li>Find bugs quicker</li>
<li>Provide confidence in your code</li>
<li>Send less bugs to QA</li>
<li>Release higher quality software</li>
<li>Save your company lots of money.</li>
</ul>
<p>&#160;</p>
<p>Who wouldn’t like that? Download <a href="http://www.typemock.com/isolator-product-page?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=cost-of-bugs">Isolator</a> or <a href="http://www.typemock.com/isolatorpp-product-page?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=cost-of-bugs">Isolator++</a> today.</p>
<p>&#160;</p>
<hr align="left" size="1" width="33%" />
<p><a href="file://appserver/docs/Marketing/Products/Armadillo/Articles/#_ftnref1_1371" name="_ftn1_1371">[1]</a> <i>The Economic Impacts of Inadequate Infrastructure for Software </i>Testing. http://www.nist.gov/director/planning/upload/report02-3.pdf</p>
<p><a href="file://appserver/docs/Marketing/Products/Armadillo/Articles/#_ftnref2_1371" name="_ftn2_1371">[2]</a> http://www.cs.washington.edu/homes/mernst/pubs/economics-foser2010.pdf</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=Q5shfbQDR3o:ojUlloquqlw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/Q5shfbQDR3o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/08/what-is-the-cost-of-avoiding-unit-testing-and-the-cost-of-software-bugs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/08/what-is-the-cost-of-avoiding-unit-testing-and-the-cost-of-software-bugs/</feedburner:origLink></item>
		<item>
		<title>Are you an Agile architect</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/IkAlLdRNsWg/</link>
		<comments>http://www.typemock.com/blog/2012/05/07/are-you-an-agile-architect/#comments</comments>
		<pubDate>Mon, 07 May 2012 20:53:00 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[architect]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1170</guid>
		<description><![CDATA[What does Agile architecture have to do with unit testing? How do architects build software in an agile environment. Join software architect Raffaele Garofalo as he builds the pathway to Agile architecture. Learn What is Software Architecture What is Agile development How they can live together? Discover principles of Agile architecture Lifecycle and process Modeling &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/05/07/are-you-an-agile-architect/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>What does Agile architecture have to do with unit testing?</p>
<p>How do architects build software in an agile environment.</p>
<p>Join software architect Raffaele Garofalo as he builds the pathway to Agile architecture.</p>
<p><a title="Architect by Laurent Baumann, on Flickr" href="http://www.flickr.com/photos/avetenebrae/2669353476/"><img style="margin: 5px; display: inline; float: right;" src="http://farm4.staticflickr.com/3103/2669353476_a0ec7b2ed5_n.jpg" alt="Architect" width="265" height="195" align="right" /></a></p>
<p>Learn</p>
<ul>
<li>What is Software Architecture</li>
<li>What is Agile development</li>
<li>How they can live together?</li>
<li>Discover principles of Agile architecture</li>
<li>Lifecycle and process</li>
<li>Modeling and development</li>
<li>The right solution for the right problem</li>
<li>How to deliver quality with (TDD)</li>
</ul>
<p>When: Wednesday, May 9, 2012 8:00 AM Eastern US (EDT), 1:00 PM BST (United Kingdom), 3:00 PM Israel</p>
<p>Sign up: <a title="http://www.typemock.com/software-architecture-in-an-agile-environment-webinar?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=agile-architecture" href="http://www.typemock.com/software-architecture-in-an-agile-environment-webinar?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=agile-architecture">http://www.typemock.com/software-architecture-in-an-agile-environment-webinar</a></p>
<p>We will also raffle a Typemock Isolator license &amp; t-shirt to an attendee.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=IkAlLdRNsWg:Cf2DZBXXAF0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/IkAlLdRNsWg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/05/07/are-you-an-agile-architect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/05/07/are-you-an-agile-architect/</feedburner:origLink></item>
		<item>
		<title>Unit Testing Entity Framework with Typemock Isolator</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/nUb8Jsa4Bek/</link>
		<comments>http://www.typemock.com/blog/2012/04/26/unit-testing-entity-framework-with-typemock-isolator/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 09:56:00 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[entity framework]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1167</guid>
		<description><![CDATA[Recently we’ve had several people asking us about how to use Typemock Isolator to test Entity Framework. Here’s a past demo that demonstrates this. What’s your experience been?]]></description>
			<content:encoded><![CDATA[<p>Recently we’ve had several people asking us about how to use Typemock Isolator to test Entity Framework.</p>
<p>Here’s a past demo that demonstrates this. What’s your experience been?<iframe id="viddler-1885d706" height="451" src="//www.viddler.com/embed/1885d706/?f=1&amp;offset=0&amp;autoplay=0&amp;disablebranding=0" frameborder="0" width="545"></iframe></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=nUb8Jsa4Bek:gJeixqRYxWc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/nUb8Jsa4Bek" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/04/26/unit-testing-entity-framework-with-typemock-isolator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/04/26/unit-testing-entity-framework-with-typemock-isolator/</feedburner:origLink></item>
		<item>
		<title>Driving application development through Behavior-Driven Development (BDD)</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/6AjKulgxmVg/</link>
		<comments>http://www.typemock.com/blog/2012/04/24/driving-application-development-through-behavior-driven-development-bdd/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 08:15:04 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Behavior-Driven Development]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1165</guid>
		<description><![CDATA[Behavior Driven Development, an agile software development technique, can help spread unit testing and TDD in your team. This webinar will walk through how you can be driving your application development through behavior driven, one specification at a time in a test-driven manner. You will see how BDD could fit with an agile process. Join &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/04/24/driving-application-development-through-behavior-driven-development-bdd/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Behavior Driven Development, an agile software development technique, can help spread unit testing and TDD in your team.    <br />This webinar will walk through how you can be driving your application development through behavior driven, one specification at a time in a test-driven manner. You will see how BDD could fit with an agile process. </p>
<p> <a title="LEGO Collectible Minifigures Series 7 : Computer Programmer by cjdc, on Flickr" href="http://www.flickr.com/photos/wiredforsound23/6948090750/"><img style="margin: 5px; display: inline; float: right" alt="LEGO Collectible Minifigures Series 7 : Computer Programmer" align="right" src="http://farm6.staticflickr.com/5235/6948090750_8c4a795254_m.jpg" width="240" height="180" /></a>
<p>Join Einar Ingebrigtsen, Technical Fellow, at DoLittle Studios as he walks you through how BDD can help drive your application development.</p>
<p>Learn:    <br />- What is Behavior-Driven Development (BDD)     <br />- The relationship between BDD &amp; Test-Driven Development (TDD)     <br />- Basic specifications, Cucumber-language     <br />- How BDD makes a good fit with agile processes     <br />- Driving out your units in a test-first approach     <br />- Mocking / Fakes / Stubs &#8211; what are they and how to use them     <br />- Decoupling in software </p>
<p><b>When</b>: Wednesday, May 2, 2012 8:30 AM Pacific time, 5:30 PM Central European Time</p>
<p><b>Register Now</b>: <a href="http://www.typemock.com/driving-application-delivery-through-behavior-driven-development-bdd?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=bdd">http://www.typemock.com/driving-application-delivery-through-behavior-driven-development-bdd</a></p>
<p><u>This will be a vendor-neutral webinar; we will also be raffling Typemock Isolator licenses and t-shirts to winning webinar attendees. Sign up for a chance to win.</u></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=6AjKulgxmVg:md-IwOAiVHw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/6AjKulgxmVg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/04/24/driving-application-development-through-behavior-driven-development-bdd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/04/24/driving-application-development-through-behavior-driven-development-bdd/</feedburner:origLink></item>
		<item>
		<title>Isolator V7 for …. free? Get rid of your legacy software.</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/1sCzakaCzfs/</link>
		<comments>http://www.typemock.com/blog/2012/04/18/isolator-v7-for-free-get-rid-of-your-legacy-software/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 10:22:00 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[Isolator V7]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1162</guid>
		<description><![CDATA[Are you using a legacy version of Typemock Isolator isolating your legacy code? Want the latest advances in bug detection? Then upgrade to V7 For FREE* Existing Typemock customers* can upgrade to Typemock Isolator V7 for free. Download it now. You can also run more than one version of Typemock Isolator. Typemock Isolator V7 is &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/04/18/isolator-v7-for-free-get-rid-of-your-legacy-software/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Are you using a legacy version of Typemock Isolator isolating your legacy code? Want the latest advances in bug detection?</p>
<p><strong>Then upgrade to V7</strong></p>
<p><strong>For FREE<font color="#ff0000">*</font></strong></p>
<p>Existing Typemock customers<font color="#ff0000">*</font><font color="#000000"> can upgrade to Typemock Isolator V7 for free.</font></p>
<p> <a title="Free Stuff by mts83, on Flickr" href="http://www.flickr.com/photos/22516573@N07/2944949518/"><img style="margin: 5px; display: inline; float: right" alt="Free Stuff" align="right" src="http://farm4.staticflickr.com/3213/2944949518_2d73f6cf7c_m.jpg" width="180" height="240" /></a>
<p><font color="#000000"><a href="http://www.typemock.com/isolator-product-page?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=upgrade-for-free">Download it now.</a></font></p>
<p><font color="#000000">You can also run more than one version of Typemock Isolator. </font><font color="#000000">Typemock Isolator V7 is backwards-compatible, so, for example, you can try V7 in a sandboxed environment while continuing to use Isolator 6 in a production environment while you migrate your team to V7.</font></p>
<p><font color="#000000"><a href="http://www.typemock.com/isolator-product-page?utm_source=blog&amp;utm_medium=social&amp;utm_campaign=upgrade-for-free">Get it now</a></font></p>
<p><font color="#ff0000">* </font><font color="#000000">Typemock customers with a valid maintenance package are eligible. This includes customers with permanent licenses and valid maintenance and all customers with active maintenance. If you are unsure of your status, or would like to renew your maintenance, please email <a href="mailto:sales@typemock.com">sales@typemock.com</a>.</font></p>
<p><font color="#000000">&#160;</font></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=1sCzakaCzfs:HCFBEMkOWhw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/1sCzakaCzfs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/04/18/isolator-v7-for-free-get-rid-of-your-legacy-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/04/18/isolator-v7-for-free-get-rid-of-your-legacy-software/</feedburner:origLink></item>
		<item>
		<title>How To Organize Your Tests</title>
		<link>http://feedproxy.google.com/~r/Typemock/~3/3UiPM0xhvfQ/</link>
		<comments>http://www.typemock.com/blog/2012/04/17/how-to-organize-your-tests/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 14:02:00 +0000</pubDate>
		<dc:creator>Gil Zilberfeld</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[gil zilberfeld]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Methodology]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[Test Driven Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[typemock]]></category>
		<category><![CDATA[Unit test]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[v7]]></category>

		<guid isPermaLink="false">http://www.typemock.com/blog/?p=1157</guid>
		<description><![CDATA[It starts out pretty simple. You want to start writing tests, so you create a library. Before you know it, you’ve got a huge suite. Although there’s some order in the chaos, you probably wish there was some way to make it look better, and even more so, make the team work in a consistent &#8230; </p><p><a class="more-link block-button" href="http://www.typemock.com/blog/2012/04/17/how-to-organize-your-tests/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>It starts out pretty simple. You want to start writing tests, so you create a library. Before you know it, you’ve got a huge suite. Although there’s some order in the chaos, you probably wish there was some way to make it look better, and even more so, make the team work in a consistent manner.</p>
<p>But before we discuss how, let’s ask this: Can better test organization make us more effective?</p>
<p>The harsh answer, forgive me all you organized people, is that it probably won’t. In fact&#160; spending time on organization is a waste. Your choice of tools has much more to do with your effectiveness.</p>
<p><strong>Gil, Say It Ain’t So</strong></p>
<p>It is. And why?</p>
<p>Once a test goes green, it becomes transparent to us. That’s because we run it with a huge group of other green tests. If it’s not red, it’s not important. </p>
<p>How does this relate to test organization? Well, since our test framework of choice flags the red tests immediately, and probably lets you navigate to a test in single click, it doesn’t really matter where the test resides. If the tool you’re using is not integrated with your IDE, it will tell you exactly where and in what line the failure happened (and you should get a better integrated tool).</p>
<p>There are a few things that you can do, that can make you more effective, though:</p>
<ul>
<li><strong>Separate quick tests from slow tests.</strong> Yes, even if they test the same method. You want to get the quickest feedback you can to keep you going. If you have 100 tests which take 2 seconds to run, and 2 tests that take 1 minute to run, and you always run them together, you’re wasting your time. Moreover, you’ve got time to think if these testing stuff really is worth it. Put the slow ones into separate suites so you can run the quick ones more frequently.</li>
<li><strong>Don’t blindly put all the tests for all the methods in a class into one file. </strong>Imagine that few of tests pass and some fail – you want to get the best picture you can about the status in a single glimpse. So put different but related scenarios together. Separate unrelated scenarios to different files.</li>
<li><strong>Don’t use test inheritance. </strong>It may seem a clever object-oriented way of code reuse but when the test is broken, the last thing you want is to start debugging what it actually does, which setup it requires (in another file) and what happens after it. There are other ways to <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" target="_blank">DRY</a>. Or even better, you can sacrifice the DRY principle in terms of readability, and repeat yourself.</li>
</ul>
<p>If you’re using <a href="http://www.typemock.com/isolator-product-page" target="_blank">Isolator v7</a>, you don’t even have to bother with the first two, since it’s doing it for you automatically: It runs the quick tests automatically, and if a bug occurs, it shows all the tests (both passing and failing) related to the offending code. The third one is still up to you, but if you don’t like to shoot yourself in the foot anyway, you don’t need to worry about test organization at all!</p>
<p><a href="http://www.typemock.com/isolator-product-page" target="_blank">Download Isolator now!</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Typemock?a=3UiPM0xhvfQ:jjc4vaIfLa8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Typemock?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Typemock/~4/3UiPM0xhvfQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.typemock.com/blog/2012/04/17/how-to-organize-your-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.typemock.com/blog/2012/04/17/how-to-organize-your-tests/</feedburner:origLink></item>
	</channel>
</rss>

