Java Reference
In-Depth Information
methods and classes. We have also looked at some basic techniques for automating the testing
process and performing simple debugging.
Writing good JUnit tests for our classes ensures that errors are detected early, and they give a
good indication which part of the system an error originates in, making the resulting debugging
task much easier.
Terms introduced in this chapter
syntax error, logical error, testing, debugging, unit testing, JUnit, positive testing,
negative testing, regression testing, manual walkthrough, call sequence
Concept summary
testing Testing is the activity of finding out whether a piece of code (a method, class, or
program) produces the intended behavior.
debugging Debugging is the attempt to pinpoint and fix the source of an error.
positive testing Positive testing is the testing of cases that are expected to succeed.
negative testing Negative testing is the testing of cases that are expected to fail.
assertion An assertion is an expression that states a condition that we expect to be true. If
the condition is false, we say that the assertion fails. This indicates an error in our program.
fixture A fixture is a set of objects in a defined state that serves as a basis for unit tests.
walkthrough A walkthrough is an activity of working through a segment of code line by line
while observing changes of state and other behavior of the application.
Search WWH ::




Custom Search