| Author |
Struts Unit Testing Action class giving errors
|
Laxman Chowdary
Greenhorn
Joined: Apr 11, 2012
Posts: 21
|
|
Hi All,
I'm new bee to struts unit testing.
this is my code snippet.
verifyForward("success");
verifyForwardPath("/jsp/Success.jsp");
assertEquals("struts", getSession().getAttribute("authentication"));
verifyNoActionErrors();
I got the error like the following.
java.lang.NoSuchMethodError: org.apache.struts.config.ForwardConfig.getContextRelative()Z
at servletunit.struts.Common.verifyForwardPath(Common.java:304)
at servletunit.struts.MockStrutsTestCase.verifyForward(MockStrutsTestCase.java:675)
at com.awpl.correspondence.test.LoginActionTest.testSuccessfulLogin(LoginActionTest.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
Can anyone guide me soon to resolve the issue.
Reply is highly appreciated.
Thanks in advance,
Laxman chowdary
|
 |
 |
|
|
subject: Struts Unit Testing Action class giving errors
|
|
|