Announcement Announcement Module
No announcement yet.
Replacement of CactusStrutsTestCase in SPRING Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replacement of CactusStrutsTestCase in SPRING

    I built my application on struts and i was using cactus with cactusStrutsTestCase to test my action classes.... as now I have moved my Application to spring, I dont know how to test my controllers ( most of them extends MultiActionController)

    need a help

    thanks in advance


  • #2
    Please look in appfuse project (google) or in Spring Live book (google) where is this described in detail.


    • #3
      how to test a perticular method in MultiActionController

      Thanks.. I got the idea of testing but still in a trouble...

      I have a controller say MyController extends MultiActionController

      this controller has mapping in myapp-servlet.xml with myControl.htm

      lets say MyController has two methods

      1. public ModelandView saveList(.....)
      2. public ModelandView editList(.....)

      Now i write a test class MyControllerTest
      (if I would have used SimpleFormController rather than MultiActionController and I would have a single method in the controller then i do stuff like this in the test class)

      MockHttpServletRequest request = newGet("/myControl.htm");

      but as I am using MultiActionController then I dont know how should I pass some parameter so that I can test a perticular method.
      please suggest something.. .