|
请教strutsTestCase并继承MockStrutsTestCase 写单元测试函数的问题
测试函数继承的是MockStrutsTestCase ,
这是我写的一个测试函数
public void testSuccessfulLogin(){
System.out.println("testSuccessfulLogin_begin");
setRequestPathInfo("/loginActionPath.do");
System.out.println("testSuccessfulLogin_end");
addRequestParameter("cd","006");
addRequestParameter("pswd","006");
addRequestParameter("userName","006");
addRequestParameter("kd","0");
actionPerform();
verifyForward("Success");
}
这句就没执行到,不知道是什么原因
由于一开始出现web.xml was not found我把web-info放要项目的根目录下就没事了。
现在run testcase后console中提示Picked up _JAVA_OPTIONS: -Dawt.toolkit=mercury.awt.awtSW -Xrunmicsupp -Xbootclasspath/a:C:\PROGRA~1\COMMON~1\MERCUR~1\SHARED~1\JAVAAD~1\classes;C:\PROGRA~1\COMMON~1\MERCUR~1\SHARED~1\JAVAAD~1\classes\mic.jar
我把_JAVA_OPTIONS删了也不起作用。 |
|