Junit4所需jar包

来源:互联网 发布:公共卫生学mac 编辑:程序博客网 时间:2024/05/29 18:11

        在eclipse中新建一个Junit类,运行时出现java.lang.NoClassdeffounderror:org/apache/commons/logging/LogFactory错误,原来是缺少commons-logging-1.0.4.jar这个jar包,添加该jar包后能正常运行。

           在每个公共方法前增加@Test注解,如

@Test

public void test001() {

}

原创粉丝点击