Problem to Run the MockStrutsTestCase
hai
I am using MockStrutsTestCase to test my Struts application but I am getting run time error like this: testSuccessfulLogin(TestLoginAction)java.lang.NoClassDefFoundError: org/xml/sax/ext/Attribute2
Why I am getting this error?
can anyone tell me please..........
I have place necessary jar file in my CLASSPATH.
here is my code:
import servletunit.struts.MockStrutsTestCase;
public class TestLoginAction extends MockStrutsTestCase
{
public TestLoginAction(String testName)
{
super(testName)
}
public void testSuccessfulLogin()
{
setRequestPathInfo("/Login");
actionPerform();
verifyForward("success");
verifyForwardPath("/Login.jsp");
verifyInputForward();
assertEquals("jerry",getSession.getAttribute("username"));
verifyNoActionErrors();
}
public void testFailedLogin()
{
setRequestPathInfo("/Login");
actionPerform();
verifyForward("failure");
verifyForwardPath("/Login.jsp");
verifyInputForward();
verifyActionErrors(new String[] {"username.password.mismatch"});
assertNull(getSession.getAttribute("username"));
}
public static void main(String args[])
{
junit.textui.TextRunner.run(TestLoginAction.class);
}
}
--
is there anything to add something in my struts-config.xml (or) in my classpath?
is any version problem?
does anyone tell me what are all the changes I have to do to run my application,Please............
Thanks in advance..........

