Installation
Cucumber-Chef is distributed as a Ruby gem. It depends on Chef and shares many of the same dependencies as Chef, so it make sense to install this as part of the Chef gemset you created in Chapter 3. Installation should be as simple as:
$ rvm gemset use 1.9.2@chef $ gem install cucumber-chef
Cucumber-Chef consists of two portions: a command line tool for managing your test environment and tests, and a library of code for automating the provisioning, management, and testing of containers. We’ll explore the code library in detail in the next chapter, and cover the command-line tool in this one.
At its heart, cucumber-chef is a
Thor script.[21] Thor is a tool for building self-documenting command line
utilities, which handles command line parsing and has a rake-like approach
of having various tasks that can be run. To list the tasks, run
cucumber-chef by itself:
$ cucumber-chef
Tasks:
cucumber-chef displayconfig # Display the current config from knife.rb
cucumber-chef info # Display information about the
current test lab
cucumber-chef connect # Connect to a container on the test lab
cucumber-chef help [TASK] # Describe available tasks or
one specific task
cucumber-chef project <project name> # Create a project template for testing an
infrastructure
cucumber-chef setup # Set up a cucumber-chef test lab in
Amazon EC2
cucumber-chef test # Run a cucumber-chef test suite from a
workstation.
cucumber-chef upload # Upload a cucumber-chef test suite from a
workstation.Let’s quickly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access