cucumber

How to use multiline strings in Cucumber's tabular data sets?

Hi, I am building a cucumber feature that looks like this: Feature: Parsing of license files As a developer I want to know which requirements, prohibitions and permissions a license gives me So I can know my rights and duties. Scenario: Analyzing a known license Given I run local executable "licc" with arguments "gpl...

Cucumber: pipe output without losing color

I'm using cucumber to run some tests. It colorizes its output using ANSI escapes. This is great, but currently its producing more output than I care about, and shoving things I do care about off the screen. There doesn't seem to be a way to eliminate the other lines from within cucumber, but I can pipe the output through grep to pare ...

Cuke4nuke: Is it missing the support for different languages?

I'm using the version 0.3.1 of Cuke4Nuke and I'm having problems defining my feature-files with an other language than English. Googling didn't bring any solutions, so my question is simple: Does Cuke4Nuke support defining the features in other languages than English? I've tried to use the examples from the GitHub's Cucumber repository....

Testing Rails+Webhooks with Cucumber

I'm trying to integrate my rails application with an external service. I'm using Cucumber to do integration testing and I'd don't want to mock out the external service at times. When I get webhooks from this service, they are routed to apache running my development environment. This would be easy to fix if I could figure out how to fi...

undefined method 'password_confirmation' for User: Testing Authlogic with Cucumber and Factory Girl

My tests work fine when I'm testing them individually, rake cucumber FEATURE = 'path/to/feature' but when I try to run rake cucumber They fail with the following error undefined method `password_confirmation=' for #<User:0x1069545f0> (NoMethodError) This comes up when I try to create a user using Factory.build(:user). I have ...

how can i write a cucumber test for validating presence of a div which gets populated using AJAX?

the scenario is such where on select of a value from drop-down a div (#participant-wrapper) is populated via an ajax call: And I select "Buddy Program" from "development_programs" Then I should see "Buddy Names" within "#participant-wrapper" I don't want to use sleep as i think it is not efficient and there should be a better way. ...

Options for full stack testing in Ruby on Rails

There are quite a number of options for Full-Stack testing of Rails applications. Some use real browsers, some are headless, some don't run javascript at all. Which tools do you use or recommend and why? List of browser simulators or automators: Rails built-in support for integration and functional tests (no JS) Webrat Webrat::selen...

How can I test a view of product detail information in Cucumber?

I have an application with a product detail page. On that page the user can see prices, descriptions, specifications, all pretty standard stuff. But I want to test this view in Cucumber. Right now I use factories to generate product identifiers and leave everything else blank. If I add defaults to the factories, then check for those sam...

Cucumber+Devise routing error

having trouble with testing devise sign up on Cucumber. After "Sign Up" click it shows uninitialized constant User::ArticlesController (ActionController::RoutingError) I suppose that's because right after Sign up, devise redirects logged user to Articles page and but it's not under namespace User. Because I test user it put everything u...

Mocks: Test for presence/absense of break/return in a block

I'm trying to write out some examples for a Proc that will be passed to a function as a block to be yield'd various values. I'd like to be able to specify that given some inputs, it will just return a value to the function given other values, it will break (or return) a value, skipping the rest of the function's execution. How can ...

How can I get click events to work when chaining elements in Watir?

I am attempting to set up some UI testing in Watir for our web application. I'm running into trouble getting the click events to propagate. We are using EXTJS to make tabs, which are spans in the resulting html. If I select a span like this it works: span1 = @browswer.span(:text=>"Tab Name") span1.click The trouble is when I have...

Cucumber + Spork = undefined method `visit' for #<Object:0x82fcc588> (NoMethodError) ???

I'm tearing my hair out here. When running Cucumber in Spork-compatible mode (--drb) the visit() method doesn't work. Simply trying the feature step: When I go to the home page calls web step: When /^(?:|I )go to (.+)$/ do |page_name| visit path_to(page_name) end Running "cucumber" on the command line produces the following err...

How do I run Cucumber steps concurrently in Ruby?

In our Cucumber steps, we would like to start a long running task in one step and check that the task is running and that it set up the UI for the task correctly, in another step. Checking the UI must be done while the first step is still running. Our Cucumber looks similar to this: Given I start my long running task And I navigate to...

How do I test DelayedJob with Cucumber?

We use DelayedJob to run some of our long running processes and would like to test with Cucumber/Webrat. Currently, we are calling Delayed::Job.work_off in a Ruby thread to get work done in the background, but are looking for a more robust solution What is the best approach for this? Thanks. ...

Accessing controller in Cucumber to test sign-in

First off - I know that this is generally horrible practice, because Cucumber is meant to only test outputs. I just want to do this for one veryveryvery specific case. I have an app that handles user authentication using a cookie set by another app I maintain. I'd like to write a very simple integration test for authentication: Given I...

Cucumber and Seed data

can we load seed data when start cucumber? Please support me a way. ...

How to test file upload to webservice in Cucumber-Rails

Hi Given I have a webservice which accepts file uploads. And I want to test it in Cucumber When I put the following code in Step Definition post '/webservice', 'picture[file]' => File.new(Rails.root.join(@path_to_file), 'rb') Then I should see the saved file Unfortunately, this is not the case. Any help would be greatly appreciate...

Using proxies with Cucumber tests?

I have some Cucumber integration tests for a gem (not a Rails app). Some of them connect to a third party which operates a web service running on port 12345 which I'll call Banana. The service whitelists certain IPs that it allows connections from, one of which is Coconut. My box, Domino, is allowed to access Coconut via ssh. [restricte...

Multiple-Word Model in a Cucumber / Pickle statement

I can't find any examples of how to use models that contain multiple words in a Pickle / Cucumber statement. Here is the statement: Given a visitor_activity_type exists with name:"ContactForm" I've tried with spaces, no spaces, underscores, and camel casing. But nothing seems to work. Of course, maybe I'm doing something else wrong. C...

rspec user story feature vs cucumber

Just to be up front, although the title appears to be similar to the thread http://stackoverflow.com/questions/393622/rspec-vs-cucumber-rspec-stories, however my question is fundamentally different. I understand the difference between testing user stories and testing behavior of objects individually. My question is, why is Cucumber usua...