Adding jacoco plugin

application-manager-new
megala21 7 years ago
parent 60f4bb4531
commit 155276da9b

@ -230,7 +230,8 @@ public class CarbonServerManagerExtension {
if(this.isCoverageEnable) {
try {
log.info("Generating Jacoco code coverage...");
this.generateCoverageReport(new File(this.carbonHome + File.separator + "repository" + File.separator + "components" + File.separator + "plugins" + File.separator));
this.generateCoverageReport(new File(this.carbonHome + File.separator + "wso2"
+ File.separator + "components" + File.separator + "plugins" + File.separator));
} catch (IOException var7) {
log.error("Failed to generate code coverage ", var7);
throw new AutomationFrameworkException("Failed to generate code coverage ", var7);

@ -90,18 +90,17 @@
<executions>
<execution>
<id>copy-emma-dependencies</id>
<id>copy-jacoco-dependencies</id>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/emma</outputDirectory>
<outputDirectory>${project.build.directory}/jacoco</outputDirectory>
<includeTypes>jar</includeTypes>
<includeArtifactIds>emma</includeArtifactIds>
<includeArtifactIds>org.jacoco.agent</includeArtifactIds>
</configuration>
</execution>
<execution>
<id>copy-secVerifier</id>
<phase>compile</phase>
@ -272,6 +271,10 @@
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
</dependency>
</dependencies>
<properties>

@ -32,7 +32,7 @@
<!--
Change this to true if you want to generate coverage statistics
-->
<coverage>false</coverage>
<coverage>true</coverage>
<!--
Change this to true if you want to enable framework dashboard
-->

@ -14,6 +14,7 @@ org.wso2.carbon.device.mgt.input.adapter.extension_
org.wso2.carbon.device.mgt.input.adapter.mqtt_
org.wso2.carbon.device.mgt.input.adapter.thrift_
org.wso2.carbon.device.mgt.input.adapter.xmpp_
org.wso2.carbon.device.mgt.input.adapter.http_
org.wso2.carbon.device.mgt.mobile.android_
org.wso2.carbon.device.mgt.mobile.windows_
org.wso2.carbon.device.mgt.mqtt.notification.listener_
@ -33,3 +34,7 @@ org.wso2.carbon.email.sender.core_
org.wso2.carbon.identity.jwt.client.extension_
org.wso2.carbon.identity.authenticator.backend.oauth_
org.wso2.carbon.webapp.authenticator.framework_
org.wso2.carbon.device.mgt.analytics.dashboard_
org.wso2.carbon.complex.policy.decision.point_
org.wso2.carbon.appmgt.mdm.osgiconnector_
org.wso2.carbon.appmgt.mdm.restconnector_

@ -91,20 +91,6 @@
<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-secVerifier</id>
<phase>compile</phase>

@ -32,7 +32,7 @@
<!--
Change this to true if you want to generate coverage statistics
-->
<coverage>false</coverage>
<coverage>true</coverage>
<!--
Change this to true if you want to enable framework dashboard
-->

@ -1,105 +0,0 @@
# -------------------------------------------------------------
#
# for user-editable property overrides use one of these options:
#
# (1) option-specific command line overrides, e.g.
# -Dreport.txt.out.file=coverage.txt
#
# (2) '-p <options file>' command line option,
#
# (3) 'emma.properties' resource placed somewhere in the classpath
# (e.g., in <jre dir>\classes directory -- note that it does
# not exist by default),
#
# (4) '-Demma.*' JVM options, e.g.
# -Demma.report.txt.out.file=coverage.txt
#
# (5) 'emma.properties' JVM option pointing to a properties file
# -Demma.properties=./myproperties.txt
# -------------------------------------------------------------
# -------------------------------------------------------------
# logging properties:
verbosity.level: none
# classloading properties:
#clsload.forced_delegation_filter:
#clsload.through_delegation_filter: -*
# -------------------------------------------------------------
# instrumentation properties:
instr.exclude_empty_classes: true
instr.exclude_synthetic_methods: true
instr.exclude_bridge_methods: true
instr.do_suid_compensation: true
# -------------------------------------------------------------
# runtime properties:
rt.control: false
rt.control.host: localhost
#rt.control.port: 44444
rt.filelock: true
#rt.filelock.portbase: 59141
rt.filelock.maxtime: 120000
rt.filelock.retries: 11
# -------------------------------------------------------------
# apprunner session data output properties:
session.out.file: coverage.es
session.out.merge: true
# -------------------------------------------------------------
# runtime coverage data output properties:
coverage.out.file: coverage.ec
coverage.out.merge: true
# -------------------------------------------------------------
# instr metadata output properties:
metadata.out.file: coverage.em
metadata.out.merge: true
# -------------------------------------------------------------
# common report defaults:
report.units: instr
report.depth: method
report.columns: name, line, block, method, class
report.sort: -line,-block,-method,-class,+name
report.metrics: method:40,block:80,line:40,class:100
# -------------------------------------------------------------
# txt report properties:
report.txt.depth: all
report.txt.columns: class,method,block,line,name
report.txt.out.file: coverage.txt
# -------------------------------------------------------------
# html report properties:
#report.html.out.dir: coverage
#report.html.out.file: /Users/azeez/Desktop/coverage/index.html
report.html.out.encoding: ISO-8859-1
# -------------------------------------------------------------
# xml report properties:
#report.xml.out.file: coverage.xml
report.xml.out.encoding: UTF-8
# -------------------------------------------------------------
# end of file

@ -50,7 +50,7 @@
<dependency>
<groupId>org.wso2.carbon.automation</groupId>
<artifactId>org.wso2.carbon.automation.engine</artifactId>
<version>${test.framework.version}</version>
<version>${platform.integration.utils.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
@ -1596,7 +1596,7 @@
<carbon.automationutils.version>4.4.2</carbon.automationutils.version>
<carbon.automation.jmeter.version>4.2.7</carbon.automation.jmeter.version>
<xfer.version>3.3.0</xfer.version>
<jacoco.agent.version>0.7.4.201502262128</jacoco.agent.version>
<jacoco.agent.version>0.7.5.201505241946</jacoco.agent.version>
<commons.logging.version>1.1.1</commons.logging.version>
<commons.lang3.version>3.3.2</commons.lang3.version>
<commons.lang.version>2.2</commons.lang.version>

Loading…
Cancel
Save