tags:

views:

239

answers:

2

I've been doing some work testing web applications with Cucumber and I currently have a number of steps set up to run with Culerity. This works well, but there are times when it would be nice to run the exact same stories in Selenium.

I see two possible approaches that may work:

  1. Writing each step so that it performs the step appropriately depending on the value of some global variable.
  2. Having separate step definition files and somehow selectively including the correct one.

What is the preferred method for accomplishing this?

A: 

Third option: See if Culerity implements the Webrat API. Its README file says: "Culerity lets you (...) reuse existing Webrat-Style step definitions". Couldn't find much more than that though. Ideally, you would be able to switch backends with a config option or command-line argument without having to touch the step definitions.

Of course this would only work if you're not testing Javascript, which Culerity supports, but Webrat doesn't.

obvio171
A: 

HI, have you looked at Capybara? It will allow you to use a variety of web drivers, and will allow you to test javascript-related features as well.