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:
“No drug, not even alcohol, causes the fundamental ills of society. If were looking for the sources of our troubles, we shouldnt test people for drugs, we should test them for stupidity, ignorance, greed and love of power.”
—P.J. (Patrick Jake)
“It is clear that in a monarchy, where he who commands the exceution of the laws generally thinks himself above them, there is less need of virtue than in a popular government, where the person entrusted with the execution of the laws is sensible of his being subject to their direction.”
—Charles Louis de Secondat Montesquieu (16891755)