Your stack trace compared to the selected pattern
This problem happens because Android Platform (
android.jar) already contains JUnit classes. IDEA test runner loads these classes and sees that they are from the old JUnit, while you are trying to use annotated tests which is a feature of the new JUnit, therefore you get the error from the test runner.
The solution is simple, open the
Project Structure |
Dependencies, and move the
junit-X.X.jar (or any other library where you know the
BaseTestRunner classes are) up, so that it comes before
Android 1.X Platform in the classpath. Now the test runner will be happy as it loads the new JUnit version.