These steps worked for me when the error showed that the Filter class was missing (as reported in this false-diplicated question: JUnit: NoClassDefFoundError: org/junit/runner/manipulation/Filter ):
- Make sure to have JUnit 4 referenced only once in your project (I also removed the Maven nature, but I am not sure if this step has any influence in solving the
problem).
- Right click the file containing unit tests, select
Properties, and under the Run/Debug settings, remove any entries
from the Launch Configurations for that file. Hit Apply and close.
- Right click the project containing unit tests, select
Properties, and under the Run/Debug settings, remove any entries
involving JUnit from the Launch Configurations. Hit Apply and close.
- Clean the project, and run the test.
Thanks to these answers for giving me the hint for this solution: https://stackoverflow.com/a/34067333/5538923 and https://stackoverflow.com/a/39987979/5538923).