JUNIT Test class in Eclipse - java.lang.ClassNotFoundException

后端 未结 26 2010
栀梦
栀梦 2020-12-14 13:55

I\'m trying to run my junit test (to verify that a properties file loads correctly) but I get ClassNotFoundException although the class is there and all requir

26条回答
  •  误落风尘
    2020-12-14 14:41

    I had this problem, in my case the problem relies in the compilation, I am using maven and test classes didn't compile.

    I fixed it by doing a maven install (it compiles all the files), also you can check for other reasons, that avoid test to compile like if your "run configurations" is skipping the tests to save time.

提交回复
热议问题