aspose file tools*
The moose likes Testing and the fly likes Webapp testing toolkits Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Webapp testing toolkits" Watch "Webapp testing toolkits" New topic
Author

Webapp testing toolkits

Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Hi All,
I am looking for a testing tool/framework which can go beyond unit testing, and allows for more complex test scenarios than single request-response test. Any suggestions? Thanks.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Could you be more specific? Do you want to record web browser actions or GUI client actions, or do you want to navigate a web application programmatically? Something else?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Do you want to record web browser actions or GUI client actions, or do you want to navigate a web application programmatically? Something else?
Ideally I'd like to navigate a web application programmatically.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134

Dmitry,
HttpUnit/JWebUnit and Cactus both do that.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yep, I would've suggested HttpUnit and JWebUnit as well. There are others, too, listed in the extensions section of junit.org.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
And there is FitNesse: http://fitnesse.org/


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Thanks guys. I am going to play with HttpUnit first.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Hit the first bump: the HttpUnit blows at most pieces of JavaScript
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
134

Dmitry,
Make sure you have the rhino jar to. It handles some javascript.
Christian Hargraves
Ranch Hand

Joined: Jul 01, 2003
Posts: 42
Htmlunit (http://htmlunit.sf.net) is supposed to have some Javascript support.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Make sure you have the rhino jar to.
I have js.jar in my classpath instead, which is a patched build of rhino 1.5R4+ Is it worth to patch the source and build a newer version of this jar?
It handles some javascript.
Yourright, "some"...
"JavaScript support is very basic at present. The near-term goal is full JavaScript 1.1 support. Currently, we do not plan to support browser-specific JavaScript."
Source: http://httpunit.sourceforge.net/doc/javascript-support.html
...which means I need another tool. But anyway, after disabling scripting in HttpUnit and updating a few pages I was able to cover a big hunk of webapp's functionality. Writing test cases still...
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
There is a IEFixture for FitNesse, which directly controls Internet Explorer. I guess that way you could test a huge amount of your Javascript (at least for that platform...)
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Guys, thanks again. I think that HtmlUnit would be the next thing to try.
About FitNesse. I have read each of 99 words describing it, and still have no idea what is this thing about, and how could it be used to help me solving my problems. Doctor, am I crazy? Or just dumb?
But I'll try it anyway.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Dmitry Melnik:
About FitNesse. I have read each of 99 words describing it, and still have no idea what is this thing about, and how could it be used to help me solving my problems. Doctor, am I crazy? Or just dumb?

FitNesse is actually nut much more than a frontend for the Fit testing framework.
A Fit test constists of two parts: test data written in a html table, and glue code (called "fixtures") interpreting the data and using it to test the system.
IEFixture is a predefined fixture for testing web pages using Internet Explorer. In short, using it you can write scripts for IE to go to specific URLs, make assertions about page content, click on links, etc...
The following example uses Fitnesse's wiki syntax for tables instead of HTML:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Webapp testing toolkits
 
Similar Threads
Sunmicrosystem
Test - ignore
strings and string pool
new forum - testing
JSP Encoding