cucumber

Is cucumber suitable for non-web project?

I want to develop a network system. It is not based on rails and has no html UI. Do I have to do BDD in this case? Does using Cucumber make sense? ...

Rails, Cucumber: external redirection to another domain

I have cucumber feature ... Given I am on my domain page When I press "send data to external domain" Then I should be on the externel domain page ... In production and development enviroments "My domain page" (www.example.com/mydomainpage) redirects user to "external domain page" (www.externaldomain.com/page). But in test enviroment c...

Behavior Driven Development using existing software components

I'm currently reading through the beta version of The Rspec Book: http://www.pragprog.com/titles/achbd/the-rspec-book It describes The Behaviour Driven Development Cycle (red, green, refactor) as taking small steps during the development process. This means adding features one at a time. My question is: If I were to describe a single...

Used Background for some Scenario

Feature: list video in stored Background: Given I have the following videos | title | format | | Running Central Park in the Fall | BluRay | | Running Glacier Park in the Spring | Download | | Running Balboa Park in the Winter | DVD | ...

click_link image in cucumber

<a href="/videos/21-running"> <img height="120" src="/images/sample-image.jpg" alt="Running"> </a> Please support me a way click link in cucumber by alt or src. Thanks. ...

capybara/selenium woe

Hi there, I'm attempting to set up a js cucumber environment in a rails3 app with capybara on osx10.6. I've tried using culerity with rvm jruby and rvm 1.8.7 and 1.9.2 but got various errors: `initialize': Valid types are [:development, :runtime], not nil Having read that this is potentially something to do with RUBYOPT and bundler I ...

Capybara+Selenium not finding FB-Connect link/button

I have the following snippet in my html displaying a FB-Connect link: <fb:login-button id="mylogin" onlogin="try { window.location.href = "http://localhost:3000/"; } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('window.location.href = \"http://localhost:3000/\";'); throw e }"></fb:login-button> That works fine when manual...

How do you say "Then I should see [Home, About, Contact] within "#sidebar"" in Cucumber?

What is the preferred way to match multiple nodes in cucumber, like checking if links exist? Without having to write the same statement over and over again. I'm just doing this: Then /^(?:|I )should see "\[([^"\]]*)\]"(?: within "([^"]*)")?$/ do |array, selector| with_scope(selector) do array.split(/,\s+/).each do |text| i...

Do you do this in every step definition ? "Given that I am logged in"

I am new to cucumber. And for most of the site's functionality, you have to be logged in. So when writing cucumber, do you write, given that I am logged in for every step definition? ...

Intergration tests for fullCalendar

Hello, I love fullCalendar. Its an awesome plugin. However one thing that I have found hard is testing. I am using rails, cucumber, capybera and selenium. I spent a good part of yesterday using the selenium IDE and could not for the life of me get selenium to simulate a click on fullcalendar's interface. I was wondering if anyone else h...

rake spec cucumber complains about "no such file to load - ZenTest" despite ZenTest being installed

Hello! /home/soroush/.gem/ruby/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement no such file to load -- ZenTest /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/loca...

Cucumber: How to write snippets/step definitions in PHP?

I am trying to get Cucumber working to test a PHP application. So far I am able to get the feature to run by simplying running cucumber in my features directory. At the bottom of the results, it says: If you want snippets in a different programming language, just make sure a file with the appropriate file extension exists where cuc...

How can i unit test a "Delete link" with Ror, cucumber - webrat ?

Hello, I am currently developing a Rails application, I'm trying to units test it. I chose Cucumber + WebRater. I'd like to test in my backend all delete link. I tried to go to visit a second argument (the method: delete) without success. (something like : visit my_path, method => :delete) On my pages I delete some links so the soluti...

[Rails] I18n doesn't translate in models through cucumber

Hello, My cucumber scenario tests if my news can be create without a title. This must show "You must specify a title.". In my news model, I have: validates_presence_of :title, :message => I18n.t(:specify, :what => 'a title') and in my en.yml have got : specify: "You must specify %{what}." but when I run my test, the result is "...

Cucumber Step Definition Regex Exclude Help

I need some help with a regular expression in a Cucumber step definition file. Many of my steps are of the type: Given I am on the search page I use this general pattern for most of my step definitions, and use the default Webrat regex to pick it up that looks like this: Given /^(?:|I )am on (.+)$/ do |page_name| visit path_to(p...

How to divide feature and scenario in Cucumber ?

I need to manage some uses in system, so user management is a feature , and add/delete user is a Scenario? I want to know one principle to design them, thanks ...

Automation testing tools for Oracle Forms app?

I'm looking for toolset recommendations to automate testing of an Oracle Forms application, with the tests (ideally) to be driven from Cucumber. I believe this is normal/unavoidable in apps based on Oracle Forms, but I'll spell it out anyway; the way the application works from an end-user perspective is: User connects via a browser, b...

Stress-testing using Cucumber

I'm currently writing integration tests for a RoR REST API using cucumber. I'd also like to stress-test the API and was wondering how I might be able to re-use my cucumber scenarios to do this. I've used JMeter and httperf before for stress-tests, and of course with both tools had to write or record the tests that I wanted to include...

Using cucumber with staging database without truncation and transactions

We have a Ruby on Rails 2.3.8 project, where data are almost exclusively read only. We would like to write acceptance tests which use staging database (copy of the production database) So we do not want to use transactions or truncation of the database tables before or after features and scenarios. Is it possible? ...

How to mock an TCP connecting in Cucumber

I want to test one program which can capture and send IP packets to some clients, so how to mock request or client in Cucumber? thanks ...