A BDD Kata using Cucumber. BDD is sometimes referred to as Specification by Example.
Cucumber is an implementation of the Gherkin language for specification. It also known as "given-when-then" as this makes the structure of a specification element. See Resources below for more information on the language.
Cucumber executes the specification and with the help of your glue code, it can interface with the system under test. Glue code is here referred to as "step definitions". Your IDE should understand this and help you with navigation from specification to step definitions. Also, it will help you write new step definitions when you add to the specification.
- Read the Requirements document.
- Build using Maven. The build should be successful.
- Read the first specification in general.feature. Control-click on a line to find the steps definition, the glue code.
- Add scenarios for all requirements.
- Run the RunCucumberTest with coverage and see if you cover all code.
- Throw away the legacy implementation and rewrite it from scratch. All specifications should stay the same.
- Add scenarios for the new requirement, "Conjured".
- Implement the new requirement.
This kata is based on the GildedRose kata by Terry Hughes. See end of the Requirements document for more info.