February 2013
Intermediate to advanced
272 pages
5h 45m
English
| Recipe 12 | Test Through Multiple Interfaces Using Worlds |
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.
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
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 ...