首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

StrutsTestCase 中setRequestPathInfo出错,该如何解决

2012-01-26 
StrutsTestCase 中setRequestPathInfo出错在使用StrutsTestCase的时候出现了问题.在struts-config.xml中配

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   可是我明明已经配置好了的啊
不知道为什么,请教.
 


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

热点排行