Error while loading coverage session (code 5001)

旧城冷巷雨未停 提交于 2019-12-22 08:33:51

问题


I got the following error when I am trying to check coverage using EclEmma, please help me out:

Error while loading coverage session (code 5001). Error while analyzing package fragment root java at F/solo-repository/target/test-classes (code 5007). File not found: D:\RDM Services\solo-repository\target\test-classes\com\charter\solo\account\repository\AccountBillInformationRepositoryTest.class. D:\RDM Services\solo-repository\target\test-classes\com\charter\solo\account\repository\AccountBillInformationRepositoryTest.class (The system cannot find the path specified)


回答1:


I had similar problem. This is what I did.

  1. Refreshed the project.
  2. Updated the maven project.
  3. Configured the Coverage. You may want to include some additional jars if you are trying to get the coverage over some dependencies.

It worked for me.




回答2:


I had the same error. The suggestions in this answer did not fix it for me. The thing that finally did fix it was:

  • Right click a source folder and select Build Path > Configure Output Folder...
  • Select "Project's default output folder" (even if it happens to be the same path entered in "Specific output folder")
  • Click OK
  • Refresh the project

It seems a bit nonsensical, but did the trick for me.




回答3:


I had the exact same problem, here is how i fixed it:

  • Update maven project
  • Build the project with mvn clean install and make sure 'Skip Tests' is unchecked
  • Now run the coverage

The reason for this error is that it can't find the class in the target folder which it won't until you build the project along with all the test case class files that you want coverage on. Hope this helps!




回答4:


Go to Coverage Configurations-> select only required one.




回答5:


This worked for me.

Right click a source folder select Build Path > Configure Output Folder... Select "Project's default output folder" (even if it happens to be the same path entered in "Specific output folder") Click OK Refresh the project.



来源:https://stackoverflow.com/questions/44108835/error-while-loading-coverage-session-code-5001

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!