Home arrow Ruby-on-Rails arrow Page 3 - Acceptance Testing
RUBY-ON-RAILS

Acceptance Testing


If you've built a complicated application and you want to make sure it works, you perform acceptance testing. This three-part article series will show you how to automate the process. It is excerpted from chapter 11 of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
July 23, 2010
TABLE OF CONTENTS:
  1. · Acceptance Testing
  2. · Installing Selenium
  3. · Writing Selenium Tests
  4. · Action Commands

print this article
SEARCH DEVARTICLES

Acceptance Testing - Writing Selenium Tests
(Page 3 of 4 )

We'll take a quick look at the Selenium commands and various formats that you can write tests in. After this we'll write an acceptance test for the View Forum user story.

Selenium Commands

Selenium tests have the following basic structure:

|command|target|value|

The items work as follows:

  1. command tells Selenium what to do. For example, you may want to access a page, click a link, and verify that the title of the page is correct. These commands can be classified into the three groups: actions, assertions, and accessors, as described in the following sections. 
     
  2. target tells Selenium on which element to perform the action; for example, you can specify a link or button. The target of an action can be specified with an element locator, which we'll explain after describing the command types. 
     
  3. value is a parameter to the command that tells Selenium, for example, what it should type in a text field.

Tip  The Selenium homepage (http://www.openqa.org/selenium-core/) provides a complete reference to all Selenium commands.



blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Ruby-on-Rails Faces Second Security Flaw in ...
- Ruby 2.0 Prepped for February 2013 Release
- Why LinkedIn Switched from Ruby on Rails
- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials