实测是因为没有把test 文件夹设置为Test Resource Root。 方法:右键文件夹 --> Mark Directory as --> Test Resource Root 改完就好了。 据说还有可能是因为JUnit 版本低于4.12