cucumber

Testing RESTful API with Cucumber in a front end less application.

Hi I do not have any front end in my app. I am willing to release just a RESTful API which can be used by different clients. Any pointers how should I proceed towards testing it with cucumber? Every action in the controller generates XML feed only. Any pointers or suggestions? ...

Solutions for tracking cucumber features and scenarios?

I am looking for good solutions for tracking and organizing cucumber features and scenarios. I need something that can be remotely accessible for customers and developers. Something hosted would be preferable. ...

Regular expressions in cucumber steps

Cucumber generates out some neat webrat regex steps. I encountered a problem when I tried the this. In feature: And I fill in "Telephone (Home)" with "61234567" In webrat steps: When /^I fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value| fill_in(field, :with => value) end The error encountered: Could not find field: "Telep...

Testing SWFUpload with Cucumber

Hi all, In a project, I recently replaced a simple form-based file upload with SWFUpload. When SWFUpload returns a success, I generate a form to add tags to the uploaded asset. I'd like to be able to test inputting data into the tags textbox, but to do that I (think I) need to fake out SWFUpload. Has anyone done this in the past? I ...

Ngourd C# BDD Cucumber

http://code.google.com/p/ngourd/downloads/list above is the link for NGourd, a C# BDD testing framework. Question is How do i download this? I don't see any link for downloading. I see that under the "Wiki" tab there is a "QuickStart" link and no other link to download. thanks for you help. Please supply with a link in your answer so i ...

File uploads using the selenium-client gem

I am using the selenium-client gem with Webrat and Cucumber to test a rails project. I have Cucumber set up pretty much as described here: http://wiki.github.com/aslakhellesoy/cucumber/setting-up-selenium My problem is that Selenium is prevented from performing file uploads. Ideally I'd like to be able to replicate webrat's 'attach_file...

Cucumber + testing JS alert

Hi, I'm trying to test a JS confirmation dialog with Cucumber on Rails. I have a window.onbeforeunload event handler that will prompt you with a confirmation dialog if you try to navigate away from the page but I have no idea how to test it, anyone have an idea on how this can be done? ...

cucumber + selenium + rcov = ?

Is it possible to measure coverage using selenium-driven features? ...

Profiling a cucumber test (ruby/rails)

Profiler/profiling related issue with Cucumber testing. One of our cucumber tests run fairly slow. In stead of guessing on where our application is spending time, I'd like to know programatically. How do I trigger a cucumber test with a profiler??? What did not work: $ URL=/projects/by/114951412 #URL to slow rails page $ script/...

Rails Rendering: Intermittent Resource not found (ActionView::TemplateError)

Hi all, I could use some help figuring out what's going on. Check the log output below -- why would rails treat the two renders differently? Why does one succeed, without any related SQL calls and the second fail -- with an SQL access. (It's not an ActiveRecord model, no SQL should be involved in this render.) Background I have a cu...

Cucumber and/or Webrat hates  ?

I have a cucumber step that recently started failing when an   was added to my layout. If I take the   out, my tests all pass. When I put it back in, every test that uses the click_link method supplied by WebRat fails with the following message: And he follows 'Unsubscribe' incompatible encoding regexp match (UTF-8 regexp ...

Session variables with Cucumber Stories

I am working on some Cucumber stories for a 'sign up' application which has a number of steps. Rather then writing a Huuuuuuuge story to cover all the steps at once, which would be bad, I'd rather work through each action in the controller like a regular user. My problem here is that I am storing the account ID which is created in the f...

Cucumber: rails dynamic find not working in paths.rb

I am working on rails with rspec, rspec-rails, cucumber and webrat. I am trying to learn BDD and testing in general. I have a cucumber scenario like this: Scenario: Questions List Given quiz titled "Pearl Jam" has questions named "Corduroy, Dissident" When I go to the experiment page for quiz titled "Pearl Jam" Then I shou...

Make cucumber run migrations instead of schema load

So I have some data loading in migrations, for instance a default user is created when the users table is made, and certain user Roles are created (like foo_admin) are created when the foos table is made. The problem is cucumber doesn't like this, since it does a schema load. Can I either make cucumber just run the migrations instead, ...

cucumber + webrat: checking text appearing twice

I am working on a rails app to self teach BDD and testing in general. Using cucumber + webrat + rspec, after railcasts video tuts. In this app a quiz has_many questions. The view I am testing should render the question twice and non contiguously. (not testing contiguity here) I have a cucumber scenario aimed at checking this Given quiz...

autospec with cucumber in rails app

I have cucumber features working fine and rspec spec working fine i can run both cucumber features and spec spec and they all work but now im looking at getting autospec to run but running does the produces the following Warning: $KCODE is NONE. /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.3.90/lib/cucumber/step_definition.rb:100: warni...

What is the best way to test authlogic-open-id with cucumber and webrat?

I've been having trouble using cucumber and webrat to test authlogic-openid authentication in a rails app. Following Ryan Bates's excellent screencast I was able to install authlogic with the open-id plugin. OpenID works when I login using the browser but so far I've been unable to test the app using cucumber and webrat. I've tried usin...

Extending cucumber with modules and accessing Before/After hooks

I am trying to write a generic module to extend the World class. I need to access the Before and After hooks from within the module. I am doing this by using the extended method but Before/After does not seem to be available at this point. module MyWorld def MyWorld.extended(obj) obj.Before do # this doesn't work end e...

How does one use Tim Pope's cucumber.vim plugin for vim?

I've loaded the cucumber.vim files into ftplugin and the other directories per instructions, but I don't understand the ftplugin syntax enough to figure out how to get the full benefits. From what I can tell, the plugin is supposed to be able to jump between step definitions and feature files, but I can't figure out what's wrong with my...

Cucumber & test data management for non-Ruby apps

I'm testing an app that's basically a message-handling application - a message comes in, it's content is analysed, then it's sent somewhere else for processing. The app isn't built in Ruby. As you might imagine, the main testing approah consists of generating a whole bunch of different types of (quite complex) messages, loading them in...