<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to maximize velocity with TDD when coding a WebWork/Spring/Hibernate application</title>
	<atom:link href="http://nutrun.com/weblog/how-to-maximize-velocity-with-tdd-when-coding-a-webworkspringhibernate-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://nutrun.com/weblog/how-to-maximize-velocity-with-tdd-when-coding-a-webworkspringhibernate-application/</link>
	<description>nutrun</description>
	<lastBuildDate>Fri, 08 Jan 2010 06:54:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: George Malamidis</title>
		<link>http://nutrun.com/weblog/how-to-maximize-velocity-with-tdd-when-coding-a-webworkspringhibernate-application/comment-page-1/#comment-17</link>
		<dc:creator>George Malamidis</dc:creator>
		<pubDate>Fri, 09 Jun 2006 00:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=19#comment-17</guid>
		<description>Alex,

First, I&#039;d like to make clear that I&#039;m not saying unit tests are by any means a replacement for functional/integration testing. On the contrary, unit, functional and acceptance tests compliment and reinforce one another. But the later two were beyong the scope of what I was trying to describe here.

However, I believe if one is to achieve a high percentage of test coverage in an application, it is very important that tests are self contained, only testing the business logic the class under test is responsible for. In which case, if the behavior of any of the related entities changes at any point, this won&#039;t affect the results of a test that should still be passing. For instance, the action in our example would still be doing the right thing even if the GuitarService changed its behavior to append some serial number, or something, to the &#039;model&#039; string before persisting it.

In this over-simplistic example, the action is only receiving one request parametter and calls the appropriate method on a service and that&#039;s what should be tested in my opinion, because this is the only thing the action does. The next step would be to test drive the implementation of the service interface in the exact same manner and when it&#039;s time to implement the model, then there should be tests that are making sure that validation is performed the way it should be and that values are persisted correctly. I find it very helpful letting a test describe to me exactly what the class I will be writing should be doing before I start writing the class. Separation of concerns is one of the Golden rules of design in my book and I think this approach is a nice way to achieve that.

Anyway, my main intention was to describe a way of making the most out of your IDE and the nice features offered by Spring and Webwork, in terms of how they can really facilitate an approach like this, which in turn can speed things up significantly and also enforce what I consider to be good, extensible design.</description>
		<content:encoded><![CDATA[<p>Alex,</p>
<p>First, I&#8217;d like to make clear that I&#8217;m not saying unit tests are by any means a replacement for functional/integration testing. On the contrary, unit, functional and acceptance tests compliment and reinforce one another. But the later two were beyong the scope of what I was trying to describe here.</p>
<p>However, I believe if one is to achieve a high percentage of test coverage in an application, it is very important that tests are self contained, only testing the business logic the class under test is responsible for. In which case, if the behavior of any of the related entities changes at any point, this won&#8217;t affect the results of a test that should still be passing. For instance, the action in our example would still be doing the right thing even if the GuitarService changed its behavior to append some serial number, or something, to the &#8216;model&#8217; string before persisting it.</p>
<p>In this over-simplistic example, the action is only receiving one request parametter and calls the appropriate method on a service and that&#8217;s what should be tested in my opinion, because this is the only thing the action does. The next step would be to test drive the implementation of the service interface in the exact same manner and when it&#8217;s time to implement the model, then there should be tests that are making sure that validation is performed the way it should be and that values are persisted correctly. I find it very helpful letting a test describe to me exactly what the class I will be writing should be doing before I start writing the class. Separation of concerns is one of the Golden rules of design in my book and I think this approach is a nice way to achieve that.</p>
<p>Anyway, my main intention was to describe a way of making the most out of your IDE and the nice features offered by Spring and Webwork, in terms of how they can really facilitate an approach like this, which in turn can speed things up significantly and also enforce what I consider to be good, extensible design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Popescu</title>
		<link>http://nutrun.com/weblog/how-to-maximize-velocity-with-tdd-when-coding-a-webworkspringhibernate-application/comment-page-1/#comment-16</link>
		<dc:creator>Alex Popescu</dc:creator>
		<pubDate>Thu, 08 Jun 2006 21:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=19#comment-16</guid>
		<description>Hi!

I am really wondering what exactly is your test doing? Check if the service method is invoked? Wouldn&#039;t be more important to check if the model has the right values, or the model values were correctly validated, or things like this?

Even if I am co-founder of TestNG testing framework, I am much inclined to see the benefits of functional/integration testing over the unit testing (and TestNG supports these). Please let me know if I am mis-reading it ;-).

best regards,

./alex
--
:Architect of InfoQ.com:
 .w( the_mindstorm )p.</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I am really wondering what exactly is your test doing? Check if the service method is invoked? Wouldn&#8217;t be more important to check if the model has the right values, or the model values were correctly validated, or things like this?</p>
<p>Even if I am co-founder of TestNG testing framework, I am much inclined to see the benefits of functional/integration testing over the unit testing (and TestNG supports these). Please let me know if I am mis-reading it ;-).</p>
<p>best regards,</p>
<p>./alex<br />
&#8211;<br />
:Architect of InfoQ.com:<br />
 .w( the_mindstorm )p.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
