testing : Java Glossary

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 (Java Unit test) 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 You can get the freshest 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
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.212]
You are visitor number 10,459.