Stackoverflow解答:
- Right click the project in Package Explorer, and click Properties.
- Click the Libraries tab.
- Click the Add library button.
- Select JUnit and click Next.
- Select JUnit 4 (that's what I am using).
- Click finish.
- Now right click the file containing unit tests and select Properties.
- Under the Run/Debug settings, remove any entries from the Launch Configurations for that file. Hit ok.
一般情况下,无需配置Junit,remove即可。