aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes How you usually test your serverside applications? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How you usually test your serverside applications?" Watch "How you usually test your serverside applications?" New topic
Author

How you usually test your serverside applications?

Doshi Milan
Ranch Hand

Joined: May 29, 2001
Posts: 112
Dear friends,
How you usually test your serverside applications?I also mean Servlets , JSPs , besides EJBs.
Thanks and regards,
Milan Doshi
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
I read this book called Java Tools for Extreme Programming, and I heard that it covers just this topic.
Have you heard of it?
It was the number 1 software development book (under the category software development) for three month on Amazon.
I heard the author is a really nice guy too.

<giggle>
At eBlox we used Cactus to unit test out Local EJBs, Custom Tags, Servlets, JSP Support classes, Struts actions, etc.
Cactus a.k.a J2EEUnit

Cactus is a simple test framework for unit testing server-side java code (Servlets, EJBs, Tag Libs, Filters, ...).
The intent of Cactus is to lower the cost of writing tests for server-side code. It uses JUnit and extends it.
Cactus has been developed with the idea of automatic testing in mind and it provides a packaged and simple mechanism based on Ant to automate server-side testing.
Cactus implements an in-container strategy (click on the diagram below to understand how it works). An alternative but complementary approach not covered by Cactus is to use Mock Objects (see the Mock vs Container page to understand the differences and why Cactus believes in the usefulness of an in-container approach).

[ October 13, 2002: Message edited by: Rick Hightower ]

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Just to add to this, if you want more flexibility in the way that you test JSP custom tags (if you use them of course), then check out the TagUnit testing framework - an open source project that I started up. The key difference is that in Cactus you have to test custom tags by writing the Java code to mimic their lifecycle, whereas TagUnit tests the tags inside the JSP making the tests much easier to write.
Apart from that, a combination of Cactus + JUnit + JUnitEE + HttpUnit is a good (although not the only) route.
Cheers
Simon
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
Cool. I'll check it out. We have been using Cactus to test our tags.
Doshi Milan
Ranch Hand

Joined: May 29, 2001
Posts: 112
Thanks for the reply. Its a privilege to have recieved replies from two such emminent personalities.
I have started with Junit and once I am through , maybe cactus.
Reagrds,
Milan
 
Don't get me started about those stupid light bulbs.
 
subject: How you usually test your serverside applications?