From 4420067c216958d993581315f3e1c346cb81da89 Mon Sep 17 00:00:00 2001 From: Nihal LK Date: Thu, 25 Apr 2024 17:48:43 +0530 Subject: [PATCH 1/2] PER-40 Masterdata script and testdata Signed-off-by: Nihal LK --- .../scripts/Masterdata_Test_Script.jmx | 432 ++++-------------- .../masterdata/support-files/userIDValues.txt | 31 +- 2 files changed, 117 insertions(+), 346 deletions(-) diff --git a/commons/masterdata/scripts/Masterdata_Test_Script.jmx b/commons/masterdata/scripts/Masterdata_Test_Script.jmx index ced538d6..bc40d1ea 100644 --- a/commons/masterdata/scripts/Masterdata_Test_Script.jmx +++ b/commons/masterdata/scripts/Masterdata_Test_Script.jmx @@ -5,7 +5,7 @@ false true - true + false @@ -33,7 +33,7 @@ serverIP - cellbox2.mosip.net + api-internal.cellbox.mosip.net = @@ -53,7 +53,7 @@ ./authorization_token_masterdata.txt authToken - false + true , false true @@ -61,33 +61,56 @@ shareMode.all - + + + + protocol + https + = + + + clientId + mosip-pms-client + = + + + secretKey + abc123 + = + + + appId + partner + = + + + serverIP + api-internal.cellbox.mosip.net + = + + + serverPortNo + 443 + = + + + + + continue false - 10 + 1 - 10 + 1 1 false - 900 + true - - ./templates.csv - - id,name,description,fileFormatCode,model,fileText,moduleId,moduleName,templateTypeCode,langCode,isActive - true - , - false - true - false - shareMode.all - - - + true @@ -97,20 +120,12 @@ "id": "string", "metadata": {}, "request": { - "description": "${description}", - "fileFormatCode": "${fileFormatCode}", - "fileText": "${fileText}", - "id": "${id}", - "isActive": ${isActive}, - "langCode": "${langCode}", - "model": "${model}", - "moduleId": "${moduleId}", - "moduleName": "${moduleName}", - "name": "${name}", - "templateTypeCode": "${templateTypeCode}" + "clientId": "${clientId}", + "secretKey": "${secretKey}", + "appId": "${appId}" }, - "requesttime": "2018-12-10T06:12:52.994Z", - "version": "string" + "requesttime": "${__time(YYYY-MM-dd'T'HH:mm:ss.SSS,)}Z", + "version": "1.0" } = @@ -120,7 +135,7 @@ ${serverPortNo} ${protocol} - v1/masterdata/templates + v1/authmanager/authenticate/clientidsecretkey POST true false @@ -137,16 +152,12 @@ Content-Type application/json - - Cookie - Authorization=${authToken} - - "response":{"id":" + "message":"Clientid and Token combination had been validated successfully" Assertion.response_data @@ -154,23 +165,39 @@ 16 + + true + authToken + set-cookie: Authorization=([\w.-]+); + $1$ + authToken_not_found + 1 + + + + + + false + ${__StringToFile(authorization_token_masterdata.txt,${authToken}\n,true,)} + + continue false - -1 + 1 - 30 + 1 1 - true + false 900 - true + false - + @@ -218,17 +245,17 @@ continue false - 100 + -1 10 - 1 - false - 900 + 10 + true + 600 true - + @@ -294,10 +321,10 @@ false -1 - 70 + 1 1 true - 900 + 600 true @@ -314,7 +341,7 @@ shareMode.all - + @@ -364,15 +391,15 @@ false -1 - 40 + 1 1 true - 900 + 600 - true + false - + @@ -416,298 +443,21 @@ - - continue - - false - 10 - - 10 - 1 - false - 900 - - true - - - - ./dynamicFields.csv - - id,name,langCode,dataType,description,code,value,langCode,active - true - , - false - true - false - shareMode.all - - - - true - - - - false - { - "id": "null", - "metadata": {}, - "request": { - "active": ${active}, - "dataType": "${dataType}", - "description": "${description}", - "fieldVal": [ - { - "active": ${active}, - "code": "${code}", - "langCode": "${langCode}", - "value": "${value}" - } - ], - "langCode": "${langCode}", - "name": "${name}" - }, - "requesttime": "2018-12-10T06:12:52.994Z", - "version": "string" -} - = - - - - ${serverIP} - ${serverPortNo} - ${protocol} - - v1/masterdata/dynamicfields - POST - true - false - true - false - - - - - - - - - Content-Type - application/json - - - Cookie - Authorization=${authToken} - - - - - - - "message":" - - - Assertion.response_data - false - 16 - - - - - - continue - - false - -1 - - 40 - 1 - true - 900 - - true - - - - - - - ${serverIP} - ${serverPortNo} - ${protocol} - - v1/masterdata/dynamicfields?pageNumber=0&pageSize=10&sortBy=name&orderBy=desc - GET - true - false - true - false - - - - - - - - - Content-Type - application/json - - - Cookie - Authorization=${authToken} - - - - - - - errors": - - - Assertion.response_data - false - 16 - - - - - - continue - - false - 10 - - 10 - 1 - false - 900 - - true - - - - ./regCenters.csv - - id,name,centerTypeCode,addressLine1,addressLine2,addressLine3,latitude,longitude,locationCode,holidayLocationCode,contactPhone,workingHours,langCode,numberOfKiosks,perKioskProcessTime,centerStartTime,centerEndTime,timeZone,contactPerson,lunchStartTime,lunchEndTime,isActive,zoneCode - true - , - false - true - false - shareMode.all - - - - true - - - - false - { - "id": "null", - "metadata": {}, - "request": { - "addressLine1": "${addressLine1}", - "addressLine2": "${addressLine2}", - "addressLine3": "${addressLine3}", - "centerEndTime": "${centerEndTime}", - "centerStartTime": "${centerStartTime}", - "centerTypeCode": "${centerTypeCode}", - "contactPerson": "${contactPerson}", - "contactPhone": "${contactPhone}", - "exceptionalHolidayPutPostDto": [ - { - "exceptionHolidayDate": "${__time(yyyy-MM-dd,)}", - "exceptionHolidayName": "string", - "exceptionHolidayReson": "string" - } - ], - "holidayLocationCode": "${holidayLocationCode}", - "id": "${id}", - "isActive": ${isActive}, - "langCode": "${langCode}", - "latitude": "${latitude}", - "locationCode": "${locationCode}", - "longitude": "${longitude}", - "lunchEndTime": "${lunchEndTime}", - "lunchStartTime": "${lunchStartTime}", - "name": "${name}", - "perKioskProcessTime": "${perKioskProcessTime}", - "timeZone": "${timeZone}", - "workingHours": "${workingHours}", - "workingNonWorkingDays": { - "fri": true, - "mon": true, - "sat": true, - "sun": true, - "thu": true, - "tue": true, - "wed": true - }, - "zoneCode": "${zoneCode}" - }, - "requesttime": "2018-12-10T06:12:52.994Z", - "version": "null" -} - = - - - - ${serverIP} - ${serverPortNo} - ${protocol} - - v1/masterdata/registrationcenters - POST - true - false - true - false - - - - - - - - - Content-Type - application/json - - - Cookie - Authorization=${authToken} - - - - - - - "response": - - - Assertion.response_data - false - 16 - - - - continue false -1 - 40 + 1 1 true - 900 + 600 true - + @@ -757,10 +507,10 @@ false -1 - 40 - 1 + 5 + 5 true - 900 + 600 true @@ -777,7 +527,7 @@ shareMode.all - + @@ -822,7 +572,7 @@ - false + true saveConfig diff --git a/commons/masterdata/support-files/userIDValues.txt b/commons/masterdata/support-files/userIDValues.txt index 7947b791..c1713af2 100644 --- a/commons/masterdata/support-files/userIDValues.txt +++ b/commons/masterdata/support-files/userIDValues.txt @@ -1,6 +1,27 @@ userID -10001 -10002 -10003 -10004 -10005 +dsl75 +dsl1 +dsl76 +dsl77 +dsl53 +dsl531 +tree6 +tree156 +tree8 +test2 +test3 +test75 +tree531 +test76 +test53 +test531 +test8 +tree4 +tree77 +test77 +dsl4 +dsl3 +tree75 +tree7 +tree53 +tree76 From 1ccf73110b6fec4cb13a23ed07c6fed72b99fd45 Mon Sep 17 00:00:00 2001 From: Nihal LK Date: Mon, 13 May 2024 15:11:48 +0530 Subject: [PATCH 2/2] Updated the scripts with review comments Signed-off-by: Nihal LK --- .../scripts/Masterdata_Helper_Script.jmx | 6 +- .../scripts/Masterdata_Test_Script.jmx | 192 ++++++------------ 2 files changed, 68 insertions(+), 130 deletions(-) diff --git a/commons/masterdata/scripts/Masterdata_Helper_Script.jmx b/commons/masterdata/scripts/Masterdata_Helper_Script.jmx index 68c036a6..59f4569e 100644 --- a/commons/masterdata/scripts/Masterdata_Helper_Script.jmx +++ b/commons/masterdata/scripts/Masterdata_Helper_Script.jmx @@ -33,7 +33,7 @@ clientId - mosip-regproc-client + mosip-admin-client = @@ -43,12 +43,12 @@ appId - regproc + admin = serverIP - cellbox.mosip.net + api-internal.cellbox1.mosip.net = diff --git a/commons/masterdata/scripts/Masterdata_Test_Script.jmx b/commons/masterdata/scripts/Masterdata_Test_Script.jmx index bc40d1ea..e7b5cc2c 100644 --- a/commons/masterdata/scripts/Masterdata_Test_Script.jmx +++ b/commons/masterdata/scripts/Masterdata_Test_Script.jmx @@ -33,7 +33,7 @@ serverIP - api-internal.cellbox.mosip.net + api-internal.cellbox1.mosip.net = @@ -61,128 +61,6 @@ shareMode.all - - - - protocol - https - = - - - clientId - mosip-pms-client - = - - - secretKey - abc123 - = - - - appId - partner - = - - - serverIP - api-internal.cellbox.mosip.net - = - - - serverPortNo - 443 - = - - - - - - continue - - false - 1 - - 1 - 1 - false - - - true - - - - true - - - - false - { - "id": "string", - "metadata": {}, - "request": { - "clientId": "${clientId}", - "secretKey": "${secretKey}", - "appId": "${appId}" - }, - "requesttime": "${__time(YYYY-MM-dd'T'HH:mm:ss.SSS,)}Z", - "version": "1.0" -} - = - - - - ${serverIP} - ${serverPortNo} - ${protocol} - - v1/authmanager/authenticate/clientidsecretkey - POST - true - false - true - false - - - - - - - - - Content-Type - application/json - - - - - - - "message":"Clientid and Token combination had been validated successfully" - - - Assertion.response_data - false - 16 - - - - true - authToken - set-cookie: Authorization=([\w.-]+); - $1$ - authToken_not_found - 1 - - - - - - false - ${__StringToFile(authorization_token_masterdata.txt,${authToken}\n,true,)} - - - - continue @@ -239,6 +117,16 @@ 16 + + + 200 + + + Assertion.response_code + false + 16 + + @@ -299,7 +187,7 @@ false - lang&TempTypeCode + langTempTypeCode ","templateTypeCode":"(.*?)","langCode":"(.*?)"," $2$/$1$ lang&TempTypeCode not found @@ -310,9 +198,19 @@ false - ${__StringToFile(langAndTempTypeCodes.csv,${lang&TempTypeCode}\n,true,)} + ${__StringToFile(langAndTempTypeCodes.csv,${langTempTypeCode}\n,true,)} + + + 200 + + + Assertion.response_code + false + 16 + + @@ -332,7 +230,7 @@ ./langAndTempTypeCodes.csv - lang&TempTypeCode + langTempTypeCode true , false @@ -349,7 +247,7 @@ ${serverPortNo} ${protocol} - v1/masterdata/templates/${lang&TempTypeCode} + v1/masterdata/templates/${langTempTypeCode} GET true false @@ -383,6 +281,16 @@ 16 + + + 200 + + + Assertion.response_code + false + 16 + + @@ -441,6 +349,16 @@ 16 + + + 200 + + + Assertion.response_code + false + 16 + + @@ -499,6 +417,16 @@ 16 + + + 200 + + + Assertion.response_code + false + 16 + + @@ -569,6 +497,16 @@ 16 + + + 200 + + + Assertion.response_code + false + 16 + +