How to get a cucumber to perform the same actions against Selenium and a mute browser

I am making some web applications for testing with Cucumber, and currently I have a few steps set up to work with Culerity. This works well, but there are times when it would be nice to keep the same stories in Selenium.

I see two possible approaches that may work:

  • Writing each step so that it performs the step, respectively, depending on the value of some global variable.
  • Having separate files for determining steps and somehow selectively, including the correct one.

What is the preferred method for doing this?

+4
source share
4 answers

Third option: see if Culerity implements the Webrat API. The README file says: "Culerity allows you to (...) reuse existing Webrat-Style style definitions." However, it was not possible to find much more. Ideally, you can switch servers with a configuration parameter or command line argument without having to touch on step definitions.

Of course, this will work if you are not testing Javascript that supports Culerity, but Webrat does not.

+1
source

HI, did you look at Capybara? This will allow you to use many web drivers, and also allow you to test javascript related functions.

+1
source
0
source

You can schedule tests to run in Jenkins. Jenkins local computer software is open source. You can get the cucumber plugin in Jenkins so you can get the reporting part for your project in addition to a continuous test run

0
source

All Articles