O'Reilly logo

The Cucumber Book, 2nd Edition by Steve Tooke, Aslak Hellesoy, Matt Wynne

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12Testing a REST Web Service

Sometimes the user of the system we need to test isn’t a human being but another computer program. For systems like these, the user interface is often a REST[54] web service. To automate tests against it, we need to make our Cucumber step definitions talk to the web service as if they were a regular client application.

There are two main approaches for testing a web application with Cucumber—in-process and out-of-process. The following figure gives a high-level overview of these two approaches.

images/rest-stack.png

The best approach is usually in-process, meaning that Cucumber is running in the same Ruby process as your own ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required