java-在Eclipse中“未找到JUnit测试”
因此,我是JUnit的新手,我们必须将其用于作业分配。 我们的教授给我们提供了一个具有一个测试类的项目BallTest.java。当我右键单击> Run as> JUnit Test时,出现一个弹出错误,提示“未找到JUnit测试”。 我知道这里已经回答了这个问题(测试运行程序“ JUnit 4”未找到测试),但是关闭Eclipse,重新启动,清理和构建似乎无效。 下面是我的运行配置,构建路径和我要测试的类的屏幕截图。
BallTest.java
import static org.junit.Assert.*;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
public class BallTest {
Ball ball;
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
System.out.println("Setting up ...");
Point2D p = new Point2D(0,0);
ball = new Ball(p);
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws