Intellj Idea code coverage issue

Hi,
I am trying to run test with code coverage intellij Idea. I am getting java.lang.NoClassDefFoundError: error after I enable the intellij idea code coverage.

Without code coverage test runs fine. This issue only happens after enabling the code coverage for intelliJ idea.


can you please help me this error?

Thanks,
Abhishek Upadhyay

0

Please attach the full error text and specify your IDEA version.

0
Avatar
Permanently deleted user

Version :          intelliJ Idea Ultimate 14.1.3


Error while running the test case with coverga in intellij Idea

java.lang.NoClassDefFoundError: Could not initialize class com.ibn.mbdev.language.misql.ExpressionResolver
 at com.ibn.mbdev.language.misql.ColumnSpecificationResolverTester.testOBJ(ColumnSpecificationResolverTester.java:58)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
 at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)



0

Please find coverage-error.log file and attach it. I also assume that there should be a cause of the exception you've posted. Please attach it if you find it.

Thanks,
Anna

0
Avatar
Permanently deleted user

I could not find any coverage-error.log in my project. I run my test case in IDE with coverage enabled got this error.its the complete error which i copied from the console window.

Thanks,
Abhishek

0

A sample to reproduce? You may just remove everything from the project but dependencies and the test and the class which failed to initialize.

0
Avatar
Permanently deleted user

I am unable to share the full code here. by these test runs fine without code coverge. this happens only after running with coverage enabled. I could see there were a lot of similar issue in intellij idea previous versions where user is getting build failure(with similar error to that I have mentioned) after enabling the code coverage, but couldn't see any resolutions to this issue.

0

I didn't ask about full code, I need a sample to reproduce the issue, the less code - the better. As your class is failed to be initialized, then most probably there are multiple instrumentations which doesn't work good together but without any further details we can't help.

0

请先登录再写评论。