Chapter 15Working with a REST Web Service

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

Your application doesn’t have to be written in Java (or any other JVM language) in order to be developed using Cucumber. Applications written in Ruby, .NET, PHP, or any other programming language can be tested by starting your application before Cucumber runs and then having Cucumber talk to it using an HTTP client library.

We’ll be dealing with a very simple REST API for ...

Get The Cucumber for Java Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.