Hi all, New coverage implementation using Jacoco has been committed to master branch of carbon-platform-integration. I tried my best to adhere to existing Emma based design and reuse same instrumentation and filters text files. Note that this new coverage implementation was done to support for JDK 1.7 and 1.8. We need to test the new implementation thoroughly before the release.
I've done initial testing with AS and everything seems to work. Automation team will start verifying coverage with products already migrated JDK 1.7. Specially products with multiple test modules (ESB, G-Reg & BPS) Lets focus on testing following scenarios before the release. Test Scenarios for coverage : 1. Coverage generation with patches applied. 2. Merge coverage reports in multiple test modules. 3. WebApp class coverage. 4. Coverage generation after restart and impact to coverage numbers. To get started with Jacoco coverage : 1. Edit your test module pom and replace emma copy dependency execution configuration with below. <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> 2. Include jacoco argent as a dependency to root pom. <dependency> <groupId>org.jacoco</groupId> <artifactId>org.jacoco.agent</artifactId> <version>${jacoco.agent.version}</version> </dependency> <jacoco.agent.version>0.7.4.201502262128</jacoco.agent.version> 3. Remove following system properties from surefire plugin. <emma.home>${basedir}/target/emma</emma.home> <emma.output>${basedir}/target/emma</emma.output> You will find following log entries in console with required details to view the report once coverage generation completed. Available report formats are XML, HTML and CSV INFO [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Jacoco coverage dump file path : /Users/krishantha/git/wso2/product-as/modules/integration/tests-integration/tests/target/jacoco.exec INFO [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Jacoco class file path : /Users/xxx/product-as/modules/integration/tests-integration/tests/target/wso2as-6.0.0-NAPSHOT/repository/components/plugins INFO [org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerManager] - Jacoco coverage report path : /Users/krishantha/git/wso2/product-as/modules/integration/tests-integration/tests/target/jacoco/coverage Thanks, Krishantha. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear.
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev