Error while loading coverage session (code 5001)

21.8k Views Asked by At

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)

9

There are 9 best solutions below

3
Priyesh On

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
RCB On

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.

1
nxp girmiti On

Go to Coverage Configurations-> select only required one.

0
Swaty On

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.

0
JavaGeek On

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!

0
Carlos Gamboa On

another tips that work for me was delete the temporal eclipse folder .metadata... etc.

Then i delete my project from my Workspace(Not the disk), I have imported the project again en voila !! Its Work my coverage!!!!

0
Salman On

Keep 'skip test' checkbox un-checked during project build using eclipse-maven plugin. And after that run the coverage. This worked for me.

1
Naman Bhansali On

Simply Cleaning or Updating the project works in most of the cases!

0
Rajni Paneru On

for me just go to source(below build path) and click on format and its fine.