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

What We Just Learned

When testing a REST web service with Cucumber, it’s generally preferable to run Cucumber in-process—in the same process as your application. In this chapter, we covered the two main approaches—in-process and out-of-process. Although our example used the Sinatra web framework, the techniques used in this chapter can be applied to other web frameworks too.

  • Rack-based applications such as Ruby on Rails and Sinatra can be tested in-process using Rack-Test, bypassing HTTP, making them fast.

  • Non-Rack-based applications run in a separate process from Cucumber and have to be started before Cucumber runs.

  • You can use indented JSON documents in your scenarios, as long as you ignore whitespace when you compare them to documents ...

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