• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Himai Minh

Cucumber With and Without Rails

Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Matt/Aslak:

As I understand it, there are a few gems that make using Cucumber with Rails trivial. But what about situations in which Rails isn't used? Further, I'm especially interested in testing Rails and non-rails RESTful web services and heavily AJAX dependant UIs. Can you elaborate on how Cucumber can help in this regard?
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dan,

Cucumber is really just the glue that binds your business-readable specifications to the code in the step definitions that run those specifications. What you put in those step definitions is up to you, and depends on the kind of app you're testing. Cucumber grew up in and around the Rails community, but it's widely used outside of Rails.

We tried to keep the book largely Rails-free. The main worked example doesn't use Rails at all. We've also got a chapter on testing REST APIs (which could be in any language) using the HttParty ruby library to automate the REST API via HTTP, which I think you'd find useful. The best Ruby library for automating web apps is Capybara, and although the chapter on Capybara does use a Rails app as the example, we clearly show how to use it for other kinds of web servers too.

Does that help?
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic