diff --git a/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java b/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java index 7cc99de1b77..8433f8b0a68 100644 --- a/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java +++ b/api-test/src/main/java/io/mosip/testrig/apirig/testrunner/MosipTestRunner.java @@ -92,8 +92,8 @@ public static void main(String[] arg) { KeycloakUserManager.createUsers(); KeycloakUserManager.closeKeycloakInstance(); - List localLanguageList = new ArrayList<>(BaseTestCase.getLanguageList()); - AdminTestUtil.getLocationData(); + AdminTestUtil.getRegistrationCenterData(); + AdminTestUtil.getLocationDataWithLocationCode(BaseTestCase.locationCode); // Generate device certificates to be consumed by Mock-MDS PartnerRegistration.deleteCertificates(); diff --git a/api-test/src/main/resources/config/application.properties b/api-test/src/main/resources/config/application.properties index c0e9841a79c..1794aea43c1 100644 --- a/api-test/src/main/resources/config/application.properties +++ b/api-test/src/main/resources/config/application.properties @@ -41,6 +41,8 @@ decryptKycUrl=/v1/identity/decryptEkycData retrieveIdByUin=/idrepository/v1/identity/idvid/ fetchLocationHierarchyLevels=/v1/masterdata/locationHierarchyLevels/ fetchLocationHierarchy=/v1/masterdata/locations/locationhierarchy/ +fetchRegCent = /v1/masterdata/registrationcenters +fetchLocationDataWithCode = /v1/masterdata/locations/info/ generateArgon2HashURL=/v1/keymanager/generateArgon2Hash appointmentavailabilityurl=/preregistration/v1/appointment/availability/ validateSignatureUrl=v1/identity/validateSign diff --git a/api-test/src/main/resources/resident/GetRegCenterByLangCodeAndHierarchyLevel/GetRegCenterByLangCodeAndHierarchyLevel.yml b/api-test/src/main/resources/resident/GetRegCenterByLangCodeAndHierarchyLevel/GetRegCenterByLangCodeAndHierarchyLevel.yml index 99d0dcba448..1c588708957 100644 --- a/api-test/src/main/resources/resident/GetRegCenterByLangCodeAndHierarchyLevel/GetRegCenterByLangCodeAndHierarchyLevel.yml +++ b/api-test/src/main/resources/resident/GetRegCenterByLangCodeAndHierarchyLevel/GetRegCenterByLangCodeAndHierarchyLevel.yml @@ -9,8 +9,8 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult input: '{ "langcode": "$1STLANG$", - "hierarchylevel": "5", - "name": "10112" + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", + "name": "$LOCATIONNAME$" }' output: '{ }' @@ -27,7 +27,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: input: '{ "langcode": "$1STLANG$", "hierarchylevel": "tt", - "name": "10112" + "name": "$LOCATIONNAME$" }' output: '{ "errors": [ @@ -48,7 +48,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "$1STLANG$", - "hierarchylevel": "5", + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", "name": "tt" }' output: '{ @@ -70,8 +70,8 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "engg", - "hierarchylevel": "5", - "name": "10112" + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", + "name": "$LOCATIONNAME$" }' output: '{ "errors": [ @@ -92,8 +92,8 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "1234", - "hierarchylevel": "7", - "name": "10112" + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", + "name": "$LOCATIONNAME$" }' output: '{ "errors": [ @@ -115,7 +115,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: input: '{ "langcode": "$1STLANG$", "hierarchylevel": "-177", - "name": "10112" + "name": "$LOCATIONNAME$" }' output: '{ "errors": [ @@ -136,7 +136,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "1234", - "hierarchylevel": "7", + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", "name": "Random" }' output: '{ @@ -158,8 +158,8 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "", - "hierarchylevel": "5", - "name": "10112" + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", + "name": "$LOCATIONNAME$" }' output: "404" @@ -174,7 +174,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: input: '{ "langcode": "$1STLANG$", "hierarchylevel": "", - "name": "10112" + "name": "$LOCATIONNAME$" }' output: "404" @@ -188,7 +188,7 @@ GetRegCenterByLangCodeAndHierarchyLevel: outputTemplate: resident/error input: '{ "langcode": "$1STLANG$", - "hierarchylevel": "5", + "hierarchylevel": "$HIERARCHYLEVELWITHLOCATIONCODE$", "name": "" }' output: '{ @@ -198,100 +198,4 @@ GetRegCenterByLangCodeAndHierarchyLevel: "message": "Registration Center not found" } ] -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_0_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 0 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "0", - "name": "MyCountry" -}' - output: '{ -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_1_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 1 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "1", - "name": "Rabat Sale Kenitra" -}' - output: '{ -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_2_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 2 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "2", - "name": "Rabat" -}' - output: '{ -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_3_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 3 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "3", - "name": "Rabat" -}' - output: '{ -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_4_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 4 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "4", - "name": "Assam" -}' - output: '{ -}' - - Resident_GetRegCenterByLangCodeAndHierarchyLevel_5_all_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/{langcode}/{hierarchylevel}/names?name={name} - description: Get registration center by language code and hierarchy level 5 with all valid inputs - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevel - outputTemplate: resident/GetRegCenterByLangCodeAndHierarchyLevel/getRegCenterByLangCodeAndHierarchyLevelResult - input: '{ - "langcode": "$1STLANG$", - "hierarchylevel": "5", - "name": "14022" -}' - output: '{ }' \ No newline at end of file diff --git a/api-test/src/main/resources/resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/GetRegistrationCenterByHierarchyLevelAndTextPaginated.yml b/api-test/src/main/resources/resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/GetRegistrationCenterByHierarchyLevelAndTextPaginated.yml index 1d698a318f7..76e7ef689e5 100644 --- a/api-test/src/main/resources/resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/GetRegistrationCenterByHierarchyLevelAndTextPaginated.yml +++ b/api-test/src/main/resources/resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/GetRegistrationCenterByHierarchyLevelAndTextPaginated.yml @@ -9,8 +9,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"1", "sortBy":"createdDateTime", @@ -29,8 +29,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"engg", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"1", "sortBy":"createdDateTime", @@ -81,7 +81,7 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", "name":"Random", "pageNumber":"0", "pageSize":"1", @@ -107,8 +107,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"999", "pageSize":"10", "sortBy":"createdDateTime", @@ -133,8 +133,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"-999", "sortBy":"createdDateTime", @@ -159,8 +159,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"10", "sortBy":"Random", @@ -185,8 +185,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"10", "sortBy":"createdDateTime", @@ -212,7 +212,7 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: input: '{ "langcode":"$1STLANG$", "hierarchylevel":"tt", - "name":"10104", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"1", "sortBy":"createdDateTime", @@ -237,8 +237,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"tt", "pageSize":"10", "sortBy":"createdDateTime", @@ -263,8 +263,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"tt", "sortBy":"createdDateTime", @@ -289,8 +289,8 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"", - "hierarchylevel":"5", - "name":"10104", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"1", "sortBy":"createdDateTime", @@ -309,7 +309,7 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: input: '{ "langcode":"$1STLANG$", "hierarchylevel":"", - "name":"10104", + "name":"$LOCATIONNAME$", "pageNumber":"0", "pageSize":"1", "sortBy":"createdDateTime", @@ -327,7 +327,7 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: outputTemplate: resident/error input: '{ "langcode":"$1STLANG$", - "hierarchylevel":"5", + "hierarchylevel":"$HIERARCHYLEVELWITHLOCATIONCODE$", "name":"", "pageNumber":"0", "pageSize":"1", @@ -335,123 +335,3 @@ GetRegistrationCenterByHierarchyLevelAndTextPaginated: "orderBy":"desc" }' output: "404" - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_0_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 0 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"0", - "name":"MyCountry", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_1_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 1 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"1", - "name":"Rabat Sale Kenitra", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_2_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 2 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"2", - "name":"Rabat", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_3_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 3 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"3", - "name":"Rabat", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_4_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 4 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"4", - "name":"Assam", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' - - Resident_GetRegistrationCenterByHierarchyLevelAndTextPaginated_5_Valid_Smoke: - endPoint: /resident/v1/proxy/masterdata/registrationcenters/page/{langcode}/{hierarchylevel}/{name}?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortBy={sortBy} - description: Get Registartion centres when hierarchylevel value is given as 5 in input parameters - role: resident - checkErrorsOnlyInResponse: true - restMethod: get - inputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginated - outputTemplate: resident/GetRegistrationCenterByHierarchyLevelAndTextPaginated/getRegistrationCenterByHierarchyLevelAndTextPaginatedResult - input: '{ - "langcode":"$1STLANG$", - "hierarchylevel":"5", - "name":"14022", - "pageNumber":"0", - "pageSize":"1", - "sortBy":"createdDateTime", - "orderBy":"desc" -}' - output: '{ -}' \ No newline at end of file