January 2014 Monthly Meeting Summary
The Cucumber Framework - Presentation by Craig Despeaux and Bryan Graham
Cucumber allows teams to describe, in plain English, how software should behave. It is extremely versatile and can be used to
automate anything from a web portal, to a command-line program, and beyond. The presentation will include a brief demo showing
how to automate the functionality on a web page from the ground up.
Presenter bios: Craig and Bryan are both QA engineers who have have been working with Cucumber for over a year, writing test
automation for Ruby on Rails web portals, REST APIs, as well as command-line programs.
Meeting took place on: Wed. January 15 2014 6:30 PM
Following are notes from the meeting:
- Cucumber was developed for web testing but can be used for REST API testing, command line testing, and in many other contexts.
- It has various output formats available for reports such as JSON, HTML, etc.
- It works best with Ruby due to the large number of Ruby gems available as enhancements to Cucumber, for example the
HTTParty gem to test API's
- Some tools/utilities useful with Cucumber are Capybara, Selenium
- The 'given/when/then' format is mainly for human readability ' the first word in statements ('Given' etc) actually
do not matterto running of tests - it is the statements following that are utlized
- The presenters found it effective to have all the 'steps' used to interact with an app/site in a
'step' directory such as ../step_definitions/*.rb
- If you run your feature tests before your steps are available, Cucumber will tell you what's 'pending'
- A feature file can be in the form of a table of data to drive tests
- Using a 'background' block tells your tests what to run before each scenario; for example it can be effective to write scenarios
then refactor to put similar items in a 'background' block.
- Tags can be used to designate globals or to designate particular scenarios
- For example a @wip tag means 'work in progress' and will not run
- Another example would be that the tags can be used to indicate which scenarios Cucmber should run or not run
- The presenters used phantom for headless browsewr test runs or webkit. There are workarounds
for when there are popups etc when running phantom
- Several books were recommended including 'The Cucumber Book' as a must-read; 'Cucumber Recipes' is a more advanced
- Presentation slide file/link will be forthcoming
NoVaTAIG Home Page
Copyright 2014 Northern Virginia Test Automation Interest Group
Test Automation Interest Group