There is a tool called Selenium that allows you to record a series of clicks around your website, and then play it back to simulate a user session. It only works on localhost and in Firefox (it's a FF extension), but it's quite useful in that environment.

http://selenium-ide.openqa.org/

-- Josh


----- Original Message ----- From: "Ariel Flesler" <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Monday, March 31, 2008 12:54 PM
Subject: [jQuery] Re: How can I test my javascript?



Flexible selectors should be the main solution. Specially the use of
ids, they are fast, and don't depend on dom hierarchy.
You can also intercept a key function in jquery, probably $.fn.find.

(function( $ ){

var find = $.find;
$.find = function( selector ){
   var elems = find( selector );
   if( elems.length == 0 )
      alert( selector + ' yielded no matches' ); //or console.log or
any other warning.
  return elems;
};

})( jQuery );

I don't advice this for production, it adds some overhead and may bug
a visitor. Could be useful for debugging.

--
Ariel Flesler
http://flesler.blogspot.com

On 31 mar, 13:54, Matt Wilson <[EMAIL PROTECTED]> wrote:
jQuery selectors are fantastic, but any time I change the layout of my
site, I need to manually go through each page and make sure everything
works.

Are they any automated testing tools that I can use? Manual
regression tests are killing my productivity.

Reply via email to