Out-of-Process Testing of Any REST API

images/rest-out-of-process.png

In the previous section, we tested a REST API by running Cucumber in the same Ruby process as our application. In this section, we are going to explore how to test a REST API when Cucumber is running in a different process than the application. The figure illustrates how this fits together. Cucumber and the HTTP Client library run in one process, and the web application (the dotted boxes) runs in another. We’ll be using the same application that we created in the previous section, but you could just as well use an application written in a different programming language. This is thanks to a handy little library ...

Get The Cucumber Book, 2nd Edition 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.