Junit测试出现 empty test suite

来源:互联网 发布:激光雷达避障算法 编辑:程序博客网 时间:2024/05/23 20:17

以下再idea中使用Junit测试

package PFP.Test;/** * Created by lichen on 2017/8/12. */public class Person {    public void run(){        System.out.println("run");    }    public void eat(){        System.out.println("eat");    }}
package PFP.Test;import org.junit.After;import org.junit.Before;import org.junit.Test;/** * Created by lichen on 2017/8/12. */public class JunitTest {    private Person p;    @Before    public void before(){        p=new Person();    }    @Test    public void testRun(){        p.run();    }    @Test    public void testEat(){        p.eat();    }    @After    public void after(){        p=null;    }}

出现原因 ,没有make编译成Person.class和JunitTest.class 先make再运行 通过

原创粉丝点击