Section 31.3. Summary


31.3. Summary

It wasn't obvious to Emily how to connect the fixture to the application.

  • Sometimes, a simple change to the system under test is all that's needed to expose or create the specific code that encodes a business rule. That was the case here. But this can be risky, as bugs may be introduced in the process.

  • At other times, the system under test is poorly organized for directly testing business logic code. In that case, the fixtures for calculation tests may need to carry out a series of actions on the system under test, as we illustrate in Chapter 35.

Developing fixtures for calculation tests can be easier to start with than action tests. From a programmer's point of view, the following general characteristics can help in choosing an early area for introducing such Fit tests.

  • A part needs attention because it really needs reorganizing soon, perhaps to separate the presentation layer or to introduce a new Web-based interface.

  • The application is structured to permit the tests to be carried out on the domain layer, as introduced in Chapter 30, or only minor refactoring is required to provide this access.

  • People who are familiar with the code are eager to participate and have time and the support of management to do so.



    Fit for Developing Software. Framework for Integrated Tests
    Fit for Developing Software: Framework for Integrated Tests
    ISBN: 0321269349
    EAN: 2147483647
    Year: 2005
    Pages: 331

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