• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Testing the code

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic