[brailleblaster] Re: JUnit and other approaches to testing

  • From: "qubit" <lauraeaves@xxxxxxxxx>
  • To: <brailleblaster@xxxxxxxxxxxxx>
  • Date: Mon, 20 Dec 2010 21:49:58 -0600

Thanks for the link.
--le

----- Original Message ----- 
From: "Susan Jolly" <easjolly@xxxxxxxxxxxxx>
To: <brailleblaster@xxxxxxxxxxxxx>
Sent: Monday, December 20, 2010 6:48 PM
Subject: [brailleblaster] JUnit and other approaches to testing


I was able to get JUnit working very quickly after reading this simple
tutorial:
http://code.google.com/p/t2framework/wiki/JUnitQuickTutorial

My impression is that JUnit works best on very modular code where you know
what the right result for a method is.  A more comprehensive approach is the
t2 tool referenced in the tutorial.  This tool tests an entire class by
generating lots of random method calls and field updates.

Since I haven't been using JUnit, I typically add a main method to each
class while I'm developing it.  The purpose of the main method is to test
for straightforward errors such as typos and simple mistakes in logic. These
tests could be easily refactored to JUnit tests which has the advantage of
eliminating clutter.

SusanJ



Other related posts: