Skip to end of metadata
Go to start of metadata

LedgeWebappTestCase base class should be created that would do the following:

  1. Retrieve a refernce to the real LedgeServlet instance and store it in an instance variable inside the server side setUp() method.
  2. Provide a proceed() method that would forward the request to the real LedgeServlet instance, using provided HttpServletRequest/HttpServletResponse objects.

Individual test case class would describe a complete testing scenario comprised of multiple requests. Each test method would describe a single request within the scenario. The following methods need to be implemented for each request N:

Notice that all testRequestN() methods are identical. It seems that it's possible to eliminate them completly by overriding some of the JUnit / Cactus functionality - more research is needed.

Prequisites
  • tests within the testcase are executed in alphabetical order (remember to use leading zeros as necessary to enforce proper ordering)
  • testcase instances are reused across multiple tests - otherwise static variables + additional precautions for maintaing proper state need to be used
Labels: