Section 35.3. Summary


35.3. Summary

Calculation tests can be carried out in two ways.

  1. The fixtures for the Fit tables call directly into a method in the domain layer that encodes the business rule.

  2. The fixtures carry out a series of actions, either on the domain layer or through the user interface, creating auxiliary objects as needed. To reuse existing code, the fixtures can make use of other fixtures for driving the actions, thus emulating Fit action tables.

The tests will run faster with the first approach, but they will test less of the system. The system under test may be structured so that we're unable to take this approach initially.

The tests will test more of the system with the second approach, but they will run slower, depending on whether they test through the user interface. Such tests are a useful first step with a legacy system. Once they're in place, the system can be test infected to allow the first approach.



    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