jMock is a library for testing Java code using mock objects1.
Mock objects help you design and test the interactions between the objects in your programs.
The jMock package:
* makes it quick and easy to define mock objects, so you don't break the rhythm of programming. * lets you define flexible constraints over object interactions, reducing the brittleness of your tests. * is easy to extend.
You can create mock objects that behave like a database connection, and test against them. As a result, you can test your code, but not really have a database connection. JMock is great.
I'm not sure how you mock out a Servlet though.
Give it a try!
Joined: Dec 20, 2005
Thansk Cameron W. McKenzie
What i mean testing the code .. is not the junit or someotherthing else ...
Actually what i need is i want to run my servlet code and jdbc code with out installing server amd databases in my local machine ...
Any webiste which will run our code display result...