简体   繁体   中英

Unobtrusive way testing JavaScript with Cucumber?

what do you prefer for testing JavaScript apps using Cucumber?

I never did it before - I only used Webrat for testing plain html.

I have tried Selenium, but it frustrated me and I didn't find any good documentation about Cucumber in combination with Selenium.

Best regards

Check out Capybara . It's a drop-in replacement for Webrat, but it lets you drive Firefox via Selenium for testing Javascript code (eg AJAX calls).

Around here we let webrat drive selenium for most of the operations. But it's still very fresh technology so be prepared to dig around in the code and debugger a bit.

Documentation:
https://github.com/cucumber/cucumber/wiki/Setting-up-Selenium

There are also resources on that wiki for various flavors of Watir.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM