首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

测试 异常集

2012-09-20 
测试错误集一:he hierarchy of the type Test Cactus LoginAction is inconsistentThese errors happend b

测试 错误集
一:he hierarchy of the type Test Cactus LoginAction is inconsistent
     These errors happend because some interface /class in the hierarchy cannot be resolve.
For example: the error is occur in your class - class x, x inherits y, and in turn, y inherits z. However, the compiler
cannot resolve z (in above error is EventManager), because z is belong to a library that is not included.
Therefore, you have to add package containing z to the classpath/ or project's Java Build Path (if you are using eclipse).
  二:import junit.framework.TestCase,错误的解释是The import junit cannot be resolved
  在你的项目上点击右键--->Properties--->Java Build Path--->(Libraries标签)add Library-->JUnit-->Next-->Finish
三:Transormer.class 未找到
要加入commons-collections-3.1.jar这个包,不然也会报错.
四:使用StrutsTestCase:junit.framework.AssertionFailedError: The /WEB-INF/web.xml was not found. 或者  Missing configuration resource for path...

    public void setUp() throws Exception {        super.setUp();        File web = new File("D:/WEB_STORE/project/teststruts1/WebRoot");        this.setContextDirectory(web);        setConfigFile("/WEB-INF/web.xml");        setConfigFile("/WEB-INF/struts-config.xml");        //setConfigFile("/WEB-INF/struts-config-teststruts1.xml");           }

热点排行