This error is a catchall for anything else that might be wrong with your test class.  First make sure any of the below problems are not occurring. 

Your unit test code is running JUnit4.  At least one test method must have the @Test annotation.  Otherwise this error occurs.

If the class you are testing has @Required setters for Spring injections they must be set otherwise JUnit will mask the missing required exception as a no runnable methods exception.

If you are initializing your mock objects outside of the @Begin method you will get this error.

If you are attempting to mock the same class more than once you will get this error.

Share