<?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: Reorganizing long test classes</title>
	<atom:link href="http://alexruiz.developerblogs.com/?feed=rss2&#038;p=366" rel="self" type="application/rss+xml" />
	<link>http://alexruiz.developerblogs.com/?p=366</link>
	<description>Having Fun with Java!</description>
	<lastBuildDate>Thu, 19 Aug 2010 17:21:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Alex Ruiz&#39;s Blog &#187; FEST-Swing 1.2a3: GUI Testing Made Easy</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-3220</link>
		<dc:creator>Alex Ruiz&#39;s Blog &#187; FEST-Swing 1.2a3: GUI Testing Made Easy</dc:creator>
		<pubDate>Tue, 01 Sep 2009 15:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-3220</guid>
		<description>[...] a good number of bug fixes, new features and improvements. We also improved our test suite: we reorganized our tests and the test suite grew from 2,677 to 3,405 tests! (with 100% success rate, of [...]</description>
		<content:encoded><![CDATA[<p>[...] a good number of bug fixes, new features and improvements. We also improved our test suite: we reorganized our tests and the test suite grew from 2,677 to 3,405 tests! (with 100% success rate, of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Ruiz</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-1184</link>
		<dc:creator>Alex Ruiz</dc:creator>
		<pubDate>Mon, 10 Aug 2009 21:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-1184</guid>
		<description>&lt;a href=&quot;#comment-922&quot; rel=&quot;nofollow&quot;&gt;@Konstantin Scheglov &lt;/a&gt; 

Well, I don&#039;t feel guilty at all :) 

I&#039;m using underscores for naming test methods only, any other code uses the regular Java code conventions. In my case, I found that underscores really make it easier to read test code.

At the same time, the team has to agree about using underscores for method naming or any other practice that is not considered &quot;standard.&quot; So far, nobody in the FEST team has complained ;)

Cheers,
-Alex</description>
		<content:encoded><![CDATA[<p><a href="#comment-922" rel="nofollow">@Konstantin Scheglov </a> </p>
<p>Well, I don&#8217;t feel guilty at all :) </p>
<p>I&#8217;m using underscores for naming test methods only, any other code uses the regular Java code conventions. In my case, I found that underscores really make it easier to read test code.</p>
<p>At the same time, the team has to agree about using underscores for method naming or any other practice that is not considered &#8220;standard.&#8221; So far, nobody in the FEST team has complained ;)</p>
<p>Cheers,<br />
-Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Konstantin Scheglov</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-922</link>
		<dc:creator>Konstantin Scheglov</dc:creator>
		<pubDate>Sat, 08 Aug 2009 19:12:44 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-922</guid>
		<description>One my colleague hates me because I use same naming scheme as you do - use underscores. I do this long time, probably 2-3 years and all this time he asks me to stop using it. He says that it is hard to read and it violates Sun Java code conventions.

What do you think about this? Do you feel yourself guilty because you violate standards?</description>
		<content:encoded><![CDATA[<p>One my colleague hates me because I use same naming scheme as you do &#8211; use underscores. I do this long time, probably 2-3 years and all this time he asks me to stop using it. He says that it is hard to read and it violates Sun Java code conventions.</p>
<p>What do you think about this? Do you feel yourself guilty because you violate standards?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Ruiz</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-171</link>
		<dc:creator>Alex Ruiz</dc:creator>
		<pubDate>Wed, 29 Jul 2009 18:46:56 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-171</guid>
		<description>&lt;a href=&quot;#comment-162&quot; rel=&quot;nofollow&quot;&gt;@Giorgio Sironi &lt;/a&gt; 

I agree. That is something that I&#039;ve been thinking about too. &lt;code&gt;JTreeDriver&lt;/code&gt; is doing to much. I have plans to divide it several classes as &quot;gestures&quot;, &quot;assertions&quot; and &quot;queries&quot;. That is a huge change in the code base, but necessary. This changes will be internal though, the public API won&#039;t be affected :)

Thanks!</description>
		<content:encoded><![CDATA[<p><a href="#comment-162" rel="nofollow">@Giorgio Sironi </a> </p>
<p>I agree. That is something that I&#8217;ve been thinking about too. <code>JTreeDriver</code> is doing to much. I have plans to divide it several classes as &#8220;gestures&#8221;, &#8220;assertions&#8221; and &#8220;queries&#8221;. That is a huge change in the code base, but necessary. This changes will be internal though, the public API won&#8217;t be affected :)</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgio Sironi</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-162</link>
		<dc:creator>Giorgio Sironi</dc:creator>
		<pubDate>Wed, 29 Jul 2009 09:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-162</guid>
		<description>You can also divide the test methods by scenario; the common setUp and tearDown is probably a sign of a common scenario, the &quot;given&quot; part of a test. Beware that a very long test case class can be a smell of a violation of Single Responsibility Principle by your system under test: often if you&#039;re writing 40 test methods the class is doing too much, and you could factor out a collaborator that will handle the functionality which is less cohesive with the rest of your SUT.</description>
		<content:encoded><![CDATA[<p>You can also divide the test methods by scenario; the common setUp and tearDown is probably a sign of a common scenario, the &#8220;given&#8221; part of a test. Beware that a very long test case class can be a smell of a violation of Single Responsibility Principle by your system under test: often if you&#8217;re writing 40 test methods the class is doing too much, and you could factor out a collaborator that will handle the functionality which is less cohesive with the rest of your SUT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Ruiz</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-156</link>
		<dc:creator>Alex Ruiz</dc:creator>
		<pubDate>Tue, 28 Jul 2009 16:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-156</guid>
		<description>&lt;a href=&quot;#comment-155&quot; rel=&quot;nofollow&quot;&gt;@Michael Hüttermann &lt;/a&gt; 

Hey my friend! 

As I mentioned in our conversation on Twitter, so far I&#039;m pleased with the results. It is very easy to find tests for a specific methods. Test classes are small and very focused. I also found that in some cases, one test-class per method-to-test is an overkill.

I&#039;d like to kindly ask you to review the code before I check-in. I&#039;m sure we can find a good balance! :)</description>
		<content:encoded><![CDATA[<p><a href="#comment-155" rel="nofollow">@Michael Hüttermann </a> </p>
<p>Hey my friend! </p>
<p>As I mentioned in our conversation on Twitter, so far I&#8217;m pleased with the results. It is very easy to find tests for a specific methods. Test classes are small and very focused. I also found that in some cases, one test-class per method-to-test is an overkill.</p>
<p>I&#8217;d like to kindly ask you to review the code before I check-in. I&#8217;m sure we can find a good balance! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Hüttermann</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-155</link>
		<dc:creator>Michael Hüttermann</dc:creator>
		<pubDate>Tue, 28 Jul 2009 16:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-155</guid>
		<description>One test class per method results in a huge test class base. I prefer adding a couple of test methods in a test class with the restriction that they should all share the same setUp/tearDown. This leads to a more focussed test base. Of course this may also result in longer test classes .. if the length of test classes is important, you may use Checkstyle to monitor your expectations. But also here it is helpful to first define your expectations and then validate them (continuously). Me personally, I can work with longer classes, for me it is more critical how complex they are (e.g. McCabe). Longer ascii files can be managed by all IDEs, but only scoped ones are easy to maintain and to extend by the man in front of the desk (Cohesion vs Coupling are magic words here).</description>
		<content:encoded><![CDATA[<p>One test class per method results in a huge test class base. I prefer adding a couple of test methods in a test class with the restriction that they should all share the same setUp/tearDown. This leads to a more focussed test base. Of course this may also result in longer test classes .. if the length of test classes is important, you may use Checkstyle to monitor your expectations. But also here it is helpful to first define your expectations and then validate them (continuously). Me personally, I can work with longer classes, for me it is more critical how complex they are (e.g. McCabe). Longer ascii files can be managed by all IDEs, but only scoped ones are easy to maintain and to extend by the man in front of the desk (Cohesion vs Coupling are magic words here).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamlet D'Arcy</title>
		<link>http://alexruiz.developerblogs.com/?p=366&#038;cpage=1#comment-153</link>
		<dc:creator>Hamlet D'Arcy</dc:creator>
		<pubDate>Tue, 28 Jul 2009 15:55:05 +0000</pubDate>
		<guid isPermaLink="false">http://alexruiz.developerblogs.com/?p=366#comment-153</guid>
		<description>The other alternative is creating one TestCase per common setup/teardown. The results in a highly cohesive test... all the test methods use all the fields in the class. Your approach seems good when there aren&#039;t a lot of cross-method dependencies (doFoo() depends on doBar()) but a shared fixture approach might be better there are more cross-method dependencies. AND... cross method dependencies is probably a code smell for temporal coupling or some such.</description>
		<content:encoded><![CDATA[<p>The other alternative is creating one TestCase per common setup/teardown. The results in a highly cohesive test&#8230; all the test methods use all the fields in the class. Your approach seems good when there aren&#8217;t a lot of cross-method dependencies (doFoo() depends on doBar()) but a shared fixture approach might be better there are more cross-method dependencies. AND&#8230; cross method dependencies is probably a code smell for temporal coupling or some such.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
