Ruby-on-Rails
  Home arrow Ruby-on-Rails arrow Recording Acceptance Tests
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
RUBY-ON-RAILS

Recording Acceptance Tests
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2010-07-30

    Table of Contents:
  • Recording Acceptance Tests
  • Recording the View Forum Acceptance Test
  • Recording the Post to Forum Acceptance Test
  • Recording the Show Post Acceptance Test
  • Recording the Reply to Post Acceptance Test

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Recording Acceptance Tests


    (Page 1 of 5 )

    In this conclusion to a three-part article series on acceptance testing with Ruby on Rails, you'll learn how to use the Selenium IDE and how (and why) to record the results of your acceptance tests. This article is excerpted from chapter 11 of the book Practical Rails Projects, written by Eldon Alameda (Apress; ISBN: 1590597818).

    Using the Selenium IDE

    Selenium IDE allows you to record your tests directly in the browser. You simply click the record button and perform the actions in your browser. Selenium IDE also allows you to run and debug tests. These features are all made possible by the inclusion of Selenium Core in the extension. On top of this, Selenium IDE provides you with features like autocompleting commands and saving recorded tests as HTML, Ruby, or other any other user-defined format.

    The Selenium IDE project is hosted, like Selenium itself, at www.openqa.com. Install Selenium IDE by going to http://www.openqa.org/selenium-ide/ and accessing the Selenium IDE Downloads page, as shown in Figure 11-2.


    Figure 11-2.  The Selenium IDE Downloads page

    Firefox requires that you allow www.openqa.org to install extensions on your machine. So, your first step is to click the Edit Options button at the top left of the Selenium IDE Downloads page (see Figure 11-2) and add www.openqa.org to the list of privileged sites.

    Next, click the Download link again. This time, you should see the dialog box shown in Figure 11-3. To continue with the installation, click the Install button.

    After restarting Firefox, you can open Selenium IDE by selecting Tools -> Selenium IDE from the browser menu bar. You should now see the Selenium IDE window, as shown in Figure 11-4.


    Figure 11-3.  Installing the Selenium IDE extension


    Figure 11-4.  The Selenium IDE window

    The Selenium IDE window has two tabs:

    1. The Table tab is where the recorded commands are shown. Right-click a row to see a context-sensitive pop-up menu that allows you to insert new commands, delete existing commands, and perform other actions. 
       
    2. The Source tab is where the actual source for the acceptance test is shown. You can either copy and paste the code or use the File -> Save Test menu item to save the test to a file. You can switch between different supported output formats by selecting the appropriate option from the Options -> Format menu.

    More Ruby-on-Rails Articles
    More By Apress Publishing


     

    RUBY-ON-RAILS ARTICLES

    - Application Deployment with Capistrano
    - Deploying an Application to the Server
    - Secure Application Deployment with Ruby on R...
    - Installing the Database for Application Depl...
    - Application Deployment
    - Recording Acceptance Tests
    - Commands for Acceptance Testing
    - Acceptance Testing
    - Checkout and Order Processing: the User Side
    - Checkout and Order Processing: the Administr...
    - Online Order Processing: Using PayPal
    - Order and Payment Handling for an Ecommerce ...
    - Checkout and Order Processing for an Ecommer...
    - Getting Text and Currency Working for Multip...
    - Translating a Site for Multiple Language Sup...





     


     


    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek