wood burning stoves 2.0*
The moose likes Testing and the fly likes Web Acceptence Tests... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Web Acceptence Tests..." Watch "Web Acceptence Tests..." New topic
Author

Web Acceptence Tests...

Eric Nielsen
Ranch Hand

Joined: Dec 14, 2004
Posts: 194
So I've spent the past two days getting very frustrated with the various web testing tools. Perhaps someone here can help straighten me out...

I've spent about a 4 hours with each of Selenium, Fit, and JWebUnit.

I couldn't get Selenium to work reliably on a Mac. Selenium Remote Control appears to have major issues with Firefox 2, Safari 2, and Opera. The problems with FF2 appear to be tied to how the profile for FF gets loaded. It sounds like there's a fix in the snapshot of Selenium, but no released version. And there hasn't been a release in almost a year. (Releases happened previously every few months). Safari couldn't seem to get through the Selenium Proxy. Opera would launch, but never got a URL. Plus in the past I was never a big fan of Selenium since it seemed to test things at the wrong level (looking up form elements by id, rather than say by label, but that seems to be a common problem with web test tools)

I couldn't really figure out how FIT was supposed to work in a web environment. I was guessing that you'd need some fixture to define the common web tasks. I would have thought that a basic web fixture would have existed somewhere to use a starting point for building up more useful tests, but I couldn't find one anywhere. Any if I was going to code one myself, it seems like I would be re-implementing the browser emulator of a JWebUnit type tool.

Now JWebUnit was actually looking quite good, but it seems to be missing one or two really needed assertions. For instance, I'm trying to write a test to check that a user is redirected to a login page when a protected resource is requested. I can easily test if the given elements of the login form appear on the page, but I would also like to be able to assert that the browser was redirected/assert what the URL is. But it doesn't seem like there is any support in the tool for asserting the current URL or asserting that a redirect occured. While its not a big deal now, I can imagine other tests where it would be more important later on.

I looked briefly ay Canoo, but it doesn't seem to be very different from JWebUnit.

What have people found to be effective web acceptence test tools?
John Bartlett
Ranch Hand

Joined: Jan 25, 2006
Posts: 116
Hi,

I have used selinum a bit but never found it that reliable due to having to remake tests whenever the UI changed, so I have been doing alot of testing using HtmlUnit recently.

There is also HttpUnit, this allows you to capture the browser behaviour. so this should aid you in finding out page redirects.

Hope these links help.

John
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You could also try Watir or SafariWatir if you're into Ruby.

Did you report the problems you've faced with the respective projects' mailing lists or bug tracking tools?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Acceptence Tests...