Java Reference
In-Depth Information
Figure 4.1
The five types of tests
4.2
Test types
Figure 4.1 outlines our five categories of software tests. There are other ways of catego-
rizing software tests, but we find these most useful for the purposes of this topic.
Please note that this section is discussing software tests in general , not just the automated
unit tests covered elsewhere in the topic.
In figure 4.1, the outermost tests are broadest in scope. The innermost tests are
narrowest in scope. As you move from the inner boxes to the outer boxes, the software
tests get more functional and require that more of the application be present.
Next, we take a look at the general test types. Then, we focus on the types of
unit tests.
4.2.1
The four types of software tests
We've mentioned that unit tests each focus on a distinct unit of work. What about
testing different units of work combined into a workflow? Will the result of the work-
flow do what you expect? How well will the application work when many people are
using it at once? Different kinds of tests answer these questions; we categorize them
into four varieties:
Integration tests
Functional tests
Stress and load tests
Acceptance tests
Let's look at each of the test types, starting with the innermost after unit testing and
working our way out.
I NTEGRATION SOFTWARE TESTING
Individual unit tests are essential to quality control, but what happens when different
units of work are combined into a workflow? Once you have the tests for a class up and
running, the next step is to hook up the class with other methods and services. Exam-
ining the interaction between components, possibly running in their target environ-
ment, is the job of integration testing. Table 4.1 describes the various cases under
which components interact.
Just as more traffic collisions occur at intersections, the points where objects inter-
act are major contributors of bugs. Ideally, you should define integration tests before
 
 
 
 
 
Search WWH ::




Custom Search