From ddf7121315edd5845cd03473ac588de9d91bf311 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 8 Sep 2017 01:51:28 +0530 Subject: [PATCH 1/4] Adding initial jacoco plugin --- .../CarbonServerManagerExtension.java | 3 +- modules/integration/tests-integration/pom.xml | 11 +- .../src/test/resources/automation.xml | 2 +- .../src/test/resources/instrumentation.txt | 3 +- modules/integration/tests-iot-web-ui/pom.xml | 14 --- .../src/test/resources/automation.xml | 2 +- .../src/test/resources/emma.properties | 105 ------------------ pom.xml | 4 +- 8 files changed, 15 insertions(+), 129 deletions(-) delete mode 100644 modules/integration/tests-iot-web-ui/src/test/resources/emma.properties diff --git a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java index cc7f1576..5256761b 100644 --- a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java +++ b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java @@ -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); diff --git a/modules/integration/tests-integration/pom.xml b/modules/integration/tests-integration/pom.xml index 2b0ef4d4..044feb65 100644 --- a/modules/integration/tests-integration/pom.xml +++ b/modules/integration/tests-integration/pom.xml @@ -90,18 +90,17 @@ - copy-emma-dependencies + copy-jacoco-dependencies compile copy-dependencies - ${project.build.directory}/emma + ${project.build.directory}/jacoco jar - emma + org.jacoco.agent - copy-secVerifier compile @@ -272,6 +271,10 @@ org.eclipse.paho org.eclipse.paho.client.mqttv3 + + org.jacoco + org.jacoco.agent + diff --git a/modules/integration/tests-integration/src/test/resources/automation.xml b/modules/integration/tests-integration/src/test/resources/automation.xml index 249ba192..0e5fe5a9 100644 --- a/modules/integration/tests-integration/src/test/resources/automation.xml +++ b/modules/integration/tests-integration/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - false + true diff --git a/modules/integration/tests-integration/src/test/resources/instrumentation.txt b/modules/integration/tests-integration/src/test/resources/instrumentation.txt index 8f3eacdd..4ffdd2fd 100644 --- a/modules/integration/tests-integration/src/test/resources/instrumentation.txt +++ b/modules/integration/tests-integration/src/test/resources/instrumentation.txt @@ -32,4 +32,5 @@ org.wso2.carbon.certificate.mgt.core_ 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_ \ No newline at end of file +org.wso2.carbon.webapp.authenticator.framework_ +org.wso2.carbon.device.mgt.analytics.dashboard_ \ No newline at end of file diff --git a/modules/integration/tests-iot-web-ui/pom.xml b/modules/integration/tests-iot-web-ui/pom.xml index 76c5611a..49d31d84 100644 --- a/modules/integration/tests-iot-web-ui/pom.xml +++ b/modules/integration/tests-iot-web-ui/pom.xml @@ -91,20 +91,6 @@ maven-dependency-plugin - - - copy-emma-dependencies - compile - - copy-dependencies - - - ${project.build.directory}/emma - jar - emma - - - copy-secVerifier compile diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml index af4b314e..e0d27299 100644 --- a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml +++ b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - false + true diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties b/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties deleted file mode 100644 index 9c48e81b..00000000 --- a/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties +++ /dev/null @@ -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 ' command line option, -# -# (3) 'emma.properties' resource placed somewhere in the classpath -# (e.g., in \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 - diff --git a/pom.xml b/pom.xml index a9e8ab09..564f7f37 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ org.wso2.carbon.automation org.wso2.carbon.automation.engine - ${test.framework.version} + ${platform.integration.utils.version} org.slf4j @@ -1596,7 +1596,7 @@ 4.4.2 4.2.7 3.3.0 - 0.7.4.201502262128 + 0.7.5.201505241946 1.1.1 3.3.2 2.2 From da191f38df3550e64b1a4e54e1537cf90250bcd9 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 8 Sep 2017 02:10:23 +0530 Subject: [PATCH 2/4] Revert "Adding initial jacoco plugin" This reverts commit ddf7121315edd5845cd03473ac588de9d91bf311. --- .../CarbonServerManagerExtension.java | 3 +- modules/integration/tests-integration/pom.xml | 11 +- .../src/test/resources/automation.xml | 2 +- .../src/test/resources/instrumentation.txt | 3 +- modules/integration/tests-iot-web-ui/pom.xml | 14 +++ .../src/test/resources/automation.xml | 2 +- .../src/test/resources/emma.properties | 105 ++++++++++++++++++ pom.xml | 4 +- 8 files changed, 129 insertions(+), 15 deletions(-) create mode 100644 modules/integration/tests-iot-web-ui/src/test/resources/emma.properties diff --git a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java index 5256761b..cc7f1576 100644 --- a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java +++ b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java @@ -230,8 +230,7 @@ public class CarbonServerManagerExtension { if(this.isCoverageEnable) { try { log.info("Generating Jacoco code coverage..."); - this.generateCoverageReport(new File(this.carbonHome + File.separator + "wso2" - + File.separator + "components" + File.separator + "plugins" + File.separator)); + this.generateCoverageReport(new File(this.carbonHome + File.separator + "repository" + 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); diff --git a/modules/integration/tests-integration/pom.xml b/modules/integration/tests-integration/pom.xml index 044feb65..2b0ef4d4 100644 --- a/modules/integration/tests-integration/pom.xml +++ b/modules/integration/tests-integration/pom.xml @@ -90,17 +90,18 @@ - copy-jacoco-dependencies + copy-emma-dependencies compile copy-dependencies - ${project.build.directory}/jacoco + ${project.build.directory}/emma jar - org.jacoco.agent + emma + copy-secVerifier compile @@ -271,10 +272,6 @@ org.eclipse.paho org.eclipse.paho.client.mqttv3 - - org.jacoco - org.jacoco.agent - diff --git a/modules/integration/tests-integration/src/test/resources/automation.xml b/modules/integration/tests-integration/src/test/resources/automation.xml index 0e5fe5a9..249ba192 100644 --- a/modules/integration/tests-integration/src/test/resources/automation.xml +++ b/modules/integration/tests-integration/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - true + false diff --git a/modules/integration/tests-integration/src/test/resources/instrumentation.txt b/modules/integration/tests-integration/src/test/resources/instrumentation.txt index 4ffdd2fd..8f3eacdd 100644 --- a/modules/integration/tests-integration/src/test/resources/instrumentation.txt +++ b/modules/integration/tests-integration/src/test/resources/instrumentation.txt @@ -32,5 +32,4 @@ org.wso2.carbon.certificate.mgt.core_ 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_ \ No newline at end of file +org.wso2.carbon.webapp.authenticator.framework_ \ No newline at end of file diff --git a/modules/integration/tests-iot-web-ui/pom.xml b/modules/integration/tests-iot-web-ui/pom.xml index 49d31d84..76c5611a 100644 --- a/modules/integration/tests-iot-web-ui/pom.xml +++ b/modules/integration/tests-iot-web-ui/pom.xml @@ -91,6 +91,20 @@ maven-dependency-plugin + + + copy-emma-dependencies + compile + + copy-dependencies + + + ${project.build.directory}/emma + jar + emma + + + copy-secVerifier compile diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml index e0d27299..af4b314e 100644 --- a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml +++ b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - true + false diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties b/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties new file mode 100644 index 00000000..9c48e81b --- /dev/null +++ b/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties @@ -0,0 +1,105 @@ +# ------------------------------------------------------------- +# +# 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 ' command line option, +# +# (3) 'emma.properties' resource placed somewhere in the classpath +# (e.g., in \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 + diff --git a/pom.xml b/pom.xml index 564f7f37..a9e8ab09 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ org.wso2.carbon.automation org.wso2.carbon.automation.engine - ${platform.integration.utils.version} + ${test.framework.version} org.slf4j @@ -1596,7 +1596,7 @@ 4.4.2 4.2.7 3.3.0 - 0.7.5.201505241946 + 0.7.4.201502262128 1.1.1 3.3.2 2.2 From 6ca109ada7f07558515f9084e4c8658e2e3debd6 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 8 Sep 2017 02:13:08 +0530 Subject: [PATCH 3/4] Adding jacoco plugin --- .../CarbonServerManagerExtension.java | 3 +- modules/integration/tests-integration/pom.xml | 11 +- .../src/test/resources/automation.xml | 2 +- .../src/test/resources/instrumentation.txt | 7 +- modules/integration/tests-iot-web-ui/pom.xml | 14 --- .../src/test/resources/automation.xml | 2 +- .../src/test/resources/emma.properties | 105 ------------------ pom.xml | 4 +- 8 files changed, 19 insertions(+), 129 deletions(-) delete mode 100644 modules/integration/tests-iot-web-ui/src/test/resources/emma.properties diff --git a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java index cc7f1576..5256761b 100644 --- a/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java +++ b/modules/integration/tests-common/integration-common/src/main/java/org/wso2/iot/integration/common/extensions/CarbonServerManagerExtension.java @@ -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); diff --git a/modules/integration/tests-integration/pom.xml b/modules/integration/tests-integration/pom.xml index 2b0ef4d4..044feb65 100644 --- a/modules/integration/tests-integration/pom.xml +++ b/modules/integration/tests-integration/pom.xml @@ -90,18 +90,17 @@ - copy-emma-dependencies + copy-jacoco-dependencies compile copy-dependencies - ${project.build.directory}/emma + ${project.build.directory}/jacoco jar - emma + org.jacoco.agent - copy-secVerifier compile @@ -272,6 +271,10 @@ org.eclipse.paho org.eclipse.paho.client.mqttv3 + + org.jacoco + org.jacoco.agent + diff --git a/modules/integration/tests-integration/src/test/resources/automation.xml b/modules/integration/tests-integration/src/test/resources/automation.xml index 249ba192..0e5fe5a9 100644 --- a/modules/integration/tests-integration/src/test/resources/automation.xml +++ b/modules/integration/tests-integration/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - false + true diff --git a/modules/integration/tests-integration/src/test/resources/instrumentation.txt b/modules/integration/tests-integration/src/test/resources/instrumentation.txt index 8f3eacdd..8e73b3de 100644 --- a/modules/integration/tests-integration/src/test/resources/instrumentation.txt +++ b/modules/integration/tests-integration/src/test/resources/instrumentation.txt @@ -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_ @@ -32,4 +33,8 @@ org.wso2.carbon.certificate.mgt.core_ 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_ \ No newline at end of file +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_ diff --git a/modules/integration/tests-iot-web-ui/pom.xml b/modules/integration/tests-iot-web-ui/pom.xml index 76c5611a..49d31d84 100644 --- a/modules/integration/tests-iot-web-ui/pom.xml +++ b/modules/integration/tests-iot-web-ui/pom.xml @@ -91,20 +91,6 @@ maven-dependency-plugin - - - copy-emma-dependencies - compile - - copy-dependencies - - - ${project.build.directory}/emma - jar - emma - - - copy-secVerifier compile diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml index af4b314e..e0d27299 100644 --- a/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml +++ b/modules/integration/tests-iot-web-ui/src/test/resources/automation.xml @@ -32,7 +32,7 @@ - false + true diff --git a/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties b/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties deleted file mode 100644 index 9c48e81b..00000000 --- a/modules/integration/tests-iot-web-ui/src/test/resources/emma.properties +++ /dev/null @@ -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 ' command line option, -# -# (3) 'emma.properties' resource placed somewhere in the classpath -# (e.g., in \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 - diff --git a/pom.xml b/pom.xml index a9e8ab09..564f7f37 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ org.wso2.carbon.automation org.wso2.carbon.automation.engine - ${test.framework.version} + ${platform.integration.utils.version} org.slf4j @@ -1596,7 +1596,7 @@ 4.4.2 4.2.7 3.3.0 - 0.7.4.201502262128 + 0.7.5.201505241946 1.1.1 3.3.2 2.2 From e410d4d9bc2681765a0e93fb3784d866084ecb77 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 15 Sep 2017 17:20:30 +0530 Subject: [PATCH 4/4] Adding test cases for the android status API --- .../NewAndroidDeviceManagementAPI.jmx | 162 ++++++++++++++++++ .../android-enrollment-response-payloads.json | 2 +- pom.xml | 2 +- 3 files changed, 164 insertions(+), 2 deletions(-) diff --git a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/NewAndroidDeviceManagementAPI.jmx b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/NewAndroidDeviceManagementAPI.jmx index bd736ca4..f6f6147a 100644 --- a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/NewAndroidDeviceManagementAPI.jmx +++ b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/NewAndroidDeviceManagementAPI.jmx @@ -2166,6 +2166,15 @@ GEL4ZNjZ+jnwSkzwBU5vh/QS", + + + Status of android device that carries the id \u0027d24f870f390352a41000${DeviceID}\u0027 is ACTIVE + + Assertion.response_data + false + 16 + + true @@ -8702,6 +8711,159 @@ GEL4ZNjZ+jnwSkzwBU5vh/QS", + + + + + ${host} + ${https_port} + + + https + + /api/device-mgt/android/v1.0/devices/d24f870f390352a4${DeviceID} + DELETE + true + false + true + false + HttpClient4 + false + + + + + + + Authorization + Bearer ${access_token} + + + Content-Type + application/json + + + Accept + application/json + + + + + + + Android device that carries id \u0027d24f870f390352a4${DeviceID}\u0027 has successfully dis-enrolled + + Assertion.response_data + false + 16 + + + + + + + + ${host} + ${https_port} + + + https + + /api/device-mgt/android/v1.0/devices/d24f870f390352a4${DeviceID}/status + GET + true + false + true + false + HttpClient4 + false + + + + + + + Authorization + Bearer ${access_token} + + + Content-Type + application/json + + + Accept + application/json + + + + + + + Status of android device that carries the id \u0027d24f870f390352a4${DeviceID}\u0027 is REMOVED + + Assertion.response_data + false + 16 + + + + + + + + ${host} + ${https_port} + + + https + + /api/device-mgt/android/v1.0/devices/d24f870f390352sssa4${DeviceID}/status + GET + true + false + true + false + HttpClient4 + false + + + + + + + Authorization + Bearer ${access_token} + + + Content-Type + application/json + + + Accept + application/json + + + + + + + No Android device is found upon the id \u0027d24f870f390352sssa4${DeviceID}\u0027 + + Assertion.response_data + true + 16 + + + + + 404 + + Assertion.response_code + false + 8 + + + false diff --git a/modules/integration/tests-integration/src/test/resources/payloads/android-enrollment-response-payloads.json b/modules/integration/tests-integration/src/test/resources/payloads/android-enrollment-response-payloads.json index 2b158a47..86b0b010 100644 --- a/modules/integration/tests-integration/src/test/resources/payloads/android-enrollment-response-payloads.json +++ b/modules/integration/tests-integration/src/test/resources/payloads/android-enrollment-response-payloads.json @@ -5,7 +5,7 @@ }, "GET": { "responseCode": "OK", - "responseMessage": "Android device that carries the id \u0027d24f870f390352a41234\u0027 is enrolled" + "responseMessage": "Status of android device that carries the id \u0027d24f870f390352a41234\u0027 is ACTIVE" }, "PUT": { "responseCode": "Accepted", diff --git a/pom.xml b/pom.xml index f4420105..82c46fd2 100644 --- a/pom.xml +++ b/pom.xml @@ -1524,7 +1524,7 @@ ${project.version} - 4.0.76 + 4.0.80 6.1.95