JUnit: how to avoid “no runnable methods” in test utils classes

后端 未结 10 682
清酒与你
清酒与你 2020-11-30 05:35

I have switched to JUnit4.4 from JUnit3.8. I run my tests using ant, all my tests run successfully but test utility classes fail with \"No runnable methods\" error. The patt

10条回答
  •  有刺的猬
    2020-11-30 05:50

    1. If this is your base test class for example AbstractTest and all your tests extends this then define this class as abstract
    2. If it is Util class then better remove *Test from the class rename it is MyTestUtil or Utils etc.

提交回复
热议问题