views:

271

answers:

4

Hi,

I'm currently using selenium for testing our web app's interface. However, it isn't very reliable (it's hard to set a good waiting timeout, absolutely a nightmare to work with in any webpages involving frames) and lacks many features (popups/downloads).

I took a look at http://sikuli.csail.mit.edu/ and quite like it, but again, it isn't very reliable as in very often it fails to identify the correct buttons/links.

Anyone here on SO have a good approach they use for testing web apps ?

PS> I'm after the ones that would allow for testing even if the tester has ZERO knowledge about the internal of the codes (not even the method signatures).

+1  A: 

Maybe have a look at iMacros for Firefox, it works pretty well and can do a lot of crazy things (full AJAX support, Flash, Flex, Silverlight, Applets support, Web Page Dialogs support, etc). You'll find a (maybe biased) comparison with Selenium here.

Another option would be to use WebDriver (which will be merged with Selenium to create Selenium 2 as mentioned in another answer but, still, it uses a different approach). See Introducing WebDriver to read more about it (and how it differs).

But I'd give iMacros a try.

Pascal Thivent
+2  A: 

Unfortunately UI testing not very reliable in general. Having to use XPath because IDs aren't set on elements on the page. Having to use Frames (I hate Frames and glad its being deprecated in HTML5).

Its the nature of the beast unfortunately and a major issue I find with Selenium, which is my prefered UI testing tool for Browsers, is that people start on Selenium IDE which tries to record everything you do but can only do so much making tests unreliable.

Record/Replay tools should be called Record/Tweak/Replay so that it can handle tests correctly.

Writing your tests for Selenium RC or WebDriver (These are currently being merged to create Selenium 2) allows you to handle the issues that you may see in Selenium IDE. It makes you write tests using programming languages like Java,Python,C# and many more. Since you can add conditionals to your tests.

The way that I have got less technical people to use selenium is to create a DSL for them to use so that it is more natural language when writing tests.

AutomatedTester
I think that Selenium is basically leading edge of automated UI testing. If it's not good enough, there's not really much that's better.
John
I am not sure the WebDriver guys would see it as leading edge but once the 2 projects have been fully merged it will be the best tool out there by miles in my opinion
AutomatedTester
A: 

Disclaimer: I am the author of Sahi.

John, Have a look at Sahi. (http://sahi.co.in)

1) It does not need waits for AJAX or page loads

2) It does not use XPaths, using dom relations (_near, _in) instead.

3) It traverses frames/iframes automatically

4) The recorder works for frames/iframes/popup windows

5) It handles auto generated ids well

6) The recorder and playback works on almost all browsers and operating systems

7) It does not use special privileges to run tests

Over the last year, Sahi has had 7 public releases and the support is prompt on the forums.

Narayan Raman
A: 

Instead of using selenium.waitForPageToLoad("30000"); use like this

selenium.waitForPageToLoad(Timeout);

and don't forget to set the timeout using settimeout option

selenium.setTimeout(Timeout);

I too faced the same issues with the timeout. After setting the timeout, things worked well.

Rajasankar