From fb5d73ecbee4cf5c5eb9a65c89f92e6d7f14253a Mon Sep 17 00:00:00 2001 From: megala21 Date: Thu, 27 Apr 2017 10:33:45 +0530 Subject: [PATCH] Improving scripts --- ...iceManagementAPIAdditionalPermutations.jmx | 33 ++- .../jmeter-scripts/GroupManagementAPI.jmx | 266 ++++++++++++++++-- 2 files changed, 266 insertions(+), 33 deletions(-) diff --git a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/AndroidDeviceManagementAPIAdditionalPermutations.jmx b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/AndroidDeviceManagementAPIAdditionalPermutations.jmx index 9415a4fa..34738b5d 100644 --- a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/AndroidDeviceManagementAPIAdditionalPermutations.jmx +++ b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/AndroidDeviceManagementAPIAdditionalPermutations.jmx @@ -1,5 +1,5 @@ - + @@ -45,12 +45,12 @@ https_port - 9443 + 8243 = http_port - 9763 + 8280 = @@ -60,7 +60,12 @@ token_ep_port - 9763 + 8280 + = + + + https_management_port + 9443 = @@ -108,7 +113,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -136,7 +141,7 @@ - https://${host}:${https_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://common.mgt.user.carbon.wso2.org/xsd"> <soapenv:Header/> <soapenv:Body> @@ -162,7 +167,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -189,7 +194,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -217,7 +222,7 @@ - https://${host}:${https_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/UserAdmin.UserAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://org.apache.axis2/xsd" xmlns:xsd1="http://common.mgt.user.carbon.wso2.org/xsd"> <soapenv:Header/> <soapenv:Body> @@ -243,7 +248,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -264,7 +269,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -292,7 +297,7 @@ - https://${host}:${https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + https://${host}:${https_management_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> <soapenv:Header/> <soapenv:Body> @@ -12420,9 +12425,9 @@ vars.put("base64encodedId",new String(encryptedId)); - + Results - false + true false false false diff --git a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/GroupManagementAPI.jmx b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/GroupManagementAPI.jmx index 338b9e13..7324ba2e 100644 --- a/modules/integration/tests-integration/src/test/resources/jmeter-scripts/GroupManagementAPI.jmx +++ b/modules/integration/tests-integration/src/test/resources/jmeter-scripts/GroupManagementAPI.jmx @@ -1,28 +1,12 @@ - + - + false false - - - host - 172.17.0.1 - = - - - http_port - 9763 - = - - - https_port - 9443 - = - - + @@ -88,9 +72,253 @@ group_device = + + tenant_user_name + admin + Name of Tenant + = + + + domain_name + wso2.com + Name of Domain + = + + + password + admin + Password + = + + + email + abc@wso2.com + Email + = + + + firstName + firstName + First Name + = + + + lastName + lastName + Last Name + = + + + usagePlan + Demo + Usage Plan + = + + + createdDate + 2013-02-22T08:22:35+)5:30 + Created Date + = + + + management_https_port + 9443 + Port for carbon management console + = + + + continue + + false + 1 + + 1 + + 1342532280000 + 1342532280000 + false + + + + + + + false + rfc2109 + + + + + + + https://${host}:${management_https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> + <soapenv:Header/> + <soapenv:Body> + <aut:login> + <!--Optional:--> + <aut:username>admin</aut:username> + <!--Optional:--> + <aut:password>admin</aut:password> + <!--Optional:--> + <aut:remoteAddress>127.0.0.1</aut:remoteAddress> + </aut:login> + </soapenv:Body> +</soapenv:Envelope> + + urn:login + true + false + + + + + + + https://${host}:${management_https_port}/services/TenantMgtAdminService.TenantMgtAdminServiceHttpsSoap11Endpoint/ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org"> + <soapenv:Header/> + <soapenv:Body> + <ser:getTenant> + <!--Optional:--> + <ser:tenantDomain>${domain_name}</ser:tenantDomain> + </ser:getTenant> + </soapenv:Body> +</soapenv:Envelope> + + urn:getTenant + true + false + + + + undefined + tenant_exists + //*[local-name()='active']/text() + false + false + true + tenant_exists + + + + false + true + true + false + + + + + ${tenant_exists}==false + false + + + + + + + https://${host}:${management_https_port}/services/TenantMgtAdminService.TenantMgtAdminServiceHttpsSoap11Endpoint/ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.mgt.tenant.carbon.wso2.org" xmlns:xsd="http://beans.common.stratos.carbon.wso2.org/xsd"> + <soapenv:Header/> + <soapenv:Body> + <ser:addTenant> + <!--Optional:--> + <ser:tenantInfoBean> + <!--Optional:--> + <xsd:active>1</xsd:active> + <!--Optional:--> + <xsd:admin>${tenant_user_name}</xsd:admin> + <!--Optional:--> + <xsd:adminPassword>${password}</xsd:adminPassword> + <!--Optional:--> + <xsd:createdDate>${createdDate}</xsd:createdDate> + <!--Optional:--> + <xsd:email>${email}</xsd:email> + <!--Optional:--> + <xsd:firstname>${firstName}</xsd:firstname> + <!--Optional:--> + <xsd:lastname>${lastName}</xsd:lastname> + <!--Optional:--> + <xsd:tenantDomain>${domain_name}</xsd:tenantDomain> + <!--Optional:--> + <xsd:tenantId>0</xsd:tenantId> + <!--Optional:--> + <xsd:usagePlan>${usagePlan}</xsd:usagePlan> + </ser:tenantInfoBean> + </ser:addTenant> + </soapenv:Body> +</soapenv:Envelope> + + urn:addTenant + true + false + + + + + + + + https://${host}:${management_https_port}/services/AuthenticationAdmin.AuthenticationAdminHttpsSoap11Endpoint/ + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.services.core.carbon.wso2.org"> + <soapenv:Header/> + <soapenv:Body> + <aut:logout/> + </soapenv:Body> +</soapenv:Envelope> + + urn:logout + true + false + + + + + 202 + + Assertion.response_code + false + 1 + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + true + false + false + false + false + false + 0 + true + + + /home/ace/Desktop/results_multi_user_multi_tenancy.jtl + + + continue