*
The moose likes Servlets and the fly likes Simulate real servlet container in unit test Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Simulate real servlet container in unit test

Sky Loi
Ranch Hand

Joined: Oct 06, 2008
Posts: 65
Hi, java experts,

I have to make unit test of servlet which acted as the same as in real container. The requirements are:
1. Setup a test servlet container working as real one (e.g. Jboss).
2. Make multithreaded unit test servlet calls to this test container.
3. Anyway, simulate everything as the real ones.

It would be appreciated if you could share your idea. Thank you.
[ October 06, 2008: Message edited by: Sky Loi ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

"lucky bb", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sky Loi
Ranch Hand

Joined: Oct 06, 2008
Posts: 65
Sorry, done.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30361
    
150

Sky,
I don't understand. If you want a real container, why not use the real container? If you don't want a real container, you could use mock objects and not have any container.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30361
    
150

Please don't post the same question in multiple forums - it dilutes discussion and replies. I'll close this copy for you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simulate real servlet container in unit test