<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>maxheapsize.com &#187; testng</title>
	<atom:link href="http://maxheapsize.com/tag/testng/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxheapsize.com</link>
	<description>Oliver Wehrens on Programming and Agile</description>
	<lastBuildDate>Tue, 14 Jun 2011 20:41:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Test JBoss Rules 5 (or Drools) with TestNG</title>
		<link>http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/</link>
		<comments>http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:25:55 +0000</pubDate>
		<dc:creator>Oliver Wehrens</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[drools]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[fit]]></category>
		<category><![CDATA[for for rules]]></category>
		<category><![CDATA[jboss rules]]></category>
		<category><![CDATA[testng]]></category>

		<guid isPermaLink="false">http://maxheapsize.com/?p=330</guid>
		<description><![CDATA[We have been using our own flavor of Fit for Rules (which is build on top of fit) for about 1 1/2 years now to test our business logic written in JBoss Rules 5. It&#8217;s relatively easy to get the Business Analyst on board since he is using his tool (which is Microsoft Excel) to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F09%2F23%2Ftest-jboss-rules-5-with-testng%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F09%2F23%2Ftest-jboss-rules-5-with-testng%2F&amp;source=owehrens&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We have been using our own flavor of <a href="http://fit-for-rules.sourceforge.net/">Fit for Rules</a> (which is build on top of <a href="http://fit.c2.com">fit</a>) for about 1 1/2 years now to test our business logic written in <a href="http://jboss.org/drools/">JBoss Rules 5</a>.  It&#8217;s relatively  easy to get the<strong> Business Analyst</strong> on board since he is using his tool (which is Microsoft Excel) to communicate test cases for the rules. So in theory, he writes the tests in <strong>Excel</strong>, we do the rules coding and voila, all <strong>tests turn green</strong>.</p>
<p>Reality is, we have to<strong> tweak the Excel sheets</strong>. We need to put in imports of our fact model, insert facts and create objects within that not so programmer friendly table environment. A couple of days ago we got the request to tweak some rules and we all had to start doing rules again (and we used to use Eclipse for writing rules because that&#8217;s the only IDE having a plugin for that). </p>
<p>After half a day of coding Java syntax in Excel sheets we decided that the <strong>ramp up time</strong> for the not so knowledgeable rules/fit programmers like me is<strong> too much</strong>. With debugging, copy and paste we spent easily 5-10 times more time on making the tests work than writing the code itself. Test driven design is not really an option here, since you need to know the imports of the rules file to get the sheet even to compile.</p>
<p>So what did we do ? Well why not try to get things working the way we used to do it ? TestNG anyone ?</p>
<p>There are <strong>many pros</strong> to use unit testing but also some cons. <strong>The biggest issue is that we will loose the direct communication to the business analyst</strong>. It&#8217;s always better if someone else writes the test and I just have to implement the solution. Maybe we can find another solution involving Active Spec or DSL. For now we stick to unit tests and the task the we have to make sure we convert every Excel test case to java code (but hey, that&#8217;s what our code reviews are for).</p>
<p>Checkout our current base class for testing our rules:</p>
<pre class="brush: java; title: ;">
public abstract class AbstractRulesTest {
   public abstract String[] getRulesFileNames();
   private final String GET_FINDINGS = &quot;import com.maxheapsize.RulesFinding;&quot; +
                                                                           &quot;query \&quot;getAllRulesFindings\&quot;\n&quot; +
                                                                           &quot;   finding : FRulesFinding()\n&quot; +
                                                                           &quot;end&quot;;

   private static Logger LOG = Logger.getLogger(AbstractRulesTest.class);

   public final List&lt;FRulesFinding&gt; fireRules(Set factsForWorkingMemory) {
       KnowledgeBase ruleBase = setUpKnowledgeBase();
       return fireRules(ruleBase, factsForWorkingMemory);
   }

   public KnowledgeBase setUpKnowledgeBase() {
       KnowledgeBaseConfiguration configuration = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
       KnowledgeBase ruleBase = KnowledgeBaseFactory.newKnowledgeBase(configuration);

       KnowledgeBuilder build = KnowledgeBuilderFactory.newKnowledgeBuilder();
       build.add(ResourceFactory.newReaderResource(new StringReader(GET_FINDINGS)), ResourceType.DRL);
       String[] fileNames = getRulesFileNames();
       for (String fileName : fileNames) {
           File userDefinedFile = new File(fileName);
           build.add(ResourceFactory.newFileResource(userDefinedFile), ResourceType.DRL);
       }

       handleBuilderErrors(build);

       ruleBase.addKnowledgePackages(build.getKnowledgePackages());
       return ruleBase;
   }

   private void handleBuilderErrors(KnowledgeBuilder build) {
       if (build.hasErrors()) {
           KnowledgeBuilderErrors knowledgeBuilderErrors = build.getErrors();
           for (KnowledgeBuilderError knowledgeBuilderError : knowledgeBuilderErrors) {
               int[] ints = knowledgeBuilderError.getErrorLines();
               LOG.error(&quot;Error at : &quot;+ints[0]+&quot; : &quot;+ints[1]);
               LOG.error(knowledgeBuilderError.getMessage());
           }
       }
   }

   private List&lt;FRulesFinding&gt; fireRules(KnowledgeBase ruleBase, Set facts) {
       List&lt;FRulesFinding&gt; result = new ArrayList&lt;FRulesFinding&gt;();
       StatefulKnowledgeSession statefulSession = ruleBase.newStatefulKnowledgeSession();
       for (Object fact : facts) {
           statefulSession.insert(fact);
       }
       statefulSession.fireAllRules();

       QueryResults results = statefulSession.getQueryResults(&quot;getAllRulesFindings&quot;);
       try {
           FRulesFinding finding = (FRulesFinding) results.iterator().next().get(&quot;finding&quot;);
           result.add(finding);
       }
       catch (NoSuchElementException e) {
           result = new ArrayList&lt;FRulesFinding&gt;();
       }
      return result;
   }
}
</pre>
<p>All my rules insert a RulesFinding (and only one at the moment) into the working memory when triggered.  The rest is pretty easy. You subclass it, overwrite getRulesFileNames and call fireRules with a set of objects (your tests) which need be insert into the working memory. To get the finding back you need to execute an already inserted  query which needs to have an identifier (line 3, 20, 52, 54). It will contain the result of your rule execution.</p>
<p>Sample code would look like this:</p>
<pre class="brush: java; title: ;">
public class RulesTest extends AbstractRulesTest {

   private Set facts;

   @BeforeMethod
   public void setUp() {
       facts = new HashSet();
   }

   @Override
   public String[] getRulesFileNames() {
       return new String[]{
               &quot;src/main/rules/myrules.drl&quot;,
               &quot;src/main/rules/generealRules.drl&quot;
           };
  }

   @Test
   public void testDemoRule() {

       FMyFact myFact = new FMyFact();
    myFact.setColor(&quot;green&quot;);
       facts.add(myFact); // add all your facts here

       List&lt;FRulesFinding&gt; findings = fireRules(facts);
       Assert.assertTrue(findings.size() == 1);
       FRulesFinding finding = findings.get(0);
       Assert.assertTrue(finding.getStatus() == FStatus.OK);
   }
 }
</pre>
<p>Depending on how you cut your rules you can extract the assertion of the status. </p>
<p>Each test case in Excel now takes about 5-10 lines of java code. Considering we are covering each rule with about 5-15 test cases and boundary conditions this amounts to 75-150 lines of test code. I take that <strong>any day over programming in Excel</strong>.</p>
<div class="google_plusone_widget"><g:plusone 
      count="true" href="http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/" size="medium"></g:plusone></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG&amp;url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;bm_description=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/&amp;title=Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Test+JBoss+Rules+5+%28or+Drools%29+with+TestNG+@+http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://maxheapsize.com/2009/09/23/test-jboss-rules-5-with-testng/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Update on Quant TestTester</title>
		<link>http://maxheapsize.com/2009/06/25/update-on-quant-testtester/</link>
		<comments>http://maxheapsize.com/2009/06/25/update-on-quant-testtester/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 20:31:23 +0000</pubDate>
		<dc:creator>Oliver Wehrens</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[quant]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testng]]></category>

		<guid isPermaLink="false">http://maxheapsize.com/?p=258</guid>
		<description><![CDATA[Here is a small update on my little fun project. I released version 0.2 of quant. Now it will recognize all TestNG annotations which do not have a TestNG group (like @BeforeMethod, @BeforeClass etc.). The method &#8216;reportViolation&#8217; on ClassTester will now report whats wrong with the examined class. [/java] assertFalse(classTester.isInvalidTestClass(), classTester.reportViolation()); [java] Above code will [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F06%2F25%2Fupdate-on-quant-testtester%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F06%2F25%2Fupdate-on-quant-testtester%2F&amp;source=owehrens&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Here is a small update on my little fun project.</p>
<p>I released version 0.2 of quant. Now it will recognize all TestNG annotations which do not have a TestNG group (like @BeforeMethod, @BeforeClass etc.). The method &#8216;reportViolation&#8217; on ClassTester will now report whats wrong with the examined class.</p>
<pre class="brush: java; title: ;">[/java]
 assertFalse(classTester.isInvalidTestClass(),
    classTester.reportViolation());
[java]</pre>
<p>Above code will now report:</p>
<pre>
java.lang.AssertionError:
Report for Class com.maxheapsize.quant.testclasses.SetupMethodWithoutTestGroup
Ignore abstract classes: true
Specified TestGroups :  + testUnitTest
* Methods with wrong test group:
  - testSetUp
</pre>
<p>In this way you know what went wrong and where to look for it.</p>
<p>Quant is now also available in my <a href="http://maxheapsize.com/maven2/com/maxheapsize/quant/">repository</a>. To include it add the following code to your pom.xml.</p>
<pre class="brush: xml; title: ;">
&lt;dependency&gt;
    &lt;groupId&gt;com.maxheapsize&lt;/groupId&gt;
    &lt;artifactId&gt;quant&lt;/artifactId&gt;
    &lt;version&gt;0.2&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p>For now you need to add my mvn repository to your pom. I&#8217;m about to have it mirrored to the official servers. </p>
<p>Have fun.</p>
<div class="google_plusone_widget"><g:plusone 
      count="true" href="http://maxheapsize.com/2009/06/25/update-on-quant-testtester/" size="medium"></g:plusone></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Update+on+Quant+TestTester&amp;url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;bm_description=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://maxheapsize.com/2009/06/25/update-on-quant-testtester/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/&amp;title=Update+on+Quant+TestTester" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://maxheapsize.com/2009/06/25/update-on-quant-testtester/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Update+on+Quant+TestTester+@+http://maxheapsize.com/2009/06/25/update-on-quant-testtester/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://maxheapsize.com/2009/06/25/update-on-quant-testtester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quant &#8211; Check your Tests</title>
		<link>http://maxheapsize.com/2009/05/30/quant-check-your-tests/</link>
		<comments>http://maxheapsize.com/2009/05/30/quant-check-your-tests/#comments</comments>
		<pubDate>Sat, 30 May 2009 20:06:47 +0000</pubDate>
		<dc:creator>Oliver Wehrens</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[quant]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testng]]></category>

		<guid isPermaLink="false">http://maxheapsize.com/?p=229</guid>
		<description><![CDATA[Did you ever wondered if all tests your team wrote are really running ? How many disabled tests does your code base have? How many public void methods do not have a @Test annotation (or at the class) ? I saw all of that in the last years. To overcome this situation I wrote a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F05%2F30%2Fquant-check-your-tests%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F05%2F30%2Fquant-check-your-tests%2F&amp;source=owehrens&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://maxheapsize.com/static/QuantLogo.png" class="alignleft"/>Did you ever wondered if all tests your team wrote are <strong>really running</strong> ? How many <strong>disabled tests</strong> does your code base have? How many public void methods <strong>do not have a @Test</strong> annotation (or at the class) ? </p>
<p>I saw all of that in the last years.  </p>
<p>To overcome this situation I wrote a couple of java classes which will scan your java test sources and will examine the annotations (for TestNG, sorry JUnit). The code will detect if all public void methods do have a<code> @Test</code> annotation (either direct on the method or on the class) or if there are disabled tests. Both signals are most likely a sign of rotten code. </p>
<p>If you have different test groups defined like &#8216;unitTest&#8217; or &#8216;integrationTest&#8217; you want to make sure all tests are in at least one test group. This ensures if you run all test groups all tests are executed. </p>
<p>The usage is really <strong>simple</strong>. To make sure all your tests are ok is to <strong>write just another test</strong> which will check all tests.</p>
<pre class="brush: java; title: ;">
ClassFinder classFinder =
   new ClassFinder.Builder(sourceDirectory).build();
for (Class klass : classFinder.getClassList()) {
  TestClassTester testClassTester =
    new TestNGTestClassTester.Builder(klass).build();
  Assert.assertTrue(testClassTester.allTestMethodsHaveValidTestGroup());
}
</pre>
<p>You need to specify the source files of your code so that all java files can be scanned. It is possible to exclude certain packages to be checked (via <code>TestNGTestClassTester.Builder(klass).addExcludedPackage("testclasses").build()</code>). After gathering all class names from the sources the code will check for <code>@Test</code> annotations in the test classes. You can also specify the test groups which all test should belong to (via <code>addTestGroup("unitTest")</code> in the builder).</p>
<p>Finding disabled test methods is very simple too (one of the unit tests)</p>
<pre class="brush: java; title: ;">
@Test
public void testNoDisabledTest() {
  DisabledTestFinder unitUnderTest =
    new TestNGDisabledTestFinder.Builder(TwoTestGroups.class).build();
  assertFalse(unitUnderTest.hasDisabledTests());
}
</pre>
<p>This would test a single class (but you can of course feed it with the results of the ClassFinder).</p>
<p>If you combine the possibility to break your build because of defect test classes and a  <strong>continuous integration system</strong>, you can make sure everybody will annotate their classes correctly or never disables tests (or even better use a CI with delayed check in and personal build like Jetbrains Teamcity). Of course you can define your own thresholds for e.g. 30 disabled tests are allowed (I know sometimes you just can&#8217;t avoid it).</p>
<p>The code depends on testng and commons-io and is released under the Apache v2 license.</p>
<p>I still need to figure out where to put the maven2 sources. Either Google code or GitHub ? Any ideas? </p>
<p><strong>Update:</strong> Code is available at <a href="http://code.google.com/p/quant/source/checkout">Google Code Hosting</a>.</p>
<p>Things to implement:</p>
<ul>
<li>A more flexible exclude patterm, like Apache ant maybe</li>
<li>Make sure to check @BeforeXXX and @AfterXXX methods as well</li>
<li>Implement JUnit (maybe <img src='http://maxheapsize.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</li>
</ul>
<div class="google_plusone_widget"><g:plusone 
      count="true" href="http://maxheapsize.com/2009/05/30/quant-check-your-tests/" size="medium"></g:plusone></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Quant+%26%238211%3B+Check+your+Tests&amp;url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://maxheapsize.com/2009/05/30/quant-check-your-tests/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;bm_description=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://maxheapsize.com/2009/05/30/quant-check-your-tests/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://maxheapsize.com/2009/05/30/quant-check-your-tests/&amp;title=Quant+%26%238211%3B+Check+your+Tests" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://maxheapsize.com/2009/05/30/quant-check-your-tests/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Quant+%26%238211%3B+Check+your+Tests+@+http://maxheapsize.com/2009/05/30/quant-check-your-tests/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://maxheapsize.com/2009/05/30/quant-check-your-tests/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using TestNG with DataProviders to cover more test cases</title>
		<link>http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/</link>
		<comments>http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 22:51:44 +0000</pubDate>
		<dc:creator>Oliver Wehrens</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[testng]]></category>
		<category><![CDATA[unit]]></category>

		<guid isPermaLink="false">http://maxheapsize.com/?p=150</guid>
		<description><![CDATA[A couple of days ago I had the case that I needed to test a method with different parameters. I ended up writing a couple of test methods differing only in passing various arguments to the unit under test. Tonight I was at a TestNG talk and while I knew most of the stuff already [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F03%2F23%2Fusing-testng-with-dataproviders-to-cover-more-test-cases%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F03%2F23%2Fusing-testng-with-dataproviders-to-cover-more-test-cases%2F&amp;source=owehrens&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A couple of days ago I had the case that I needed to test a method with different parameters. I ended up writing a couple of test methods <strong>differing only in passing various arguments</strong> to the unit under test. </p>
<p>Tonight I was at a <a href="http://newthinking-store.de/stammtisch/javausergroup/20090310">TestNG</a> talk and while I knew most of the stuff already the DataProviders (which I heard of before but unfortunately never really payed attention to) really caught me.</p>
<p>Now I can create a<strong> DataProvider which generates test data</strong>. Each of these data sets will result in call of the test method with the corresponding arguments. </p>
<p>The following code will test a String to Property Converter if it works correctly. It takes two parameters, first the string to be converted, second the result which I will assert.</p>
<pre class="brush: java; title: ;">
@Test(dataProvider = &quot;convertTestDataProvider&quot;)
public void testConvert(String property, String result)
{
    Properties properties =
      stringPropertyConverter.convertString(property);
    Assert.assertTrue(properties.get(&quot;A&quot;).equals(result));
  }
</pre>
<p>Now the DataProvider must return an array of array of objects. TestNG will cast the return values to the method signature of all the tests with the corresponding annotation.</p>
<pre class="brush: java; title: ;">
    @DataProvider(name = &quot;convertTestDataProvider&quot;)
    public Object[][] convertTestDataProvider()
    {
        return new Object[][]{
                {&quot;A=&quot;, &quot;&quot;},
                {&quot;A=1&quot;, &quot;1&quot;},
                {&quot;A=2=3&quot;, &quot;2=3&quot;},
                {&quot;A=2&quot; + StringPropertyConverter.ideaLineSeperator +
                 &quot;# Comment&quot; +
                 StringPropertyConverter.ideaLineSeperator + &quot;C=1&quot;, &quot;2&quot;},
        };
    }
</pre>
<p>Here I cover 4 test cases. It is very easy to add more tests just by adding one more line with the values to test and the expected result.</p>
<div class="wp-caption alignnone" style="width: 473px"><img alt="TestNG results with DataProvider" src="http://maxheapsize.com/static/TestNGWithDataProvider.jpg" title="TestNG results with DataProvider" width="463" height="312" /><p class="wp-caption-text">TestNG results with DataProvider</p></div>
<p>This will save me some amount of time.</p>
<p>Good Job <a href="http://beust.com/weblog/">Cedrik</a> &#038; friends.</p>
<p>Next step: How to make sure you cover all the relevant test cases (and having a systematic way of getting there). Anybody has an Idea?</p>
<div class="google_plusone_widget"><g:plusone 
      count="true" href="http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/" size="medium"></g:plusone></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Using+TestNG+with+DataProviders+to+cover+more+test+cases&amp;url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;bm_description=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/&amp;title=Using+TestNG+with+DataProviders+to+cover+more+test+cases" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Using+TestNG+with+DataProviders+to+cover+more+test+cases+@+http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://maxheapsize.com/2009/03/23/using-testng-with-dataproviders-to-cover-more-test-cases/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

