Hi Krishantha, The following exception is thrown when i enable the test coverage in the ML UI integration tests. Tests work fine when the coverage is set to false. I followed the documentation on [1].
Similar issue has been discussed in [2] and [3]. Any idea what causes this? I have attached the *integration/pom.xml* and the *integration/tests-ui-integration/pom.xml* > *-------------------------------------------------------* > * T E S T S* > *-------------------------------------------------------* > *Running TestSuite* > *INFO > > [org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerManager] > - Extracting carbon zip file.. * > *INFO > > [org.wso2.carbon.integration.common.extensions.carbonserver.TestServerManager] > - Carbon Home - > /home/supun/Supun/MachineLearning/Product/modules/integration/tests-ui-integration/target/carbontmp1420611207295/wso2ml-1.0.0-SNAPSHOT* > *INFO > [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - > Instrumentation of jar files in progress ...* > *INFO > [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - > Instrumented 310 file(s) in plugins directory* > *INFO > [org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils] - > Instrumented 0 file(s) in patches directory* > *INFO > > [org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerManager] > - Starting server............. * > *INFO > [org.wso2.carbon.integration.common.extensions.utils.ServerLogReader] - > JAVA_HOME environment variable is set to > /home/supun/Supun/Softwares/jdk1.6.0_45* > *INFO > [org.wso2.carbon.integration.common.extensions.utils.ServerLogReader] - > CARBON_HOME environment variable is set to > /home/supun/Supun/MachineLearning/Product/modules/integration/tests-ui-integration/target/carbontmp1420611207295/wso2ml-1.0.0-SNAPSHOT* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > java.lang.reflect.InvocationTargetException* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at java.lang.reflect.Method.invoke(Method.java:597)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > Caused by: java.lang.RuntimeException: Invalid signature file digest for > Manifest main attributes* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at org.wso2.carbon.server.CarbonLauncher.launch(CarbonLauncher.java:117)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at org.wso2.carbon.server.Main.launchCarbon(Main.java:162)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > at org.wso2.carbon.server.Main.main(Main.java:96)* > *ERROR > [org.wso2.carbon.integration.common.extensions.utils.InputStreamHandler] - > ... 6 more* > *ERROR > [org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension] > - Fail to start carbon server * > *java.lang.RuntimeException: Port 9763 is not open* > * at > org.wso2.carbon.integration.common.utils.ClientConnectionUtil.waitForPort(ClientConnectionUtil.java:101)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerManager.startServerUsingCarbonHome(CarbonServerManager.java:136)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.TestServerManager.startServer(TestServerManager.java:102)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension.onExecutionStart(CarbonServerExtension.java:51)* > * at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)* > * at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)* > * at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)* > * at java.lang.reflect.Method.invoke(Method.java:597)* > * at > org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75)* > * at > org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47)* > * at org.testng.TestNG.runExecutionListeners(TestNG.java:1094)* > * at org.testng.TestNG.run(TestNG.java:1041)* > * 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:39)* > * at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)* > * at java.lang.reflect.Method.invoke(Method.java:597)* > * 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)* > *ERROR > [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] - > Execution error occurred in > TestExecutionListener:-[Ljava.lang.StackTraceElement;@34883357* > *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:39)* > * at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)* > * at java.lang.reflect.Method.invoke(Method.java:597)* > * 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 on initializing test > environment * > * at > org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71)* > * at > org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52)* > * at org.testng.TestNG.runExecutionListeners(TestNG.java:1094)* > * at org.testng.TestNG.run(TestNG.java:1041)* > * 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:39)* > * at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)* > * at java.lang.reflect.Method.invoke(Method.java:597)* > * at > org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75)* > * at > org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47)* > * ... 14 more* > *Caused by: java.lang.RuntimeException: Fail to start carbon server * > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension.handleException(CarbonServerExtension.java:71)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension.onExecutionStart(CarbonServerExtension.java:55)* > * ... 20 more* > *Caused by: java.lang.RuntimeException: Port 9763 is not open* > * at > org.wso2.carbon.integration.common.utils.ClientConnectionUtil.waitForPort(ClientConnectionUtil.java:101)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerManager.startServerUsingCarbonHome(CarbonServerManager.java:136)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.TestServerManager.startServer(TestServerManager.java:102)* > * at > org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension.onExecutionStart(CarbonServerExtension.java:51)** > ... 20 more* Ref: [1] https://docs.wso2.com/display/TA430/Emma+Based+Integration+Test+Code+Coverage [2] http://mail.wso2.org/mailarchive/dev/2014-May/030683.html [3] http://wso2-oxygen-tank.10903.n7.nabble.com/Dev-Jaggery-integration-test-module-Code-coverage-lt-coverage-gt-true-lt-coverage-gt-Exception-td99662.html -- *Supun Sethunga* Software Engineer WSO2, Inc. lean | enterprise | middleware Mobile : +94 716546324
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. ~ ~ WSO2 Inc. licenses this file to you under the Apache License, ~ Version 2.0 (the "License"); you may not use this file except ~ in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.wso2.ml</groupId> <artifactId>ml-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>../../pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>integration</artifactId> <name>WSO2 ML - Integration Tests</name> <packaging>pom</packaging> <modules> <module>tests-integration</module> <module>tests-ui-integration</module> <module>tests-common</module> </modules> <build> <plugins> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <id>auto-clean</id> <phase>initialize</phase> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <phase>compile</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/emma</outputDirectory> <includeTypes>jar</includeTypes> <includeArtifactIds>emma,org.wso2.carbon.automation.engine</includeArtifactIds> </configuration> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>emma</groupId> <artifactId>emma</artifactId> <version>${emma.version}</version> </dependency> </dependencies> </project>
<?xml version="1.0"?> <!-- ~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. ~ ~ WSO2 Inc. licenses this file to you under the Apache License, ~ Version 2.0 (the "License"); you may not use this file except ~ in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. --> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.wso2.ml</groupId> <artifactId>integration</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <artifactId>tests-ui-integration</artifactId> <name>tests-ui-integration</name> <packaging>jar</packaging> <build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <inherited>false</inherited> <version>2.12.3</version> <configuration> <!-- <argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000</argLine> --> <argline>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argline> <suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> </suiteXmlFiles> <skipTests>${skipUiTests}</skipTests> <systemProperties> <property> <name>maven.test.haltafterfailure</name> <value>false</value> </property> <property> <name>carbon.zip</name> <value> ${basedir}/../../distribution/target/wso2ml-${project.version}.zip </value> </property> <property> <name>samples.dir</name> <value>${basedir}/../../../samples/product</value> </property> <property> <name>framework.resource.location</name> <value> ${basedir}/src/test/resources/ </value> </property> <property> <name>server.list</name> <value>ML</value> </property> <property> <name>usedefaultlisteners</name> <value>false</value> </property> <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir> <emma.home>${basedir}/target/emma</emma.home> <instr.file>${basedir}/src/test/resources/instrumentation.txt</instr.file> <filters.file>${basedir}/src/test/resources/filters.txt</filters.file> <emma.output>${basedir}/target/emma</emma.output> </systemProperties> <workingdirectory>${basedir}/target</workingdirectory> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>2.5</version> <configuration> <fileSets> <fileSet> <directory>${basedir}/src/test/resources/client/modules</directory> <includes> <include>**/*.mar</include> </includes> <followsymlinks>false</followsymlinks> </fileSet> </fileSets> </configuration> </plugin> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-emma-dependencies</id> <phase>compile</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/emma</outputDirectory> <includeTypes>jar</includeTypes> <includeArtifactIds>emma </includeArtifactIds> </configuration> </execution> <execution> <id>copy-jar-dependencies</id> <phase>compile</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${basedir}/src/test/resources/artifacts/ml/jar </outputDirectory> <includeTypes>jar</includeTypes> <includeArtifactIds>mysql-connector-java </includeArtifactIds> <excludeTransitive>true</excludeTransitive> </configuration> </execution> <execution> <id>copy-secVerifier</id> <phase>compile</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${basedir}/target/security-verifier</outputDirectory> <includeTypes>aar</includeTypes> <includeArtifactIds>SecVerifier</includeArtifactIds> <stripVersion>true</stripVersion> </configuration> </execution> <execution> <id>unpack-mar-jks</id> <phase>compile</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>org.wso2.ml</groupId> <artifactId>wso2ml</artifactId> <version>${project.version}</version> <type>zip</type> <overWrite>true</overWrite> <outputDirectory>${basedir}/target/tobeCopied/</outputDirectory> <includes>**/*.jks,**/*.mar,**/axis2_client.xml</includes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4</version> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-resources-jks</id> <phase>compile</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/src/test/resources/keystores/products </outputDirectory> <resources> <resource> <directory> ${basedir}/target/tobeCopied/wso2ml-${project.version}/repository/resources/security/ </directory> <includes> <include>**/*.jks</include> </includes> </resource> </resources> </configuration> </execution> <execution> <id>copy-resources-mar</id> <phase>compile</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/src/test/resources/client/modules </outputDirectory> <resources> <resource> <directory> ${basedir}/target/tobeCopied/wso2ml-${project.version}/repository/deployment/client/modules </directory> <includes> <include>**/*.mar</include> </includes> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> </dependency> <dependency> <groupId>org.wso2.carbon.automation</groupId> <artifactId>org.wso2.carbon.automation.test.utils</artifactId> </dependency> <dependency> <groupId>org.wso2.carbon.automation</groupId> <artifactId>org.wso2.carbon.automation.engine</artifactId> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.integration.common.extensions</artifactId> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-api</artifactId> </dependency> <dependency> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> <version>1.4.01</version> </dependency> <dependency> <groupId>org.wso2.ml</groupId> <artifactId>ui-pages</artifactId> <version>${ml.version}</version> </dependency> <dependency> <groupId>org.wso2.ml</groupId> <artifactId>test-utils</artifactId> <version>${ml.version}</version> </dependency> </dependencies> </project>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
