junit: no tests found

后端 未结 11 894
情书的邮戳
情书的邮戳 2020-12-14 05:47

I have inherited a Java project and am new to Java development. I feel a good way for me to get comfortable with the code is to write some tests around it. I\'m writing my c

11条回答
  •  情深已故
    2020-12-14 06:06

    I was getting this too:

    junit.framework.AssertionFailedError: No tests found in ...

    Solved by renaming the test method from method1

    @Test
    public void method1(){
        // Do some stuff...
    }
    

    to testMethod1

    @Test
    public void testMethod1(){
        // Do some stuff...
    }
    

提交回复
热议问题