Selenium Test Scripts – To record or write?

June 22, 2008

So I’ve gotten the Selenium Core installed on a staging web server where we run development code.  Additionally, I have installed the Selenium IDE Firefox extension to record test scripts.  I have been recording a few test scripts on some very basic functionality of an application I have been working on, then uploaded the test suite to a testing directory within my application directory structure.  Then it’s time to run the Selenium TestRunner and access my test suite.  For some reason, I get small failures that while not indicative of a problem with my code, but rather idiosyncracies with Selenium or my JavaScript deficiencies.  I’m getting very minor errors about elements not being found which I’m fairly sure is due to me not being in the habit of assigning an id attribute to everything especially form elements, so that Selenium can find them.  I’m also wondering if it is better to manually write test scripts for Selenium, which sounds too time consuming, or is it OK to just use the Firefox extension to record them.  I’ll do a bit more digging to see what I can find.  Selenium is available at http://openqa.org.

Entry Filed under: Web Application Development. Tags: , , , .

1 Comment Add your own

  • 1. Jason Huggins  |  June 23, 2008 at 4:27 pm

    Hi, Kenneth.
    Glad you’re finding Selenium useful (despite its idiosyncrasies). Unfortunately, there is no free lunch in software testing. Putting in a little bit more work to make your app more testable (like inserting those id tags that you mentioned), and not always relying on what Selenium IDE produces in its recorded script will make your tests less brittle.

    Cheers,
    Jason “Mr. Selenium” Huggins

    Reply

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


 

June 2008
M T W T F S S
« May   Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories

Tags

Adobe ANT basketball CFC CFEclipse CFMX CF Template CFUnit CFUnited code code generation ColdFusion component conference deployment developer Eclipse Emancipation family Firefox freelance fusebox introduction juneteenth Marc Esher method mylyn networking Olympics Peter Bell programming Selenium IDE slavery software quality assurance Sotftware testing sports Team USA TeraTech test testing unit testing user community web Web Application Development web development

Blogroll

ColdFusion

open source