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:
List of testing DSLs and frameworks:
All rails applications benefit from a good coverage of unit and functional tests, whether you use rspec or shoulda etc, is mostly a matter of personal preference. I'm a fan of shoulda
mostly for the context blocks it provides, making setting up test scenarios much easier and clearer to understand.
I don't think browser simulators/automators are needed unless your application is quite javascript heavy. I'd recommend only using them to test javascript, and for that purpose it's definitely better to go with driving a real browser than to simulate. The app I'm working on now is quite javascript heavy and we're using cucumber
along with watir
/firewatir
to run our cucumber tests in firefox for the javascript driven functions on our site.
I have used a bunch of things during my Rails career over the last few years.
Currently working on a pretty large Rails app on JRuby with very solid test coverage and our stack looks like the following.
Unit Testing:
Functional Testing:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With