3.4 xUnit Architecture Summary

     

The classes TestCase , TestRunner , TestFixture , TestSuite , and TestResult represent the core of the xUnit architecture. To understand what they do is to understand how xUnit works. Figure 3-6 shows how they all fit together.

Figure 3-6. Core classes of the xUnit test framework architecture
figs/utf_0306.gif

The test classes created in this chapter and the classes they interact with are shown in Figure 3-7.

Figure 3-7. The test classes LibraryTests, LibraryTest, and BookTest
figs/utf_0307.gif

LibraryTests is a TestSuite containing BookTest and LibraryTest . LibraryTest is a TestFixture , and BookTest is a TestCase . Conceptually, TextTestRunner runs LibraryTests , which runs BookTest and LibraryTest , which in turn run their test methods .

This concludes the discussion of the generic xUnit architecture. Chapter 6 through Chapter 10 describe the specific architectural details of some popular versions of xUnit, with usage examples for each one.



Unit Test Frameworks
Unit Test Frameworks
ISBN: 0596006896
EAN: 2147483647
Year: 2006
Pages: 146
Authors: Paul Hamill

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net