XpdWiki

FrontPage
RecentChanges
XtC
FindPage
PageIndex
XpApprentices

Set your name in
UserPreferences

Edit this page

Referenced by
TestingServlets




JSPWiki v2.0.52


DoesSunTestServlets


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


Edit this page   More info...   Attach file...
This page last changed on 09-Sep-1999 21:59:12 BST by unknown.