Uploaded image for project: 'Cactus'
  1. Cactus
  2. CACTUS-195

ServletTestSuite class name is misleading

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Documentation, Framework
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            aboulafia Christophe Gimenez
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: