Fit for Developing Software. Framework for Integrated Tests
Authors: Mugridge R. Cunningham W
Published year: 2005
Pages: 23-26/331
Buy this book on amazon.com >>

2.3. Tables for Testing

Fit tables are structured so that they can also act as automated tests that are run against an application system, which we call the system under test . Specific information is provided in Fit tables to enable them to be used in testing. The fixture of a table determines how it will be used in automated testing.

In the next three chapters, we see three main families of fixtures that make use of the table structure in different ways. Later chapters introduce other sorts of fixtures and show how new table structures can be invented to enable business rules to be expressed as clearly as possible. Together, a variety of table types are used to express business rules that are to be incorporated in the software under development.


2.4. Tables, Fixtures, and a System Under Test

Figure 2.2 shows the main testing ingredients that we will be exploring throughout this book. At the top are three Fit tables that contain data for one or more tests. In the middle are three fixtures, each of which is responsible for checking that the tests in their table are satisfied by the system under test, which is at the bottom.

Figure 2.2. Fit Tables Test Applications


We begin with some simple examples of Fit tables for testing. Such tests are for checking various business rules, those elements of a software application that most interest businesspeople.


2.5. Reading Fit Tables

A reading knowledge of Fit tables is needed in order to undertake the social process of creating and evolving tests with Fit. Chapters 3, 4, and 5 look at examples of tests using tables based on the three core Fit fixtures:

  1. ColumnFixture tables, for testing calculations (Chapter 3)

  2. ActionFixture tables, for testing that things happen on actions (Chapter 4)

  3. RowFixture tables, for testing lists or other collections of things (Chapter 5)

The remaining chapters of Part I further develop the basics of reading Fit test tables:

  • Using sequences of tables (Chapter 6)

  • Creating tables and running Fit on them (Chapter 7)

  • Using FitNesse, a Web-based environment for creating, managing, and running Fit tables (Chapter 8)

  • Managing several issues that arise in testing (Chapter 9)

  • Using flow-style fixture tables (Chapter 10)

  • Using examples of other table structures (Chapter 11) to show by example that custom table structures may be used to better express some tests

The process and people aspects of developing Fit tests are examined in Part II. Fit tables need some support from programmers to connect the tests through to the system under test. Corresponding to the tables and tools developed in Part I, programmer-specific details are given in Part III, which covers writing the fixture code and installing Fit and FitNesse.

Note

Fit was developed by Ward Cunningham and released in 2002.

Details of the history of Fit development are available at http://fit.c2.com/wiki.cgi?FrameworkHistory.



Chapter 3. Testing Calculations with ColumnFixture Tables

We often want to test that calculations are being carried out correctly, according to some business rule. Tables of concrete examples help us to understand business needs and communicate what's required. Here, we will focus on how to read such Fit tests; later, we will show how to write them.

We begin with two simple examples that test calculations by using tables of type ColumnFixture , which is designed to do this.

These tests are rather abstract in that they say nothing about how someone using the system under test will see the consequences of this business rule. In Chapter 4, we'll see tests that are more aligned to the step-by-step use of the system under test.

Fit for Developing Software. Framework for Integrated Tests
Authors: Mugridge R. Cunningham W
Published year: 2005
Pages: 23-26/331
Buy this book on amazon.com >>

Similar books on Amazon