testing : Java Glossary

go to home page T words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish by Roedy Green ©1996-2009 Canadian Mind Products
index page for letter ⇒ punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
testing
There are two basic methods of testing your code:
  1. Unit testing: or white box testing. You write little routines to exhaustively test each execution branch of your method. I often refer to such a suite as a test harness. You test each method in isolation. Unit tests are best at finding implementation errors, such as off-by-one loops. Tools such as JUNIT can help you compose these tests.
  2. Black-box testing: or system level testing. This is best at finding integration errors. The tester deliberately does not look at how a function is implemented. He is out to catch miscommunications between programmers on how to use each others’ classes. The tester avoids looking at the code to avoid falling into the same traps and presumptions the programmers did.
In a simple case, your test method can be the main method of the class you are testing with the body of the method enclosed in:
if ( DEBUGGING )
where DEBUGGING is a static final boolean. This code has a dual purpose of exercising the methods and showing some sample uses and expected outputs.

For more complex classes, you use a tool like JUnit.

<xml-unit>
Cactus
DBUnit
FitNesse
Hansel
J Unit PP
JFunc
JTestCase
JUnit
JUnitPerf
regression
Solex: lets you replay Internet conversations for regression testing
TagUnit
TestNG: (Daniel Dyer’s favourite)

CMP homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.62] Spread the Net
You are visitor number 7,680.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/testing.html J:\mindprod\jgloss\testing.html