Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:windows xp, eclipse-SDK-3.2.2-win32 , tomcat 5.5, maven 1.0.2, m2 integration for eclipse
-
Number of attachments :
Description
i am getting error when test the MockStrutsTestCase in maven project,
Running com.attainware.maven2example.ApplicationTest
------1--------
------2--------
log4j:WARN No appenders could be found for logger (servletunit.struts.MockStrutsTestCase).
------3--------
log4j:WARN Please initialize the log4j system properly.
------4--------
------Entered into testCreate()--------
------5--------
------6--------
------7--------
------8--------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.218 sec <<< FAILURE!
Running com.attainware.maven2example.USTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
Running com.attainware.maven2example.TestExample
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Results :
Tests in error:
testCreate(com.attainware.maven2example.ApplicationTest)
Tests run: 4, Failures: 0, Errors: 1, Skipped: 0
[ERROR] mojo-execute : surefire:test
Diagnosis: There are test failures.
FATAL ERROR: Error executing Maven for a project
[ERROR] project-execute : com.attainware.maven2example:maven2example_webapp:war:1.0 ( task-segment: [test] )
Diagnosis: There are test failures.
i am using following version jars,
junit-3.8.1.jar, struts-1.1.jar, servlet-4.0.6, strutstestcase-2.1.2-1.1-2.3.jar
the following class is my MockStrutsTestCase,
package com.attainware.maven2example;
import servletunit.struts.MockStrutsTestCase;
public class ApplicationTest extends MockStrutsTestCase
{
public static void main(String[] args)
{ junit.textui.TestRunner.run(ApplicationTest.class); }public ApplicationTest(String testName)
{ super(testName); System.out.println("-------1---------"); }protected void setUp() throws Exception
{ System.out.println("-------2---------"); super.setUp(); System.out.println("-------3---------"); setInitParameter("validating", "false"); System.out.println("-------4---------"); }public void testCreate()
{ System.out.println("-------Entered into testCreate()---------"); addRequestParameter("partner_name", "sai"); System.out.println("-------5---------"); addRequestParameter("email_id", "sai@apere.com"); System.out.println("-------6---------"); addRequestParameter("action","login"); System.out.println("-------7---------"); setRequestPathInfo("/index"); System.out.println("-------8---------"); actionPerform(); System.out.println("-------9---------"); verifyForward("output"); System.out.println("-------10---------"); verifyForwardPath("/output.jsp"); System.out.println("-------11---------"); verifyNoActionErrors(); System.out.println("-------End of testCreate()---------"); }}
It throws the error at the time of execute the actionPerform(); statement.
very urgent please help me.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Closed [ 6 ] |
| Assignee | Lukas Theussl [ lukas ] | |
| Resolution | Won't Fix [ 2 ] |