So I'm a little bit confused at getting started at writing my own Automated test scripts.

For reference the majority of my company's apps are Ruby on Rails technology, I looked into using Cucumber, but I think that's a down the road thing I want to get used to writing the actual test scripts first.

So I've been looking at using Capybara and Selenium to do the web automation, but most of Capybara's docs are about interacting with normal web page elements. Most of our stuff is in 'Ruby on Rails' but does that matter?

When I actually write the test scripts are they actually the RSpec scripts required for testing? That's where I'm getting confused. Just as a base test I want to go to a site and click a dropdown (just to make sure I have everything set up correctly). But I'm not sure if I should be looking at Capybara docs or RSpec docs or what?

and does it matter if the web application is a RoR app or a normal HTML/CSS/JS app if I'm going to use Capybara(W/Selenium driver) or what?

I guess im trying to figure out the exact process of what needs to be done to start automation testing a RoR app using capybara.

1 Answer 1


For web/UI application testing, what's behind the scenes typically should not matter. For instance, just because your app is running on RoR, your web/UI tests don't have to be written in Ruby. After all, you're testing the application generated web interface, not the code (that's a different type/scope of testing).

If you want to just get down to brass tacks and start building tests for your web application, check out the following:

  • Selenium IDE, a Firefox plugin for Selenium. If you're not familiar with Selenium already, there's a learning curve; however, there is a big community behind it.
  • PhantomJS, headless WebKit browser where you can script tests, navigating/manipulating the DOM, support for CSS selectors, JSON and more. If you know JavaScript/Node well, this is a great tool.
  • Ghost Inspector, a SaaS based testing tool for web applications. Use the Chrome plug-in recorder to navigate your application and it will automatically create a UI test for you. It also takes snapshots and creates a video of the testing session. It's kind of Phantom/Casper/Selenium wrapped into an easy to use testing app.
  • 2
    This is true, but I'd still recommend you build your web automation in the same language that the website is running on (in case you need to hook in to the back end of the web site for some of your tests).
    – GKS1
    Sep 30, 2015 at 18:01
  • 1
    Since the OP mentioned wanting to write the actual test scripts first, I would caution against extended use of Selenium IDE. It's useful as a quick start to get into Selenium, but it has the same drawbacks that all record and playback tools do.
    – EGHM
    Sep 30, 2015 at 18:54
  • So, chronologically I would start with the high level tools first. Learn by addressing some of the testing requirements with those tools so that you don't get lost in the weeds. Then if required, work your way down into the frameworks' guts, and code/DSLs/APIs -- especially if you need finer controls or functions that are tied to backend functions. Sep 30, 2015 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.