ServletTestSuite class name is misleading
-----------------------------------------

         Key: CACTUS-195
         URL: http://issues.apache.org/jira/browse/CACTUS-195
     Project: Cactus
        Type: Improvement
  Components: Documentation, Framework  
    Reporter: Christophe Gimenez
    Priority: Minor


Servlet test cases are inherited from ServletTestCase (as the name implies).
But ServletTestCase inherited classes need to instanciate TestSuite and NOT 
ServletTestSuite (eg. from the public static Test suite() method) as the latter 
are intended to be used with plain JUnit test cases.
Using by mistake ServletTestSuite leads to many erratics behaviors :
- beginXXX and endXXX methods are called twice
- on second endXXX call, WebResponse object returns allways an empty string on 
getText()


Some improvements could be :

- include a clear warning in the "Writing Test" page of the documentation 
(Option B: reuse a JUnit TestCase)
- include a warning in the javadoc documentation of the ServletTestSuite
- framework reporting a warning or any kind of error when trying to add a 
ServletTestCase in a ServletTestSuite

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to