Section 2.2. Tables for Communicating


2.2. Tables for Communicating

As we saw in Chapter 1, Fit tables help solve three major problems in software development: Communication, Agility, and Balance. Fit tables aid communication between the people who want a software system and those who develop it. Test tables also apply to the ongoing development of new features in existing software products and systems. Rather than talking in vague terms about what is required or how a system works, businesspeople can use concrete examples in tables to help be specific. For example, the requirement "Charge fairly for rental items, using the rental scheme that is best for the customer" is rather vague and requires considerable questioning or guesswork for a programmer to handle. Further, it's not clear when it has been completed.

Stories and examples are a powerful way to communicate. We often need good, clear examples before we're ready to discuss the general case. These examples help us to agree on terminology and to refine or create a "ubiquitous language" [Eva04]. It is effective to have people with different backgrounds discussing those cases, looking at them from different perspectives, and sketching out concrete examples that can turn into Fit tests.

The programmers can see more clearly what's needed, driving their development from the tests, and know when they're done. The testers can see what other cases need to be considered at the start, when everyone is thinking about it. The businesspeople have specifics to discuss and to reconsider, to gain agreement about business needs and the relative value to be gained from developing features in a software system to support those needs.

Our focus in this book is on expressing tests for business rules. We are interested in two types of business rules:

  1. Those that define how calculations are made, such as for discounts, or how decisions are made, such as whether to send a payment demand

  2. Those that define the business processes that are incorporated into a software system, such as the steps used to admit a patient to a hospital

We often need a mixture of tests for such rules, because we want to ensure that business calculations are also being made correctly within the context of a business process.

Tables are used, rather than plain text or a programming language, because the rows and columns of a table provide a clear and simple structure. Placing a value in the cell of a table is very simple, and many people are used to using tables in spreadsheets, Web pages, and other documents. As we discuss in the following chapters, once the structure of a table is clear, using that table, or another like it, to add concrete examples is straightforward. Finally, as we saw in Figure 2.1, Fit provides feedback from running tests by coloring the cells in the reported test table (Plate 1).



    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