This is fourth in a series of blog posts. Care to go back to the beginning?
Following along with Jeff "Cheezy" Morgan's eBook, "Cucumber and Cheese: A Tester's Workshop" (2017), after setting up a development environment, we started creating in Ruby + Watir the basic building blocks for an automated test framework, as we saw in the last Adventures in Automation blog entry.
Instead of going into great detail testing against the complex test site Jeff uses in Chapter 4: Cucumbers and Puppies of is book, with Sally's Puppy Adoption Agency, we are using the simpler test site, The-Internet https://the-internet.herokuapp.com/login, by Dave Haeffner.
This blog post will explore scaffolding a site and composing acceptance tests using Cucumber and Gherkin.
Scaffolding a Site Using TestGen
It's always a challenge for me when creating a new project to figure out where everything should go. What should the folder and file structure be? Luckily, Jeff Morgan created a Ruby gem called "testgen" which solves all of these problems.
- Change the directory to the src folder in your home directory: cd ~/src
- Pick a name for your project, such as "cheezy_internet"
- Install Jeff Morgan's Ruby gem testgen on your local machine: gem install testgen
- Use the Ruby gem testgen to create a new file hierarchy: testgen project cheezy_internet