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)
I had similar problem. This is what I did.
- Refreshed the project.
- Updated the maven project.
- 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.
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.
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!
Go to Coverage Configurations-> select only required one.
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