Re: [Dev] Testing Jacoco based code coverage genration
Hi Ramith, You can find the documentation from[1] [1] https://docs.google.com/document/d/1pMJGdRH4Kmc4J3rYzgnpGlR5AnSeoC4QL9gMX9tUhYs/edit#heading=h.yemie7ivahbz Thanks, Nuwanw On Sat, May 23, 2015 at 4:18 PM, Ramith Jayasinghe ram...@wso2.com wrote: do we have any documentation on this? On Wed, May 13, 2015 at 6:58 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi all, I have redesign Jacoco coverage generation a bit to support for coverage merging functionality. Now coverage data dump into $basedir/target/jacoco/coverage directory at the time of report generation, jacoco coverage data files are merged back to a single file (jacoco-data-merge.exec) and report will be generated using this merged data file. To merge multiple module test coverage data files. You can use pom file with exec-maven-plugin to execute org.wso2.carbon.automation.engine.frameworkutils.TestCoverageGenerator class. This will generate merged report at $basedir/target/jacoco/coverage/index.html. I will write a comprehensive document on applying Jacoco coverage to products. Thanks, Krishantha. On Wed, May 6, 2015 at 10:46 AM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You can't use TestCoverageGenerator anymore (We need to remove this class as well) . The merged report should be generated at the last test module with got executed as we merge all coverage data to common file. May be we can think of introducing pom file to do merging. If this option is not user friendly. Thanks, Krishantha. On Wed, May 6, 2015 at 10:24 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I am getting below error when merging the coverage reports. generateReports implementation is missing in CodeCoverageUtils. report module use the org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator to aggregate results. Exception in thread main java.lang.NoSuchMethodError: org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils.generateReports(Ljava/util/List;)V at org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator.main(TestCoverageGenerator.java:36) Thanks, Nuwanw On Tue, May 5, 2015 at 9:47 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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
Re: [Dev] Testing Jacoco based code coverage genration
do we have any documentation on this? On Wed, May 13, 2015 at 6:58 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi all, I have redesign Jacoco coverage generation a bit to support for coverage merging functionality. Now coverage data dump into $basedir/target/jacoco/coverage directory at the time of report generation, jacoco coverage data files are merged back to a single file (jacoco-data-merge.exec) and report will be generated using this merged data file. To merge multiple module test coverage data files. You can use pom file with exec-maven-plugin to execute org.wso2.carbon.automation.engine.frameworkutils.TestCoverageGenerator class. This will generate merged report at $basedir/target/jacoco/coverage/index.html. I will write a comprehensive document on applying Jacoco coverage to products. Thanks, Krishantha. On Wed, May 6, 2015 at 10:46 AM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You can't use TestCoverageGenerator anymore (We need to remove this class as well) . The merged report should be generated at the last test module with got executed as we merge all coverage data to common file. May be we can think of introducing pom file to do merging. If this option is not user friendly. Thanks, Krishantha. On Wed, May 6, 2015 at 10:24 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I am getting below error when merging the coverage reports. generateReports implementation is missing in CodeCoverageUtils. report module use the org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator to aggregate results. Exception in thread main java.lang.NoSuchMethodError: org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils.generateReports(Ljava/util/List;)V at org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator.main(TestCoverageGenerator.java:36) Thanks, Nuwanw On Tue, May 5, 2015 at 9:47 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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
Re: [Dev] Testing Jacoco based code coverage genration
Hi all, I have redesign Jacoco coverage generation a bit to support for coverage merging functionality. Now coverage data dump into $basedir/target/jacoco/coverage directory at the time of report generation, jacoco coverage data files are merged back to a single file (jacoco-data-merge.exec) and report will be generated using this merged data file. To merge multiple module test coverage data files. You can use pom file with exec-maven-plugin to execute org.wso2.carbon.automation.engine.frameworkutils.TestCoverageGenerator class. This will generate merged report at $basedir/target/jacoco/coverage/index.html. I will write a comprehensive document on applying Jacoco coverage to products. Thanks, Krishantha. On Wed, May 6, 2015 at 10:46 AM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You can't use TestCoverageGenerator anymore (We need to remove this class as well) . The merged report should be generated at the last test module with got executed as we merge all coverage data to common file. May be we can think of introducing pom file to do merging. If this option is not user friendly. Thanks, Krishantha. On Wed, May 6, 2015 at 10:24 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I am getting below error when merging the coverage reports. generateReports implementation is missing in CodeCoverageUtils. report module use the org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator to aggregate results. Exception in thread main java.lang.NoSuchMethodError: org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils.generateReports(Ljava/util/List;)V at org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator.main(TestCoverageGenerator.java:36) Thanks, Nuwanw On Tue, May 5, 2015 at 9:47 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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
Re: [Dev] Testing Jacoco based code coverage genration
Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 71 668 4620 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Testing Jacoco based code coverage genration
Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 71 668 4620 -- Waruna Perera Senior Software Engineer - Test Automation Mobile: +94 77 3867037 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Testing Jacoco based code coverage genration
Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.:
Re: [Dev] Testing Jacoco based code coverage genration
Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 71 668 4620 -- Waruna Perera Senior Software Engineer - Test Automation Mobile: +94 77 3867037 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Krishantha Samaraweera Senior Technical Lead - Test Automation
Re: [Dev] Testing Jacoco based code coverage genration
Hi Nuwan, You can't use TestCoverageGenerator anymore (We need to remove this class as well) . The merged report should be generated at the last test module with got executed as we merge all coverage data to common file. May be we can think of introducing pom file to do merging. If this option is not user friendly. Thanks, Krishantha. On Wed, May 6, 2015 at 10:24 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I am getting below error when merging the coverage reports. generateReports implementation is missing in CodeCoverageUtils. report module use the org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator to aggregate results. Exception in thread main java.lang.NoSuchMethodError: org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils.generateReports(Ljava/util/List;)V at org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator.main(TestCoverageGenerator.java:36) Thanks, Nuwanw On Tue, May 5, 2015 at 9:47 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency
Re: [Dev] Testing Jacoco based code coverage genration
Hi Krishantha, I am getting below error when merging the coverage reports. generateReports implementation is missing in CodeCoverageUtils. report module use the org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator to aggregate results. Exception in thread main java.lang.NoSuchMethodError: org.wso2.carbon.automation.engine.frameworkutils.CodeCoverageUtils.generateReports(Ljava/util/List;)V at org.wso2.carbon.integration.common.utils.coverage.TestCoverageGenerator.main(TestCoverageGenerator.java:36) Thanks, Nuwanw On Tue, May 5, 2015 at 9:47 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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
Re: [Dev] Testing Jacoco based code coverage genration
Yes. The correct implementation is org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. We will remove the CarbonServerExtension from utils to get rid of conflicts. Thanks, Nuwanw On Tue, May 5, 2015 at 9:27 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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
Re: [Dev] Testing Jacoco based code coverage genration
Hi Nuwan, You should remove org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension not the org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension. Thanks, Krishantha. On Wed, May 6, 2015 at 9:47 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi We should remove org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension from extensions. Then all the tests module should refer the correct class. Thanks, Nuwanw On Tue, May 5, 2015 at 8:49 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi Waruna, On Wed, May 6, 2015 at 9:12 AM, Waruna Perera waru...@wso2.com wrote: Hi Krishantha, And we need to update Automation.xml to use following class instead of one from utils. Please remove the CarbonServerExtension class at utils. Its was deprecated in last release and moved to test extensions to support for carbon kernel startup. Need to completely get rid of this extension class and its dependencies. Thanks, Krishantha. org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension Thanks On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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.;
Re: [Dev] Testing Jacoco based code coverage genration
Hi Nuwan, What is the exact issue ? Please check whether java.io.tmpdir directory is set to another in test module pom files. Normally coverage data should be appended to jacoco.exec file at tmp dir when running each test module. Thanks, Krishantha. On Tue, May 5, 2015 at 6:29 PM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Krishantha, I tried generating coverage in ESB. It is working fine and Coverage reports generated. However the coverage report aggregation seems not working when there are multiple tests modules. We need to fix the issue. test-automation-framework - 4.3.2-SNAPSHOT carbon-platform-integration-utils - 4.3.1-SNAPSHOT Thanks, Nuwanw On Wed, Apr 29, 2015 at 10:41 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Nuwan Wimalasekara Senior Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 71 668 4620 -- 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
Re: [Dev] Testing Jacoco based code coverage genration
Correction : Step #1 configuration should be as follows. execution idcopy-jacoco-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/jacoco/outputDirectory includeTypesjar/includeTypes includeArtifactIdsorg.jacoco.agent/includeArtifactIds /configuration /execution Thanks, Krishantha. On Thu, Apr 30, 2015 at 2:50 AM, Krishantha Samaraweera krishan...@wso2.com wrote: 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 idcopy-emma-dependencies/id phasecompile/phase goals goalcopy-dependencies/goal /goals configuration outputDirectory${project.build.directory}/emma/outputDirectory includeTypesjar/includeTypes includeArtifactIdsemma /includeArtifactIds /configuration /execution 2. Include jacoco argent as a dependency to root pom. dependency groupIdorg.jacoco/groupId artifactIdorg.jacoco.agent/artifactId version${jacoco.agent.version}/version /dependency jacoco.agent.version0.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. -- 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