File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing the code

 
madhav changala
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

i would like to know is there any enviornment or site.. for testing our servlet code and jdbc coding without installing any servers and databases..

If you know please send me the URL and instructions how to test the code.

thanks and regards

Madhav
madhav.cns@gmail.com

SCJCP1.4
SCWCD (preparing)
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Testing a database without a database, or testing a Servlet without a server seems like it would be impossible....or would it?

I think what you want is JMock at www.jmock.org

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!

-Cameron McKenzie
 
madhav changala
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...

thanks and regards
Madhav
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic