Reputation:
Currently we're using Cucumber, Capybara, Celerity/Culerity w/jruby and I'm frustrated by the spurious failures on our Ajax and javascript heavy app. Not only that buy on our VM we end up having segmentation faults and memory issues after running the test suite about 5 times (we run it nightly and after every svn commit). I'd like to exorcise java from the loop if possible to at least narrow down the possible points of failure. Is there a good solution for these integration tests that doesn't end up going through jruby?
Or does anyone else have any other ideas about which way to go? I love cucumber as a tool but the whole setup for us has an awful signal to noise ratio and I end up managing test run output fairly often (every morning :p).
thanks
Upvotes: 1
Views: 895
Reputation: 1628
Presently (as we speak, really) I'm using rspec, capybara and capybara-webkit.
Installing and using capybara-webkit is very simple (just be sure to follow the instructions here: https://github.com/thoughtbot/capybara-webkit). I have found that inside a test I need to declare the need for javascript (:js => true).
describe "After a client user creates a ticket" do
it "the page should have a browse button for file upload", :js => true do
call_to_helper_method
page.has_button?('sparkly_button_name')
end
end
As easy as that!
Upvotes: 1
Reputation: 5192
Heavy-weight but quite bulletproof - selenium (see drivers section). Also you can take a look into a quite new and more lightweight and fast alternative - capybara-webkit
Upvotes: 1