Loading ...
Sorry, an error occurred while loading the content.
 

Problem while using StrutsTestCase...can anyone please help me

Expand Messages
  • Swetha Pathak
    Hi all, I am new to JUnit. I am currently testing Struts action classes using JUnit. I gave a simple code... public void testSuccessDeletion() {
    Message 1 of 1 , Mar 1, 2007
      Hi all,

      I am new to JUnit. I am currently testing Struts action classes using JUnit. I gave a simple code...

      public void testSuccessDeletion() {

      setRequestPathInfo("/employeeInfo");
      addRequestParameter("empID","10");
      actionPerform();
      verifyForward("deleteRecords");
      assertEquals("Records Deleted Successfully",getSession().getAttribute("SUCCESS"));
      verifyNoActionErrors();

      }

      Am getting an error when the method actionPerform() is being called. I am getting the following error.

      Feb 28, 2006 10:02:30 PM org.apache.struts.util.PropertyMessageResources
      INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
      Feb 28, 2006 10:02:30 PM org.apache.struts.util.PropertyMessageResources
      INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
      Feb 28, 2006 10:02:31 PM org.apache.struts.action.ActionServlet
      SEVERE: null
      Feb 28, 2006 10:02:31 PM org.apache.struts.action.ActionServlet
      SEVERE: MSG_EXCEPTION_LOGGED
      Feb 28, 2006 10:02:31 PM servletunit.struts.MockStrutsTestCase
      SEVERE: Error initializing action servlet
      Feb 28, 2006 10:02:31 PM servletunit.struts.MockStrutsTestCase
      SEVERE: MSG_EXCEPTION_LOGGED


      Please help me.
      Swetha


      ---------------------------------
      TV dinner still cooling?
      Check out "Tonight's Picks" on Yahoo! TV.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.