Introduction
A BDD and English language way of describing system behaviour.
Its official website is http://cukes.info/
Syntax
The most basic cucumber scenario will look like this:
GIVEN – state or input of system
WHEN – action perform with the system
THEN – output of system
Tips to write a good Cucumber tests
- Keep it straightforward, short, precise, and to the point
- Make it maintainable (example: check that a text present rather the whole text content)
- Avoid repetition as this will slow down the CI build (try to reuse existing scenario)
- Start writing by listing out the scenarios before going into the details
- Avoid too many comments
- Write it from the business or perspective rather than technical perspective
Leave a Reply