Merge branch 'wso2-master' into test-merge

application-manager-new
sinthuja 8 years ago
commit c3743ea163

@ -673,36 +673,17 @@
<mkdir dir="${tempdir}" />
<mkdir dir="${tempdir}/api-application-registration" />
<mkdir dir="${tempdir}/api#certificate-mgt#v1.0" />
<mkdir dir="${tempdir}/api#identity#entitlement" />
<mkdir dir="${tempdir}/api#scep-mgt#v1.0" />
<mkdir dir="${tempdir}/authenticationendpoint" />
<mkdir dir="${tempdir}/client-registration#v0.11" />
<mkdir dir="${tempdir}/oauth2" />
<mkdir dir="${tempdir}/secured-websocket" />
<mkdir dir="${tempdir}/shindig" />
<unzip dest="${tempdir}/api-application-registration">
<fileset dir="${srcdir}">
<include name="api-application-registration.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/api#certificate-mgt#v1.0">
<fileset dir="${srcdir}">
<include name="api#certificate-mgt#v1.0.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/api#identity#entitlement">
<fileset dir="${srcdir}">
<include name="api#identity#entitlement.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/api#scep-mgt#v1.0">
<fileset dir="${srcdir}">
<include name="api#scep-mgt#v1.0.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/authenticationendpoint">
<fileset dir="${srcdir}">
<include name="authenticationendpoint.war" />
@ -718,25 +699,16 @@
<include name="oauth2.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/secured-websocket">
<fileset dir="${srcdir}">
<include name="secured-websocket.war" />
</fileset>
</unzip>
<unzip dest="${tempdir}/shindig">
<fileset dir="${srcdir}">
<include name="shindig.war" />
</fileset>
</unzip>
<delete file="${tempdir}/api-application-registration/WEB-INF/web.xml" />
<delete file="${tempdir}/api#certificate-mgt#v1.0/WEB-INF/web.xml" />
<delete file="${tempdir}/api#identity#entitlement/WEB-INF/web.xml" />
<delete file="${tempdir}/api#scep-mgt#v1.0/WEB-INF/web.xml" />
<delete file="${tempdir}/authenticationendpoint/WEB-INF/web.xml" />
<delete file="${tempdir}/client-registration#v0.11/WEB-INF/web.xml" />
<delete file="${tempdir}/oauth2/WEB-INF/web.xml" />
<delete file="${tempdir}/secured-websocket/WEB-INF/web.xml" />
<delete file="${tempdir}/shindig/WEB-INF/web.xml" />
<!--<delete>-->
@ -764,24 +736,16 @@
<!--<fileset dir="${tempdir}/shindig/WEB-INF/lib" includes="*" />-->
<!--</delete>-->
<copy file="src/core/resources/web-apps/web-xml/api-application-registration/web.xml" tofile="${tempdir}/api-application-registration/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/api#certificate-mgt#v1.0/web.xml" tofile="${tempdir}/api#certificate-mgt#v1.0/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/api#identity#entitlement/web.xml" tofile="${tempdir}/api#identity#entitlement/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/api#scep-mgt#v1.0/web.xml" tofile="${tempdir}/api#scep-mgt#v1.0/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/authenticationendpoint/web.xml" tofile="${tempdir}/authenticationendpoint/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/client-registration#v0.11/web.xml" tofile="${tempdir}/client-registration#v0.11/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/oauth2/web.xml" tofile="${tempdir}/oauth2/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/secured-websocket/web.xml" tofile="${tempdir}/secured-websocket/WEB-INF/web.xml" />
<copy file="src/core/resources/web-apps/web-xml/shindig/web.xml" tofile="${tempdir}/shindig/WEB-INF/web.xml" />
<zip destfile="${tempdir}/api-application-registration.war" basedir="${tempdir}/api-application-registration" />
<zip destfile="${tempdir}/api#certificate-mgt#v1.0.war" basedir="${tempdir}/api#certificate-mgt#v1.0" />
<zip destfile="${tempdir}/api#identity#entitlement.war" basedir="${tempdir}/api#identity#entitlement" />
<zip destfile="${tempdir}/api#scep-mgt#v1.0.war" basedir="${tempdir}/api#scep-mgt#v1.0" />
<zip destfile="${tempdir}/authenticationendpoint.war" basedir="${tempdir}/authenticationendpoint" />
<zip destfile="${tempdir}/client-registration#v0.11.war" basedir="${tempdir}/client-registration#v0.11" />
<zip destfile="${tempdir}/oauth2.war" basedir="${tempdir}/oauth2" />
<zip destfile="${tempdir}/secured-websocket.war" basedir="${tempdir}/secured-websocket" />
<zip destfile="${tempdir}/shindig.war" basedir="${tempdir}/shindig" />
<mkdir dir="${tempdir}/registry"/>

@ -460,7 +460,7 @@
</excludes>
</fileSet>
<!-- Copying Windows Synapse files -->
<!-- Copying Android Mutual SSL and Windows Synapse files -->
<fileSet>
<directory>
../p2-profile/iot-core-profile/target/wso2carbon-core-${carbon.kernel.version}/wso2/deployment/server/synapse-configs/default/api/
@ -1493,20 +1493,6 @@
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/api-application-registration.war</source>
<outputDirectory>
${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/api#scep-mgt#v1.0.war</source>
<outputDirectory>
${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/client-registration#v0.11.war</source>
<outputDirectory>
@ -1514,20 +1500,6 @@
</outputDirectory>
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/secured-websocket.war</source>
<outputDirectory>
${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/api#certificate-mgt#v1.0.war</source>
<outputDirectory>
${pom.artifactId}-${pom.version}/repository/deployment/server/webapps
</outputDirectory>
<fileMode>755</fileMode>
</file>
<file>
<source>target/webapp-temp/api#identity#entitlement.war</source>
<outputDirectory>
@ -1602,6 +1574,14 @@
${pom.artifactId}-${pom.version}/conf/
</outputDirectory>
</file>
<file>
<source>
../p2-profile/iot-core-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/social.xml
</source>
<outputDirectory>
${pom.artifactId}-${pom.version}/conf/
</outputDirectory>
</file>
<file>
<source>
../p2-profile/iot-core-profile/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/identity/entitlement.properties

@ -207,6 +207,6 @@
</repository>
</repositories>
<properties>
<carbon.device.mgt.plugin.version>3.0.27</carbon.device.mgt.plugin.version>
<carbon.device.mgt.plugin.version>3.0.30</carbon.device.mgt.plugin.version>
</properties>
</project>

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Certificate-Webapp</display-name>
<servlet>
<description>JAX-WS/JAX-RS Certificate Management Endpoint</description>
<display-name>JAX-WS/JAX-RS Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<init-param>
<param-name>swagger.security.filter</param-name>
<param-value>ApiAuthorizationFilterImpl</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<context-param>
<param-name>isAdminService</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>doAuthentication</param-name>
<param-value>true</param-value>
</context-param>
<!--publish to apim-->
<context-param>
<param-name>managed-api-enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>CertificateMgt-Admin</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<filter>
<filter-name>ApiOriginFilter</filter-name>
<filter-class>org.wso2.carbon.certificate.mgt.cert.jaxrs.api.util.ApiOriginFilter</filter-class>
</filter>
<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsEnabled</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<filter-class>org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter</filter-class>
<init-param>
<param-name>patterns</param-name>
<param-value>text/html" ,application/json" ,text/plain</param-value>
</init-param>
<init-param>
<param-name>filterAction</param-name>
<param-value>enforce</param-value>
</init-param>
<init-param>
<param-name>httpHeaders</param-name>
<param-value>Cache-Control: no-store, no-cache, must-revalidate, private</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ApiOriginFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Certificate-Webapp</display-name>
<servlet>
<description>JAX-WS/JAX-RS Certificate Management Endpoint</description>
<display-name>JAX-WS/JAX-RS Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
<context-param>
<param-name>isAdminService</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>doAuthentication</param-name>
<param-value>true</param-value>
</context-param>
<!--publish to apim-->
<context-param>
<param-name>managed-api-enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsEnabled</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<filter-class>org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter</filter-class>
<init-param>
<param-name>patterns</param-name>
<param-value>text/html" ,application/json" ,text/plain</param-value>
</init-param>
<init-param>
<param-name>filterAction</param-name>
<param-value>enforce</param-value>
</init-param>
<init-param>
<param-name>httpHeaders</param-name>
<param-value>Cache-Control: no-store, no-cache, must-revalidate, private</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -1,103 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
metadata-complete="true">
<display-name>WSO2 IoT Server</display-name>
<description>WSO2 IoT Server</description>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>isAdminService</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>doAuthentication</param-name>
<param-value>true</param-value>
</context-param>
<!--publish to apim-->
<context-param>
<param-name>managed-api-enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>managed-api-owner</param-name>
<param-value>admin</param-value>
</context-param>
<filter>
<filter-name>ApiPermissionFilter</filter-name>
<filter-class>org.wso2.carbon.apimgt.application.extension.api.filter.ApiPermissionFilter</filter-class>
</filter>
<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsEnabled</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<filter-class>org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter</filter-class>
<init-param>
<param-name>patterns</param-name>
<param-value>text/html" ,application/json" ,text/plain</param-value>
</init-param>
<init-param>
<param-name>filterAction</param-name>
<param-value>enforce</param-value>
</init-param>
<init-param>
<param-name>httpHeaders</param-name>
<param-value>Cache-Control: no-store, no-cache, must-revalidate, private</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ApiPermissionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -1,61 +0,0 @@
<!--
~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Output WebSocket</display-name>
<filter>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>
<init-param>
<param-name>hstsEnabled</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<filter-class>org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter</filter-class>
<init-param>
<param-name>patterns</param-name>
<param-value>text/html" ,application/json" ,text/plain</param-value>
</init-param>
<init-param>
<param-name>filterAction</param-name>
<param-value>enforce</param-value>
</init-param>
<init-param>
<param-name>httpHeaders</param-name>
<param-value>Cache-Control: no-store, no-cache, must-revalidate, private</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>HttpHeaderSecurityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ContentTypeBasedCachePreventionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -36,9 +36,8 @@ public class AndroidDeviceManagementAPIJmeterTestCase {
@Test()
public void permutationTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource(
"jmeter-scripts/AndroidDeviceManagementAPIAdditionalPermutations.jmx");
JMeterTest script = new JMeterTest(
new File(url.getPath()));
"jmeter-scripts" + File.separator + "AndroidDeviceManagementAPIAdditionalPermutations.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running permutation test using jmeter scripts");
manager.runTest(script);
@ -46,13 +45,11 @@ public class AndroidDeviceManagementAPIJmeterTestCase {
@Test(dependsOnMethods = {"permutationTest"})
public void listServices() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource(
"jmeter-scripts/NewAndroidDeviceManagementAPI.jmx");
JMeterTest script = new JMeterTest(
new File(url.getPath()));
URL url = Thread.currentThread().getContextClassLoader()
.getResource("jmeter-scripts" + File.separator + "NewAndroidDeviceManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running API service test using jmeter scripts");
manager.runTest(script);
}
}

@ -0,0 +1,43 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.iot.integration.jmeter;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTest;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTestManager;
import java.io.File;
import java.net.URL;
/**
* This is to test the Device Management API scenarios, which gives a bad response.
*/
public class DeviceManagementAPINegativeTestCase {
@Test(description = "This test case tests the response when the APIs are called with invalid payloads and without"
+ " required parameters")
public void negativeTests() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader()
.getResource("jmeter-scripts" + File.separator + "AndroidDeviceManagementAPI_Negative_Tests.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
manager.runTest(script);
}
}

@ -0,0 +1,46 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.iot.integration.jmeter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTest;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTestManager;
import java.io.File;
import java.net.URL;
/**
* This test case is used to run the jmeter test cases related with Group Management APIs.
*/
public class GroupManagementJMeterTestCase {
private static Log log = LogFactory.getLog(GroupManagementJMeterTestCase.class);
@Test(description = "This test case tests the Group Management APIs")
public void GroupManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader()
.getResource("jmeter-scripts" + File.separator + "GroupManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running group management api test cases using jmeter scripts");
manager.runTest(script);
}
}

@ -0,0 +1,46 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.iot.integration.jmeter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTest;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTestManager;
import java.io.File;
import java.net.URL;
/**
* This class tests the Notification Management APIs
*/
public class NotificationManagementAPIJMeterTestCase {
private static Log log = LogFactory.getLog(NotificationManagementAPIJMeterTestCase.class);
@Test(description = "This test case tests the Notification Management APIs")
public void NotificationManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader()
.getResource("jmeter-scripts" + File.separator + "NotificationManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running notification management api test cases using jmeter scripts");
manager.runTest(script);
}
}

@ -0,0 +1,46 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.wso2.iot.integration.jmeter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTest;
import org.wso2.carbon.automation.extensions.jmeter.JMeterTestManager;
import java.io.File;
import java.net.URL;
/**
* This test case is used to run the jmeter test cases related with Policy Management APIs.
*/
public class PolicyManagementJMeterTestCase {
private static Log log = LogFactory.getLog(PolicyManagementJMeterTestCase.class);
@Test(description = "This test case tests the Policy Management APIs")
public void PolicyManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader()
.getResource("jmeter-scripts" + File.separator + "PolicyManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running policy management api test cases using jmeter scripts");
manager.runTest(script);
}
}

@ -53,7 +53,7 @@ public class MobileDeviceManagement extends TestBase {
@Test(description = "Test getting devices")
public void testViewDevices() throws Exception {
int expectedCount = this.userMode == TestUserMode.TENANT_ADMIN ? 1 : 23;
int expectedCount = this.userMode == TestUserMode.TENANT_ADMIN ? 3 : 23;
HttpResponse response = client.get(Constants.MobileDeviceManagement.GET_ALL_DEVICES_ENDPOINT);
Assert.assertEquals(HttpStatus.SC_OK, response.getResponseCode());
JsonObject devices = new JsonParser().parse(response.getData()).getAsJsonObject();
@ -62,7 +62,7 @@ public class MobileDeviceManagement extends TestBase {
@Test(description = "Test getting devices")
public void testGetUserDevices() throws Exception {
int expectedCount = this.userMode == TestUserMode.TENANT_ADMIN ? 1 : 13;
int expectedCount = this.userMode == TestUserMode.TENANT_ADMIN ? 3 : 13;
HttpResponse response = client.get(Constants.MobileDeviceManagement.GET_ALL_DEVICES_ENDPOINT
+ Constants.MobileDeviceManagement.USER_DEVICE_ENDPOINT);
Assert.assertEquals(HttpStatus.SC_OK, response.getResponseCode());

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.9" jmeter="3.0 r1743807">
<jmeterTestPlan version="1.2" properties="2.2">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Android Device Management API" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@ -45,12 +45,12 @@
</elementProp>
<elementProp name="https_port" elementType="Argument">
<stringProp name="Argument.name">https_port</stringProp>
<stringProp name="Argument.value">9443</stringProp>
<stringProp name="Argument.value">8243</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="http_port" elementType="Argument">
<stringProp name="Argument.name">http_port</stringProp>
<stringProp name="Argument.value">9763</stringProp>
<stringProp name="Argument.value">8280</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="token_ep_host" elementType="Argument">
@ -60,7 +60,12 @@
</elementProp>
<elementProp name="token_ep_port" elementType="Argument">
<stringProp name="Argument.name">token_ep_port</stringProp>
<stringProp name="Argument.value">9763</stringProp>
<stringProp name="Argument.value">8280</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="https_management_port" elementType="Argument">
<stringProp name="Argument.name">https_management_port</stringProp>
<stringProp name="Argument.value">9443</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
</collectionProp>
@ -108,7 +113,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -136,7 +141,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://org.apache.axis2/xsd&quot; xmlns:xsd1=&quot;http://common.mgt.user.carbon.wso2.org/xsd&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -162,7 +167,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -189,7 +194,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -217,7 +222,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd=&quot;http://org.apache.axis2/xsd&quot; xmlns:xsd1=&quot;http://common.mgt.user.carbon.wso2.org/xsd&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -243,7 +248,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -264,7 +269,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -292,7 +297,7 @@
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="SoapSampler.URL_DATA">https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/</stringProp>
<stringProp name="HTTPSamper.xml_data">&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:aut=&quot;http://authentication.services.core.carbon.wso2.org&quot;&gt;
&lt;soapenv:Header/&gt;
&lt;soapenv:Body&gt;
@ -312,12 +317,10 @@
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{ &#xd;
&quot;callbackUrl&quot;:&quot;www.google.lk&quot;,&#xd;
&quot;clientName&quot;:&quot;app_${randAppNum}&quot;,&#xd;
&quot;tokenScope&quot;:&quot;Production&quot;,&#xd;
&quot;owner&quot;:&quot;user111&quot;,&#xd;
&quot;grantType&quot;:&quot;password refresh_token&quot;,&#xd;
&quot;saasApp&quot;:true&#xd;
&quot;applicationName&quot;:&quot;app_${randAppNum}&quot;,&#xd;
&quot;isAllowedToAllDomains&quot;:false,&#xd;
&quot;tags&quot;:[&quot;android&quot;, &quot;device_management&quot;],&#xd;
&quot;isMappingAnExistingOAuthApp&quot;:false&#xd;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
@ -329,7 +332,7 @@
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/api/appm/oauth/v1.0/register</stringProp>
<stringProp name="HTTPSampler.path">/api-application-registration/register</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -348,7 +351,7 @@
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Host</stringProp>
<stringProp name="Header.value">10.100.1.90:9763</stringProp>
<stringProp name="Header.value">localhost:9763</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
@ -360,7 +363,7 @@
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="ClientID Extractor" enabled="true">
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
<stringProp name="RegexExtractor.refname">clientId</stringProp>
<stringProp name="RegexExtractor.regex">&quot;clientId&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.regex">&quot;client_id&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default">0</stringProp>
<stringProp name="RegexExtractor.match_number">1</stringProp>
@ -369,7 +372,7 @@
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="ClientSecret Extractor" enabled="true">
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
<stringProp name="RegexExtractor.refname">clientSecret</stringProp>
<stringProp name="RegexExtractor.regex">&quot;clientSecret&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.regex">&quot;client_secret&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default">0</stringProp>
<stringProp name="RegexExtractor.match_number">1</stringProp>
@ -416,7 +419,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
</elementProp>
<elementProp name="scope" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<stringProp name="Argument.value">appm:subscribe device:view activity:view device:android:operation:change-lock device:admin:view configuration:view device:android:enroll user:view</stringProp>
<stringProp name="Argument.value">perm:android:enroll perm:android:wipe perm:android:ring perm:android:lock-devices perm:android:configure-vpn perm:android:configure-wifi perm:android:enroll perm:android:uninstall-application perm:android:manage-configuration perm:android:location perm:android:install-application perm:android:mute perm:android:change-lock-code perm:android:blacklist-applications perm:android:set-password-policy perm:android:encrypt-storage perm:android:clear-password perm:android:enterprise-wipe perm:android:info perm:android:view-configuration perm:android:upgrade-firmware perm:android:set-webclip perm:android:send-notification perm:android:disenroll perm:android:update-application perm:android:unlock-devices perm:android:control-camera perm:android:reboot perm:android:logcat appm:subscribe perm:sign-csr perm:admin:devices:view perm:roles:add perm:roles:add-users perm:roles:update perm:roles:permissions perm:roles:details perm:roles:view perm:roles:create-combined-role perm:roles:delete perm:dashboard:vulnerabilities perm:dashboard:non-compliant-count perm:dashboard:non-compliant perm:dashboard:by-groups perm:dashboard:device-counts perm:dashboard:feature-non-compliant perm:dashboard:count-overview perm:dashboard:filtered-count perm:dashboard:details perm:get-activity perm:devices:delete perm:devices:applications perm:devices:effective-policy perm:devices:compliance-data perm:devices:features perm:devices:operations perm:devices:search perm:devices:details perm:devices:update perm:devices:view perm:view-configuration perm:manage-configuration perm:policies:remove perm:policies:priorities perm:policies:deactivate perm:policies:get-policy-details perm:policies:manage perm:policies:activate perm:policies:update perm:policies:changes perm:policies:get-details perm:users:add perm:users:details perm:users:count perm:users:delete perm:users:roles perm:users:user-details perm:users:credentials perm:users:search perm:users:is-exist perm:users:update perm:users:send-invitation perm:admin-users:view perm:groups:devices perm:groups:update perm:groups:add perm:groups:device perm:groups:devices-count perm:groups:remove perm:groups:groups perm:groups:groups-view perm:groups:share perm:groups:count perm:groups:roles perm:groups:devices-remove perm:groups:devices-add perm:groups:assign perm:device-types:features perm:device-types:types perm:applications:install perm:applications:uninstall perm:admin-groups:count perm:admin-groups:view perm:notifications:mark-checked perm:notifications:view perm:admin:certificates:delete perm:admin:certificates:details perm:admin:certificates:view perm:admin:certificates:add perm:admin:certificates:verify perm:ios:enroll perm:ios:view-device perm:ios:apn perm:ios:ldap perm:ios:enterprise-app perm:ios:store-application perm:ios:remove-application perm:ios:app-list perm:ios:profile-list perm:ios:lock perm:ios:enterprise-wipe perm:ios:device-info perm:ios:restriction perm:ios:email perm:ios:cellular perm:ios:applications perm:ios:wifi perm:ios:ring perm:ios:location perm:ios:notification perm:ios:airplay perm:ios:caldav perm:ios:cal-subscription perm:ios:passcode-policy perm:ios:webclip perm:ios:vpn perm:ios:per-app-vpn perm:ios:app-to-per-app-vpn perm:ios:app-lock perm:ios:clear-passcode perm:ios:remove-profile perm:ios:get-restrictions perm:ios:wipe-data perm:admin perm:android:applications</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">scope</stringProp>
@ -429,7 +432,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/oauth2/token</stringProp>
<stringProp name="HTTPSampler.path">/token</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -626,12 +629,10 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{ &#xd;
&quot;callbackUrl&quot;:&quot;www.google.lk&quot;,&#xd;
&quot;clientName&quot;:&quot;appp_${randAppNum}&quot;,&#xd;
&quot;tokenScope&quot;:&quot;Production&quot;,&#xd;
&quot;owner&quot;:&quot;admin&quot;,&#xd;
&quot;grantType&quot;:&quot;password refresh_token&quot;,&#xd;
&quot;saasApp&quot;:true&#xd;
&quot;applicationName&quot;:&quot;app_${randAppNum}&quot;,&#xd;
&quot;isAllowedToAllDomains&quot;:false,&#xd;
&quot;tags&quot;:[&quot;android&quot;, &quot;device_management&quot;],&#xd;
&quot;isMappingAnExistingOAuthApp&quot;:false&#xd;
}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
@ -643,7 +644,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/api/appm/oauth/v1.0/register</stringProp>
<stringProp name="HTTPSampler.path">/api-application-registration/register</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -662,7 +663,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Host</stringProp>
<stringProp name="Header.value">10.100.1.90:9763</stringProp>
<stringProp name="Header.value">localhost:9763</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">Content-Type</stringProp>
@ -674,7 +675,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="ClientID Extractor" enabled="true">
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
<stringProp name="RegexExtractor.refname">clientId</stringProp>
<stringProp name="RegexExtractor.regex">&quot;clientId&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.regex">&quot;client_id&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default">0</stringProp>
<stringProp name="RegexExtractor.match_number">1</stringProp>
@ -683,7 +684,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="ClientSecret Extractor" enabled="true">
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
<stringProp name="RegexExtractor.refname">clientSecret</stringProp>
<stringProp name="RegexExtractor.regex">&quot;clientSecret&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.regex">&quot;client_secret&quot;:&quot;(.+?)&quot;</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default">0</stringProp>
<stringProp name="RegexExtractor.match_number">1</stringProp>
@ -730,7 +731,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
</elementProp>
<elementProp name="scope" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<stringProp name="Argument.value">appm:subscribe device:view activity:view device:android:operation:change-lock device:admin:view configuration:view device:android:enroll user:view</stringProp>
<stringProp name="Argument.value">perm:android:enroll perm:android:wipe perm:android:ring perm:android:lock-devices perm:android:configure-vpn perm:android:configure-wifi perm:android:enroll perm:android:uninstall-application perm:android:manage-configuration perm:android:location perm:android:install-application perm:android:mute perm:android:change-lock-code perm:android:blacklist-applications perm:android:set-password-policy perm:android:encrypt-storage perm:android:clear-password perm:android:enterprise-wipe perm:android:info perm:android:view-configuration perm:android:upgrade-firmware perm:android:set-webclip perm:android:send-notification perm:android:disenroll perm:android:update-application perm:android:unlock-devices perm:android:control-camera perm:android:reboot perm:android:logcat appm:subscribe perm:sign-csr perm:admin:devices:view perm:roles:add perm:roles:add-users perm:roles:update perm:roles:permissions perm:roles:details perm:roles:view perm:roles:create-combined-role perm:roles:delete perm:dashboard:vulnerabilities perm:dashboard:non-compliant-count perm:dashboard:non-compliant perm:dashboard:by-groups perm:dashboard:device-counts perm:dashboard:feature-non-compliant perm:dashboard:count-overview perm:dashboard:filtered-count perm:dashboard:details perm:get-activity perm:devices:delete perm:devices:applications perm:devices:effective-policy perm:devices:compliance-data perm:devices:features perm:devices:operations perm:devices:search perm:devices:details perm:devices:update perm:devices:view perm:view-configuration perm:manage-configuration perm:policies:remove perm:policies:priorities perm:policies:deactivate perm:policies:get-policy-details perm:policies:manage perm:policies:activate perm:policies:update perm:policies:changes perm:policies:get-details perm:users:add perm:users:details perm:users:count perm:users:delete perm:users:roles perm:users:user-details perm:users:credentials perm:users:search perm:users:is-exist perm:users:update perm:users:send-invitation perm:admin-users:view perm:groups:devices perm:groups:update perm:groups:add perm:groups:device perm:groups:devices-count perm:groups:remove perm:groups:groups perm:groups:groups-view perm:groups:share perm:groups:count perm:groups:roles perm:groups:devices-remove perm:groups:devices-add perm:groups:assign perm:device-types:features perm:device-types:types perm:applications:install perm:applications:uninstall perm:admin-groups:count perm:admin-groups:view perm:notifications:mark-checked perm:notifications:view perm:admin:certificates:delete perm:admin:certificates:details perm:admin:certificates:view perm:admin:certificates:add perm:admin:certificates:verify perm:ios:enroll perm:ios:view-device perm:ios:apn perm:ios:ldap perm:ios:enterprise-app perm:ios:store-application perm:ios:remove-application perm:ios:app-list perm:ios:profile-list perm:ios:lock perm:ios:enterprise-wipe perm:ios:device-info perm:ios:restriction perm:ios:email perm:ios:cellular perm:ios:applications perm:ios:wifi perm:ios:ring perm:ios:location perm:ios:notification perm:ios:airplay perm:ios:caldav perm:ios:cal-subscription perm:ios:passcode-policy perm:ios:webclip perm:ios:vpn perm:ios:per-app-vpn perm:ios:app-to-per-app-vpn perm:ios:app-lock perm:ios:clear-passcode perm:ios:remove-profile perm:ios:get-restrictions perm:ios:wipe-data perm:admin perm:android:applications</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">scope</stringProp>
@ -743,7 +744,7 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/oauth2/token</stringProp>
<stringProp name="HTTPSampler.path">/token</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
@ -12424,9 +12425,9 @@ vars.put(&quot;base64encodedId&quot;,new String(encryptedId));</stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
<ResultSaver guiclass="ResultSaverGui" testclass="ResultSaver" testname="Save Responses to a file" enabled="false">
<ResultSaver guiclass="ResultSaverGui" testclass="ResultSaver" testname="Save Responses to a file" enabled="true">
<stringProp name="FileSaver.filename">Results</stringProp>
<boolProp name="FileSaver.errorsonly">false</boolProp>
<boolProp name="FileSaver.errorsonly">true</boolProp>
<boolProp name="FileSaver.skipautonumber">false</boolProp>
<boolProp name="FileSaver.skipsuffix">false</boolProp>
<boolProp name="FileSaver.successonly">false</boolProp>

@ -64,14 +64,14 @@
<!--</classes>-->
<!--</test>-->
<!--<test name="android-policy" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.device.policy.AndroidPolicy"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.device.policy.AndroidPolicy"/>-->
<!--</classes>-->
<!--</test>-->
<!--<test name="operation-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.operation.OperationManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.operation.OperationManagement"/>-->
<!--</classes>-->
<!--</test>-->
<test name="role-mgt" preserve-order="true" parallel="false">
<classes>
@ -79,30 +79,50 @@
</classes>
</test>
<!--<test name="policy-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.policy.PolicyManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.policy.PolicyManagement"/>-->
<!--</classes>-->
<!--</test>-->
<!--<test name="feature-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.feature.FeatureManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.feature.FeatureManagement"/>-->
<!--</classes>-->
<!--</test>-->
<!--<test name="license-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.license.LicenseManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.license.LicenseManagement"/>-->
<!--</classes>-->
<!--</test>-->
<!--<test name="configuration-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.configuration.ConfigurationManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.configuration.ConfigurationManagement"/>-->
<!--</classes>-->
<!--</test>-->
<!--<test name="notification-mgt" preserve-order="true" parallel="false">-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.notification.NotificationManagement"/>-->
<!--</classes>-->
<!--<classes>-->
<!--<class name="org.wso2.iot.integration.notification.NotificationManagement"/>-->
<!--</classes>-->
<!--</test>-->
<test name="group-mgt" preserve-order="true" parallel="false">
<classes>
<class name="org.wso2.iot.integration.jmeter.GroupManagementJMeterTestCase"/>
</classes>
</test>
<test name="negative-test" preserve-order="true" parallel="false">
<classes>
<class name="org.wso2.iot.integration.jmeter.DeviceManagementAPINegativeTestCase"/>
</classes>
</test>
<test name="notification-mgt" preserve-order="true" parallel="false">
<classes>
<class name="org.wso2.iot.integration.jmeter.NotificationManagementAPIJMeterTestCase"/>
</classes>
</test>
<test name="policy-mgt" preserve-order="true" parallel="false">
<classes>
<class name="org.wso2.iot.integration.jmeter.PolicyManagementJMeterTestCase"/>
</classes>
</test>
<test name="user-mgt" preserve-order="true" parallel="false">
<classes>
<class name="org.wso2.iot.integration.user.UserManagement"/>

@ -1513,7 +1513,7 @@
<!-- Carbon Device Management -->
<carbon.device.mgt.version>2.0.49</carbon.device.mgt.version>
<carbon.device.mgt.version>2.0.54</carbon.device.mgt.version>
<carbon.device.mgt.version.range>[2.0.0, 3.0.0)</carbon.device.mgt.version.range>
<!-- IOT Device Management -->
@ -1521,7 +1521,7 @@
<!-- Carbon Device Management Plugins-->
<carbon.device.mgt.plugin.version>3.0.27</carbon.device.mgt.plugin.version>
<carbon.device.mgt.plugin.version>3.0.30</carbon.device.mgt.plugin.version>
<!-- API Management -->
<carbon.api.mgt.version>6.1.80</carbon.api.mgt.version>

Loading…
Cancel
Save