“There’s more than one way to skin a cat.”
Anonymous
There are many acceptance test frameworks. This appendix has a few examples for the application described in this book.
These examples show how the tests in this book are expressed in different frameworks. The corresponding table-style tests are in Chapter 10, “User Story Breakup,” and Chapter 11, “System Boundary.” They all perform the following operations:
• Set up persistent storage with a customer and a CD.
• Check-out a CD.
• Check-in a CD with a simple rental fee computation.
• Verify the computation of the rental fee for an upcoming change in how rental fees are calculated, based on the CD category.
The Check-Out CD and Check-In CD tests are part of a workflow test. The Check-In test assumes that the CD has been checked-out. If the tests are run separately or not run in the required sequence, the setup would be performed for each test. Then the given part of the Check-In test has to ensure that the values for CD Data indicate that the CD is rented.
Here is the Fit version, which uses just the three original Fit table types. You can download the Fit version with the Java code from http://atdd.biz.
Here is the FitNesse version using Slim, created by Markus Gaertner. Some tables have been reformatted so they fit on the page. You can download this version with the Java code from http://atdd.biz.
Here is the Slim version created by Bob Martin. It gives an idea of what text-base tests look like. The text tests are connected to the scenario library. The scenario library in turn discusses methods written for a particular language.
Here is the Robot version created by Dale Emery. It is available at http://atdd.biz.
Here is the Cucumber version created by John Goodsen.
The previous scenario continues here:
To get more information about these and other common test frameworks, Table C.1 provides links. You can find other frameworks and tools at www.opensourcetesting.org/functional.php.
Table C.1. Some Acceptance Test Frameworks and Associated Links
• Tests can be implemented in a number of frameworks.
18.224.73.175