日期:2014-05-18  浏览次数:20724 次

StrutsTestCase 中setRequestPathInfo出错
在使用StrutsTestCase的时候出现了问题.
在struts-config.xml中配置如下:
<form-bean       name= "registerForm "       type= "app.RegisterForm ">      
</form-bean>  
<action   path=   "/registerAction "  
                type=   "app.RegisterAction "
                name=   "registerForm "
                input= "/input.jsp "/>

RegisterTest中如下:
public       void       testSuccessfulLogin(){  
    setRequestPathInfo( "/registerAction ");            
    addRequestParameter( "password1 ", "aaa ");      
    addRequestParameter( "password2 ", "aaa ");            
    actionPerform();              
    verifyForward( "success ");      
       
    }  
可是执行这个测试用列的时候,总是提示
ClassNotDefineError:
at   setRequestPathInfo.....
好像是setRequestPathInfo中的时候找不到registerAction   可是我明明已经配置好了的啊
不知道为什么,请教.
 


------解决方案--------------------
没用过这种测试工具的,不过应该是路径问题,或者说是你测试工具的配置问题,感觉,你直接执行的时候有问题吗