There are apparently four frameworks available for unit testing servlets: * ServletUnit in HttpUnit * ServletUnit (same as above?) * Servlet test harness ***http://www.iac.net/~crawford/programming/testharness.zip ( BrokenLink ) * O''''''bMimic at http://www.openbrace.com ---- '''Previous discussion''' (probably not worth keeping) At the xUnit BOF at OOPSLA someone described unit tests for servlets. Could someone replace this text with more information? ---- I wasn't there, and I've not heard of anyone else doing it, but I have a testharness to allow JUnit to drive servlets. It's a set of classes that let you build "canned" queries, send them to the servlet, and examine the response. It's nowhere near complete, but it works well enough. *** http://www.iac.net/~crawford/programming/testharness.zip ( BrokenLink ) ---- Just wanted to say thanks for this testharness. I've just started using it and it seems to work just perfectly. You say it's not complete - what would you say are the limitations or deficiencies? -- MattBiddulph ''My observation: the code as provided doesn't work for the Servlet API version 2.2. A lot of methods also exist only as stubs in TestRequest and TestResponse. Still, it's the best thing I've seen for doing servlet unit tests, and these deficiencies can be easily corrected. -- BrettNeumeier'' ---- I am using jswdk1.0.1, but the testharness files contain implementation for tomcat. Is there any other code available for jswdk1.0.1? ---- Try these reachable links: *** http://groups.yahoo.com/neo/groups/extremeprogramming/conversations/topics/13139 *** http://docs.jboss.org/cdi/tck/reference/1.0.1-Final/html/test-harness-introduction.html ---- CategoryTesting