XpdWiki
Set your name in
UserPreferences Referenced by
JSPWiki v2.0.52
|
When you see this, you start to ask yourself how Sun tests their Servlets in a simple repeatable manner, when there is all this baggage that you have to implement even for the simplest HelloWorld? servlet? It should be easy for me to write: HttpServletRequest? r = new MockServletRequest?(). r.addParamater("name","Tim"); MockOutPutStream? out = new MockOutputStream?(); HttpServletResponse? s = new MockServletResponse(out); myServelet.doGet(r,s); assert(out.toString().indexOf(TEST_RESULT) > -1); I haven't encountered any examples of this level of test, however maybe someone can prove me wrong! In the meantime, Oli, Paul and I have been working around these difficulties to write useful tests. Some of this you can see in the RealCode, however there is more to come -- TimM³host³host62-172-224-130.btinternet.com³date³September 9, 1999³agent³Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt?; UKPORTAL)³DoesSunTestServlets
|