Skip to Main Content
Cucumber Recipes
book

Cucumber Recipes

by Ian Dees, Matt Wynne, Aslak Hellesoy
February 2013
Intermediate to advanced content levelIntermediate to advanced
272 pages
5h 45m
English
Pragmatic Bookshelf
Content preview from Cucumber Recipes
Recipe 12Test Through Multiple Interfaces Using Worlds

Problem

Your application has multiple public-facing interfaces, such as a graphical user interface (GUI) and an application programming interface (API). You’d like to test your code through both interfaces using the same set of Cucumber features.

Ingredients

  • Multiple implementations of the World,[81] an object that Cucumber creates and passes into each test

  • Selenium WebDriver[82] for testing a web app through the browser

  • HTTParty[83] for testing an HTTP API

  • The Sinatra web framework[84] to implement the example app

Solution

Many applications support more than one interface for controlling the underlying business logic. Your app might have a desktop GUI, a web interface, a REST API, some custom ...

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.
Start your free trial

You might also like

Cucumber Cookbook

Cucumber Cookbook

Shankar Garg
Basiswissen Softwaretest , 6th Edition

Basiswissen Softwaretest , 6th Edition

Andreas Spillner, Tilo Linz
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths

Publisher Resources

ISBN: 9781941222607Errata