Java Reference
In-Depth Information
U SER - CENTRIC APPROACH
We know that there is tremendous value in customer feedback, and one of our goals
from Extreme Programming is to “release early and release often.” But we're unlikely
to get useful feedback if we just tell the customer, “Here it is. Let me know what you
think.” It's far better to get the customer involved by providing a manual test script to
run through. By making the customer think about the application, they can also clar-
ify what the system should do.
T ESTING DIFFICULTIES
Black box tests are more difficult to write and run 2 because they usually deal with a
graphical front end, whether a web browser or desktop application. Another issue is
that a valid result on the screen doesn't always mean the application is correct. White
box tests are usually easier to write and run, but the developers must implement them.
T EST COVERAGE
White box testing provides better test coverage than black box testing. On the other
hand, black box tests can bring more value than white box tests. We focus on test cov-
erage in the next chapter.
Although these test distinctions can seem academic, recall that divide and con-
quer doesn't have to apply only to writing production software; it can also apply to
testing. We encourage you to use these different types of tests to provide the best
code coverage possible, thereby giving you the confidence to refactor and evolve
your applications.
4.4
Summary
The pace of change is increasing. Product release cycles are getting shorter, and we
need to react to change quickly. In addition, the development process is shifting—
development as the art of writing code isn't enough. Development must be the art of
writing complete and tested solutions.
To accommodate rapid change, we must break with the waterfall model where test-
ing follows development. Late-stage testing doesn't scale when change and swiftness
are paramount.
When it comes to unit testing an application, you can use several types of unit tests:
logic, integration, and functional unit tests. All are useful during development and
complement each other. They also complement the other software tests that are per-
formed by quality assurance personnel and by the customer.
In the next chapter, we continue to explore the world of testing. We present best
practices, like measuring test coverage, writing testable code, and practicing test-driven
development ( TDD ).
2
Black box testing is getting easier with tools like Selenium and HtmlUnit, which we describe in chapter 12.
 
 
 
 
Search WWH ::




Custom Search