Fit Nesse - Test Execution

Test Execution

Testing within the FitNesse system involves four components per test:

  • The wiki page which expresses the test as a decision table.
  • A testing engine, which interprets the wiki page.
  • A test fixture, which is invoked by the testing engine and in turn invokes the system under test.
  • The system under test, which is being tested.

Of these components the software development team produces two: the wiki page and the fixture (of course it also produces the system under test, but from the point of view of the black-box test only two). The wiki page includes some form of decision table which expresses a test. For example, it might express tests for a component that performs division (the example is based on the one given in the FitNesse Two Minute Example):

Division component test
numerator value denominator value result?
10 2 5.0
10 5 2.0
5 2 2.5

The link between the generic testing engine and the system under test is made by a piece of Java code called a fixture. In the case of the table above this code might look like this:

public class DivisionComponentTest extends ColumnFixture{ private double num; private double denom; public void setNumeratorValue (double numerator) { num = numerator; } public void setDenominatorValue (double denominator) { denom = denominator; } public double result { return SystemUnderTest.divide (num, denom); } }

The mapping between the wiki page and the fixture is a straightforward convert-to-camel case mapping. This mapping applies to all table headings and is used to identify the name of the fixture class as well as the methods of the fixture. A heading ending in a question mark is interpreted as a value to be read from the fixture, other headers are considered inputs to the fixture. Methods of the fixture are called in column order of the decision table, from left to right.

Read more about this topic:  Fit Nesse

Famous quotes containing the words test and/or execution:

    I have come to believe ... that the stage may do more than teach, that much of our current moral instruction will not endure the test of being cast into a lifelike mold, and when presented in dramatic form will reveal itself as platitudinous and effete. That which may have sounded like righteous teaching when it was remote and wordy will be challenged afresh when it is obliged to simulate life itself.
    Jane Addams (1860–1935)

    I will soon be going out to shape all the singing tomorrows.
    Gabriel Péri, French Communist leader. Letter, July 1942, written shortly before his execution by the Germans. Quoted in New York Times (April 11, 1943)