This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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: 63349
    
  70

"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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32633
    
215

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32633
    
215

Please don't post the same question in multiple forums - it dilutes discussion and replies. I'll close this copy for you.
 
Consider Paul's rocket mass heater.
 
subject: Simulate real servlet container in unit test
 
It's not a secret anymore!