Hi Devs, I refer the doc [1] for updating Jacoco code coverage tool for integration tests in product G-Reg. It builds successfully when code coverage is set to false in automation.xml as follows.
<coverage>false</coverage> Please do find automation.xml, pom.xml and automationlog files for the respective test module in [2] [1] - https://drive.google.com/a/wso2.com/folderview?id=0B8xmd1n2DieYfjk2X0Fnb20yMUF0TnI1X1NIek5zTXFtUmhhU0wxRXFTQ1lCQ19qSlN5RmM&usp=sharing [2] - https://drive.google.com/a/wso2.com/folderview?id=0B8xmd1n2DieYfjk2X0Fnb20yMUF0TnI1X1NIek5zTXFtUmhhU0wxRXFTQ1lCQ19qSlN5RmM&usp=sharing But it gives the following error when code coverage is enabled. Further I excluded "asm" from the jacoco dependency. But it gives the same error. Any help will be appreciated. ERROR [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] - Execution error occurred in TestExecutionListener:- java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionFinish(TestExecutionListener.java:62) at org.testng.TestNG.runExecutionListeners(TestNG.java:1033) at org.testng.TestNG.run(TestNG.java:1013) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: java.lang.IncompatibleClassChangeError: class org.jacoco.core.internal.flow.ClassProbesVisitor has interface org.objectweb.asm.ClassVisitor as super class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.analyzeStructure(ReportGenerator.java:144) at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.create(ReportGenerator.java:77) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.generateCoverageReport(CarbonServerManager.java:333) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.serverShutdown(CarbonServerManager.java:309) at org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager.stopServer(TestServerManager.java:132) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension.onExecutionFinish(CarbonServerExtension.java:61) ... 20 more org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: java.lang.RuntimeException: Error while tear down the execution environment at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionFinish(TestExecutionListener.java:65) at org.testng.TestNG.runExecutionListeners(TestNG.java:1033) at org.testng.TestNG.run(TestNG.java:1013) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96) ... 9 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionFinish(TestExecutionListener.java:62) ... 14 more Caused by: java.lang.IncompatibleClassChangeError: class org.jacoco.core.internal.flow.ClassProbesVisitor has interface org.objectweb.asm.ClassVisitor as super class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.analyzeStructure(ReportGenerator.java:144) at org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator.create(ReportGenerator.java:77) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.generateCoverageReport(CarbonServerManager.java:333) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager.serverShutdown(CarbonServerManager.java:309) at org.wso2.carbon.automation.extensions.servers.carbonserver.TestServerManager.stopServer(TestServerManager.java:132) at org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension.onExecutionFinish(CarbonServerExtension.java:61) ... 20 more Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 Thanks! Rajith -- Rajith Roshan Software Engineer, WSO2 Inc. Mobile: +94-72-642-8350 <%2B94-71-554-8430>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev