This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How you usually test your serverside applications?

 
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool. I'll check it out. We have been using Cactus to test our tags.
 
Doshi Milan
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic