Can anyone give me any advice on a good tool to use for unit testing struts 
action classes. I am currently using struts 1.2.9 with spring 1.2.9 and 
hibernate. I have looked into StrutsTestCase but cannot get it to work. I get 
the following error:

test:
    [junit] Testsuite: com.chisq.common.action.PersonActionTest
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 1.266 sec
    [junit] ------------- Standard Output ---------------
    [junit] 08:47:40,547 DEBUG PersonActionTest:48 - .......running 
testSavePerson()
    [junit] 08:47:40,922 ERROR RequestProcessor:676 - Invalid path was 
requested /Person
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testSavePerson(com.chisq.common.action.PersonActionTest): 
FAILED
    [junit] received error 404 : Invalid path was requested
    [junit] junit.framework.AssertionFailedError: received error 404 : Invalid 
path was requested
    [junit]     at 
servletunit.HttpServletResponseSimulator.sendError(HttpServletResponseSimulator.java:463)
    [junit]     at 
org.apache.struts.action.RequestProcessor.processMapping(RequestProcessor.java:677)
    [junit]     at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:191)
    [junit]     at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    [junit]     at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    [junit]     at 
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:394)
    [junit]     at 
com.chisq.common.action.PersonActionTest.testSavePerson(PersonActionTest.java:51)


I have checked in my strut-config.xml file and /Person is defined as well in my 
action-servlet.xml file as well.




Reply via email to