junit: no tests found

后端 未结 11 884
情书的邮戳
情书的邮戳 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:03

    The other reason generally i see people having method parameters, remove any parameters you might have in the test method, regardless you add @Test annotation , you need to have your method name starting "test" in order for Junit to pick you testcase. hope it helps.

提交回复
热议问题