0

I am leading a team which develops application based on Ruby on Rails. Since the application was small, automated testing was not given much importance. But lately it has started growing in size. I am seriously thinking of enforcing the testing discipline in the team.

For all the new code that is being committed, I want my developers to do a 100% code coverage. But the problem is that they are resistant to write tests for UI related changes. I read online that Selenium is one of the solutions for UI testing.

Can anyone share me a link to blog or tutorial which teaches me how to set up Selenium or some other automated UI testing for Rails. The version I use is 2.3.8.

1 Answer 1

3

Checkout the two mainstream Acceptance testing frameworks:

Best place to start (in my opinion): Railscasts. Try the beginning with cucumber railscast.

Your "code" will end up looking like

Feature: pay bill on-line
  In order to reduce the time I spend paying bills
  As a bank customer with a checking account
  I want to pay my bills on-line

  Scenario: pay a bill
    Given checking account with $50
    And a payee named Acme
    And an Acme bill for $37
    When I pay the Acme bill
    Then I should have $13 remaining in my checking account
    And the payment of $37 to Acme should be listed in Recent Payments

Code found on http://iain.nl/2011/01/cucumber-vs-steak/

Sign up to request clarification or add additional context in comments.

1 Comment

Following up on Jesse's answer, we user Cucumber with selenium and are pretty happy with it.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.