'No JUnit tests found' in Eclipse

后端 未结 22 3010
闹比i
闹比i 2020-12-13 08:35

So I\'m new to JUnit, and we have to use it for a homework assignment. Our professor gave us a project that has one test class, BallTest.java. When I right clic

22条回答
  •  情书的邮戳
    2020-12-13 08:59

    It looks like you're missing the runner definition on your test class, that could be the cause:

    import org.junit.runners.JUnit4;
    @RunWith(JUnit4.class)
    public class BallTest {
    ...
    }
    

提交回复
热议问题