java.lang.Exception: No tests found matching Method using Intellij IDEA

后端 未结 12 2250
说谎
说谎 2020-12-14 14:12

I am experiencing a strange behavior of Intellij IDEA 2016.3. Having a class with method foo and a JUnit test for the method when I get java.lang.Exceptio

12条回答
  •  青春惊慌失措
    2020-12-14 15:08

    If you're using a theory testing framework like Junit's or Robolectric's, make sure to run the class containing the test you want, instead the test itself. Since these frameworks use the test methods as instance methods instead of static methods, any testing framework looking for a normal public static test won't find anything.

提交回复
热议问题