From d58d55d539b6de3ea9674ef077a932b03690d42b Mon Sep 17 00:00:00 2001 From: Pankaj Godiyal Date: Thu, 25 Jul 2024 09:16:05 +0530 Subject: [PATCH] MOSIP-34512 Signed-off-by: Pankaj Godiyal --- .../methods/MultiFactorAuthentication.java | 1 - .../dslrig/ivv/e2e/methods/SetContext.java | 6 +- .../dslrig/ivv/e2e/methods/SwitchContext.java | 3 +- .../e2e/methods/UpdateDemoOrBioDetails.java | 11 +- .../ivv/orchestrator/PacketUtility.java | 6 +- .../main/resources/config/Kernel.properties | 3 +- .../src/main/resources/config/scenarios.json | 778 +++++++++++++++++- .../packetcreator/dto/UpdatePersonaDto.java | 1 + .../service/PacketMakerService.java | 7 +- .../service/PacketSyncService.java | 9 +- .../dataprovider/BiometricDataProvider.java | 216 ++++- .../dataprovider/ResidentDataProvider.java | 29 +- .../dslrig/dataprovider/mds/MDSClient.java | 1 - .../registrationclient/RegistrationSteps.java | 2 +- 14 files changed, 1032 insertions(+), 41 deletions(-) diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/MultiFactorAuthentication.java b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/MultiFactorAuthentication.java index 649077d6b..7b936aa7e 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/MultiFactorAuthentication.java +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/MultiFactorAuthentication.java @@ -22,7 +22,6 @@ import io.mosip.testrig.apirig.utils.AdminTestUtil; import io.mosip.testrig.apirig.testscripts.BioAuth; import io.mosip.testrig.apirig.testscripts.DemoAuth; -import io.mosip.testrig.apirig.testscripts.DemoAuthSimplePostForAutoGenId; import io.mosip.testrig.apirig.testscripts.MultiFactorAuthNew; import io.mosip.testrig.apirig.testscripts.OtpAuthNew; import io.mosip.testrig.dslrig.ivv.core.base.StepInterface; diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SetContext.java b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SetContext.java index 4221fc43f..b7e3588c0 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SetContext.java +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SetContext.java @@ -46,6 +46,7 @@ public void run() throws RigInternalError { String skipBiometricClassificationFlag = ""; String skipApplicantDocumentsFlag = ""; String invalidDateFlag = ""; + String invalidOfficerIDFlag = ""; HashMap map = new HashMap(); HashMap dummyholder = new HashMap(); @@ -90,6 +91,9 @@ else if (value.startsWith("$$")) { if (step.getParameters().size() == 4 && step.getParameters().get(3).contains("invalidCreationDate")) //Invalid packet creation date invalidDateFlag = step.getParameters().get(3); + + if (step.getParameters().size() == 4 && step.getParameters().get(3).contains("invalidOfficerID")) //Invalid Officer ID + invalidOfficerIDFlag = step.getParameters().get(3); // consent value either "yes" or "no" if (step.getParameters().size() == 5 @@ -115,7 +119,7 @@ else if (value.startsWith("$$")) { else if (map != null) packetUtility.createContexts(negative, contextKeyValue, map, generatePrivateKey, status, BaseTestCase.ApplnURI + "/", step, invalidCertFlag, consent, changeSupervisorNameToDiffCase, - invalidEncryptedHashFlag, invalidCheckSum,invalidIdSchemaFlag,skipBiometricClassificationFlag,skipApplicantDocumentsFlag,invalidDateFlag); + invalidEncryptedHashFlag, invalidCheckSum,invalidIdSchemaFlag,skipBiometricClassificationFlag,skipApplicantDocumentsFlag,invalidDateFlag,invalidOfficerIDFlag); } } diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SwitchContext.java b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SwitchContext.java index 8ddddef35..7ff8845a5 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SwitchContext.java +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/SwitchContext.java @@ -41,6 +41,7 @@ public void run() throws RigInternalError { String skipBiometricClassificationFlag = ""; String skipApplicantDocumentsFlag = ""; String invalidDateFlag = ""; + String invalidOfficerIDFlag = ""; if (step.getParameters() == null || step.getParameters().isEmpty() || step.getParameters().size() < 1) { logger.warn("SwitchContext Arugemnt is Missing : Please pass the argument from DSL sheet"); } else { @@ -54,7 +55,7 @@ public void run() throws RigInternalError { if (step.getParameters().size() > 2) // true/false (want to generate privatekey) generatePrivateKey = Boolean.parseBoolean(step.getParameters().get(2)); if (map != null) - packetUtility.createContexts("",contextKeyValue, map, generatePrivateKey,null,BaseTestCase.ApplnURI + "/",step,invalidCertFlag,consent,supervisorFlag,invalidEncryptedHashFlag,invalidCheckSum,invalidIdSchemaFlag,skipBiometricClassificationFlag,skipApplicantDocumentsFlag,invalidDateFlag); + packetUtility.createContexts("",contextKeyValue, map, generatePrivateKey,null,BaseTestCase.ApplnURI + "/",step,invalidCertFlag,consent,supervisorFlag,invalidEncryptedHashFlag,invalidCheckSum,invalidIdSchemaFlag,skipBiometricClassificationFlag,skipApplicantDocumentsFlag,invalidDateFlag,invalidOfficerIDFlag); else if (userAndMachineDetailParam != null) packetUtility.createContexts(contextKeyValue, userAndMachineDetailParam, generatePrivateKey,null,BaseTestCase.ApplnURI + "/",step); diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/UpdateDemoOrBioDetails.java b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/UpdateDemoOrBioDetails.java index 7878ec87d..54e17b439 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/UpdateDemoOrBioDetails.java +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/e2e/methods/UpdateDemoOrBioDetails.java @@ -32,6 +32,7 @@ public void run() throws RigInternalError { String missFields = null; String updateAttribute = null; String blocklistedWord = null; + String testPersona = null; if (step.getParameters() == null || step.getParameters().isEmpty()) { logger.error("Parameter is missing from DSL step"); this.hasError = true; @@ -59,9 +60,15 @@ public void run() throws RigInternalError { if (!step.getParameters().isEmpty() && step.getParameters().size() > 3) { // "var1=e2e_updateDemoOrBioDetails(0,0,0,$$personaPath)" String personaFilePath = step.getParameters().get(3); + + if(step.getParameters().size() == 5) { + testPersona = step.getParameters().get(4); + testPersona = step.getScenario().getVariables().get(testPersona); + } + if (personaFilePath.startsWith("$$")) { personaFilePath = step.getScenario().getVariables().get(personaFilePath); - packetUtility.updateDemoOrBioDetail(personaFilePath, + packetUtility.updateDemoOrBioDetail(personaFilePath, testPersona , (regenAttributeList.get(0).equalsIgnoreCase("0")) ? null : regenAttributeList, (missFieldsAttributeList.get(0).equalsIgnoreCase("0")) ? new ArrayList<>() : missFieldsAttributeList, @@ -70,7 +77,7 @@ public void run() throws RigInternalError { } } else { for (String resDataPath : step.getScenario().getResidentTemplatePaths().keySet()) { - packetUtility.updateDemoOrBioDetail(resDataPath, + packetUtility.updateDemoOrBioDetail(resDataPath,testPersona , (regenAttributeList.get(0).equalsIgnoreCase("0")) ? null : regenAttributeList, (missFieldsAttributeList.get(0).equalsIgnoreCase("0")) ? new ArrayList<>() : missFieldsAttributeList, diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/orchestrator/PacketUtility.java b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/orchestrator/PacketUtility.java index 577c059ca..02686e5ad 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/orchestrator/PacketUtility.java +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/java/io/mosip/testrig/dslrig/ivv/orchestrator/PacketUtility.java @@ -771,7 +771,7 @@ public String createContexts(String negative, String key, HashMap attributeList, List missAttributeList, + public String updateDemoOrBioDetail(String resFilePath, String testPersona, List attributeList, List missAttributeList, List updateAttributeList, Scenario.Step step) throws RigInternalError { String url = baseUrl + props.getProperty("updatePersonaData"); JSONObject jsonReqInner = new JSONObject(); @@ -979,6 +980,7 @@ public String updateDemoOrBioDetail(String resFilePath, List attributeLi if (missAttributeList != null) jsonReqInner.put("missAttributeList", missAttributeList); jsonReqInner.put(PERSONAFILEPATH, resFilePath); + jsonReqInner.put("testPersonaPath", testPersona); if (attributeList != null && !(attributeList.isEmpty())) jsonReqInner.put("regenAttributeList", attributeList); if (updateAttributeList != null && !(updateAttributeList.isEmpty())) { diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/Kernel.properties b/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/Kernel.properties index 84007d2ce..1b71e786f 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/Kernel.properties +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/Kernel.properties @@ -297,4 +297,5 @@ resident_esignet=v1/esignet/actuator/health esignetMockBaseURL=esignet-insurance. slack-webhook-url= serverErrorsToMonitor= -regprocActuatorEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env \ No newline at end of file +regprocActuatorEndpoint=/registrationprocessor/v1/registrationtransaction/actuator/env +sunBirdBaseURL= \ No newline at end of file diff --git a/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/scenarios.json b/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/scenarios.json index e7fa66549..33fb70565 100644 --- a/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/scenarios.json +++ b/mosip-acceptance-tests/ivv-orchestrator/src/main/resources/config/scenarios.json @@ -910,7 +910,7 @@ "Description": "Updates Demo graphic details and biometric in the persona file", "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", "Return Value": "NA", - "Action": "e2e_updateDemoOrBioDetails(leftIris@@rigthIris,0,0,$$personaFilePath)" + "Action": "e2e_updateDemoOrBioDetails(iris,0,0,$$personaFilePath)" }, "Step-11": { "Description": "Updates persona with UIN", @@ -2733,7 +2733,7 @@ "Description": "Updates Demo graphic details and biometric in the persona file", "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", "Return Value": "NA", - "Action": "e2e_updateDemoOrBioDetails(leftIndex@@face,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" + "Action": "e2e_updateDemoOrBioDetails(finger@@face,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" }, "Step-15": { "Description": "Updates persona with UIN", @@ -2890,7 +2890,7 @@ "Description": "Updates Demo graphic details and biometric in the persona file", "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", "Return Value": "NA", - "Action": "e2e_updateDemoOrBioDetails(left,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" + "Action": "e2e_updateDemoOrBioDetails(iris,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" }, "Step-15": { "Description": "Updates persona with UIN", @@ -3047,7 +3047,7 @@ "Description": "Updates Demo graphic details and biometric in the persona file", "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", "Return Value": "NA", - "Action": "e2e_updateDemoOrBioDetails(leftIndex,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" + "Action": "e2e_updateDemoOrBioDetails(finger,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" }, "Step-15": { "Description": "Updates persona with UIN", @@ -4153,7 +4153,7 @@ "Description": "Updates Demo graphic details and biometric in the persona file", "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", "Return Value": "NA", - "Action": "e2e_updateDemoOrBioDetails(leftIndex,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" + "Action": "e2e_updateDemoOrBioDetails(finger,0/*MISS_FIELDS*/,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath)" }, "Step-15": { "Description": "Updates persona with UIN", @@ -4319,7 +4319,7 @@ "Return Value": "NA", "Action": "e2e_getPingHealth(packetcreator)" }, - "Step-1": { + "Step-1": { "Description": "Reads the pre-requisite data at the given index", "Input Parameters": "Index. Other parameter details can be found in parameter in-line comments", "Return Value": "Pre-requiste details", @@ -4620,7 +4620,7 @@ "Return Value": "NA", "Action": "e2e_packetsync($$zipPacketPath)" }, - "Step-23": { + "Step-23": { "Description": "Sets manual verification status", "Input Parameters": "RID and status", "Return Value": "NA", @@ -6814,7 +6814,7 @@ "Action": "e2e_CheckRIDStage($$rid2,MANUAL_ADJUDICATION,FAILED)" } }, - { + { "Scenario": "64", "Tag": "Negative_Test", "Persona": "ResidentMaleAdult", @@ -7743,7 +7743,6 @@ "Action": "e2e_CheckRIDStage($$rid,INTERNAL_WORKFLOW_ACTION,SUCCESS)" } }, - { "Scenario": "76", "Tag": "Postive_Test", @@ -8624,7 +8623,7 @@ "Input Parameters": "Index. Other parameter details can be found in parameter in-line comments", "Return Value": "Pre-requiste details", "Action": "$$details53=e2e_ReadPreReq(53/*PRE_REQUISITE_DATA_INDEX*/)" - }, + }, "Step-27": { "Description": "Waits for given period in seconds", "Input Parameters": "Time period in seconds to wait", @@ -11406,7 +11405,7 @@ "Input Parameters": "Packet processing status and RID", "Return Value": "NA", "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid)" - }, + }, "Step-8": { "Description": "Checks RID stage and stage status", "Input Parameters": "RID, stage and stage status", @@ -11776,7 +11775,7 @@ "Input Parameters": "Packet processing status and RID", "Return Value": "NA", "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$childRid)" - }, + }, "Step-15": { "Description": "Checks RID stage and stage status", "Input Parameters": "RID, stage and stage status", @@ -13465,7 +13464,7 @@ "Action": "e2e_bioAuthentication(faceDevice,$$lostUin,$$vidwithoutotp,$$personaFilePath)" } }, - { + { "Scenario": "115", "Tag": "Postive_Test", "Persona": "ResidentMaleAdult", @@ -18496,7 +18495,7 @@ "Action": "e2e_CheckRIDStage($$rid,VALIDATE_PACKET,FAILED)" } }, - { + { "Scenario": "166", "Tag": "Postive_Test", "Persona": "ResidentMaleAdult", @@ -18593,7 +18592,7 @@ "Action": "e2e_CheckRIDStage($$rid,PRINT_SERVICE,PROCESSED)" } }, - { + { "Scenario": "167", "Tag": "Negative_Test", "Persona": "ResidentMaleAdult", @@ -18836,6 +18835,755 @@ "Action": "e2e_CheckRIDStage($$rid,CMD_VALIDATION,ERROR)" } }, + { + "Scenario": "170", + "Tag": "Postive_Test", + "Persona": "ResidentFemaleAdult", + "Group": "Adult_New", + "Description": "ResidentA and ResidentB got their UINs and ResidentB is trying to update ResidentA UIN with his biometrics", + "Step-0": { + "Description": "Performs health check of given component", + "Input Parameters": "Keyword to check, only packetcreator is supported", + "Return Value": "NA", + "Action": "e2e_getPingHealth(packetcreator)" + }, + "Step-1": { + "Description": "Reads the pre-requisite data at the given index", + "Input Parameters": "Details can be found in in-line comments on the parameters", + "Return Value": "pre-requiste details", + "Action": "$$details1=e2e_ReadPreReq(1/*PRE_REQUISITE_DATA_INDEX*/)" + }, + "Step-2": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other prarameters details can be found in-line", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/)" + }, + "Step-3": { + "Description": "Performs health check of required server components to run end-to-end scenarios", + "Input Parameters": "NA", + "Return Value": "NA", + "Action": "e2e_getPingHealth(targetenv)" + }, + "Step-4": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath1=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-5": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath1=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath1)" + }, + "Step-6": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid1=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath1,$$templatePath1)" + }, + "Step-7": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid1)" + }, + "Step-8": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin1=e2e_getUINByRid($$rid1)" + }, + "Step-9": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/,null/*PUT_SCENARIO_DETAILS_IN_CONTEXT*/@@99/*SWITCH_DEMOGRAPHIC_DATA*/)" + }, + "Step-10": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath2=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-11": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath2=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath2)" + }, + "Step-12": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid2=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath2,$$templatePath2)" + }, + "Step-13": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid2)" + }, + "Step-14": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin2=e2e_getUINByRid($$rid2)" + }, + "Step-15": { + "Description": "Generates the hash for the given modalities", + "Input Parameters": "Modalitie and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "Hash value", + "Action": "$$modalityHashValue=e2e_getBioModalityHash(-1/*CHECK_PERSONA_PRESENCE*/,Right IndexFinger@@Left LittleFinger,$$personaFilePath2)" + }, + "Step-16": { + "Description": "Sets expectatation on mock ABIS", + "Input Parameters": "Modalities hash value. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_configureMockAbis(-1/*CHECK_PERSONA_PRESENCE*/,Right IndexFinger,true/*DUPLICATE_FLAG*/,Right IndexFinger,$$personaFilePath2,$$modalityHashValue,-1/*DEFAULT_MOCK_DELAY*/,@@Duplicate/*STATUS_CODE*/)" + }, + "Step-17": { + "Description": "Updates Demo graphic details and biometric in the persona file", + "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_updateDemoOrBioDetails(face@@finger@@iris/*BIO_TYPE*/,0,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath1/*PERSONA_TO_UPDATE*/,$$personaFilePath2/*PERSONA_TO_UPDATE_WITH*/)" + }, + "Step-18": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$personaFilePath1,$$uin2)" + }, + "Step-19": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$updateTemplate=e2e_getPacketTemplate(UPDATE/*PACKET_TYPE*/,$$personaFilePath1)" + }, + "Step-20": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid3=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath1,$$updateTemplate)" + }, + "Step-21": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid3)" + }, + "Step-22": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin3=e2e_getUINByRid($$rid3)" + } + }, + { + "Scenario": "171", + "Tag": "Postive_Test", + "Persona": "ResidentFemaleAdult", + "Group": "Adult_New", + "Description": " ResidentA and ResidentB got their UINs and ResidentB is trying to update ResidentA UIN with his (Resident-B) IRIS biometrics", + "Step-0": { + "Description": "Performs health check of given component", + "Input Parameters": "Keyword to check, only packetcreator is supported", + "Return Value": "NA", + "Action": "e2e_getPingHealth(packetcreator)" + }, + "Step-1": { + "Description": "Reads the pre-requisite data at the given index", + "Input Parameters": "Details can be found in in-line comments on the parameters", + "Return Value": "pre-requiste details", + "Action": "$$details1=e2e_ReadPreReq(1/*PRE_REQUISITE_DATA_INDEX*/)" + }, + "Step-2": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other prarameters details can be found in-line", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/)" + }, + "Step-3": { + "Description": "Performs health check of required server components to run end-to-end scenarios", + "Input Parameters": "NA", + "Return Value": "NA", + "Action": "e2e_getPingHealth(targetenv)" + }, + "Step-4": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath1=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-5": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath1=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath1)" + }, + "Step-6": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid1=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath1,$$templatePath1)" + }, + "Step-7": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid1)" + }, + "Step-8": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin1=e2e_getUINByRid($$rid1)" + }, + "Step-9": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/,null/*PUT_SCENARIO_DETAILS_IN_CONTEXT*/@@99/*SWITCH_DEMOGRAPHIC_DATA*/)" + }, + "Step-10": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath2=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-11": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath2=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath2)" + }, + "Step-12": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid2=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath2,$$templatePath2)" + }, + "Step-13": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid2)" + }, + "Step-14": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin2=e2e_getUINByRid($$rid2)" + }, + "Step-15": { + "Description": "Generates the hash for the given modalities", + "Input Parameters": "Modalitie and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "Hash value", + "Action": "$$modalityHashValue=e2e_getBioModalityHash(-1/*CHECK_PERSONA_PRESENCE*/,Left@@Right,$$personaFilePath2)" + }, + "Step-16": { + "Description": "Sets expectatation on mock ABIS", + "Input Parameters": "Modalities hash value. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_configureMockAbis(-1/*CHECK_PERSONA_PRESENCE*/,Left@@Right,true/*DUPLICATE_FLAG*/,Right IndexFinger,$$personaFilePath2,$$modalityHashValue,-1/*DEFAULT_MOCK_DELAY*/,@@Duplicate/*STATUS_CODE*/)" + }, + "Step-17": { + "Description": "Updates Demo graphic details and biometric in the persona file", + "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_updateDemoOrBioDetails(iris/*BIO_TYPE*/,0,0/*UPDATE_ATTRIBUTES*/,$$personaFilePath1/*PERSONA_TO_UPDATE*/,$$personaFilePath2/*PERSONA_TO_UPDATE_WITH*/)" + }, + "Step-18": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$personaFilePath1,$$uin2)" + }, + "Step-19": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$updateTemplate=e2e_getPacketTemplate(UPDATE/*PACKET_TYPE*/,$$personaFilePath1)" + }, + "Step-20": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid3=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath1,$$updateTemplate)" + }, + "Step-21": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid3)" + }, + "Step-22": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin3=e2e_getUINByRid($$rid3)" + } + }, + { + "Scenario": "172", + "Tag": "Postive_Test", + "Persona": "ResidentMaleAdult", + "Group": "Minor_New", + "Description": "Minor Resident A and Adult Resident B got their UINs and Resident B is trying to update Resident A UIN with his biometrics", + "Step-0": { + "Description": "Performs health check of given component", + "Input Parameters": "Keyword to check, only packetcreator is supported", + "Return Value": "NA", + "Action": "e2e_getPingHealth(packetcreator)" + }, + "Step-1": { + "Description": "Reads the pre-requisite data at the given index", + "Input Parameters": "Index. Other parameter details can be found in parameter in-line comments", + "Return Value": "Pre-requiste details", + "Action": "$$details1=e2e_ReadPreReq(1/*PRE_REQUISITE_DATA_INDEX*/)" + }, + "Step-2": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/)" + }, + "Step-3": { + "Description": "Performs health check of required server components to run end-to-end scenarios", + "Input Parameters": "NA", + "Return Value": "NA", + "Action": "e2e_getPingHealth(targetenv)" + }, + "Step-4": { + "Description": "Generates the persona file", + "Input Parameters": "Details are in parameters in-line comments", + "Return Value": "Persona file path", + "Action": "$$parentPersona=e2e_getResidentData(1/*NUMBER_OF_RESIDENTS*/,adult/*PERSONA_TYPE*/,false/*GUARDIAN_FLAG*/,Male)" + }, + "Step-5": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$parentTemplate=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$parentPersona)" + }, + "Step-6": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$parentRid=e2e_generateAndUploadPacketSkippingPrereg($$parentPersona,$$parentTemplate)" + }, + "Step-7": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$parentRid)" + }, + "Step-8": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$parentUin=e2e_getUINByRid($$parentRid)" + }, + "Step-9": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$parentPersona,$$parentUin)" + }, + "Step-10": { + "Description": "Generates persona data", + "Input Parameters": "Details in parameters in-line comments", + "Return Value": "Persona file path", + "Action": "$$childPersona=e2e_getResidentData(1/*NUMBER_OF_RESIDENTS*/,minor/*PERSONA_TYPE*/,true/*GUARDIAN_FLAG*/,Male)" + }, + "Step-11": { + "Description": "Updates persona data with gaudian details", + "Input Parameters": "Gaurdian and child persona file pahts", + "Return Value": "NA", + "Action": "e2e_updateResidentWithGuardianSkippingPreReg($$parentPersona,$$childPersona)" + }, + "Step-12": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$childTemplate=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$childPersona)" + }, + "Step-13": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$childRid=e2e_generateAndUploadPacketSkippingPrereg($$childPersona,$$childTemplate)" + }, + "Step-14": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$childRid)" + }, + "Step-15": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$childUin=e2e_getUINByRid($$childRid)" + }, + "Step-16": { + "Description": "Checks RID stage and stage status", + "Input Parameters": "RID, stage and stage status", + "Return Value": "NA", + "Action": "e2e_CheckRIDStage($$childRid,INTRODUCER_VALIDATION,SUCCESS)" + }, + "Step-17": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/,null/*PUT_SCENARIO_DETAILS_IN_CONTEXT*/@@99/*SWITCH_DEMOGRAPHIC_DATA*/)" + }, + "Step-18": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-19": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath)" + }, + "Step-20": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath,$$templatePath)" + }, + "Step-21": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid)" + }, + "Step-22": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin=e2e_getUINByRid($$rid)" + }, + "Step-23": { + "Description": "Generates the hash for the given modalities", + "Input Parameters": "Modalitie and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "Hash value", + "Action": "$$modalityHashValue=e2e_getBioModalityHash(-1/*CHECK_PERSONA_PRESENCE*/,Right IndexFinger@@Left LittleFinger,$$personaFilePath)" + }, + "Step-24": { + "Description": "Sets expectatation on mock ABIS", + "Input Parameters": "Modalities hash value. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_configureMockAbis(-1/*CHECK_PERSONA_PRESENCE*/,Right IndexFinger,true/*DUPLICATE_FLAG*/,Right IndexFinger,$$personaFilePath,$$modalityHashValue,-1/*DEFAULT_MOCK_DELAY*/,@@Duplicate/*STATUS_CODE*/)" + }, + "Step-25": { + "Description": "Updates Demo graphic details and biometric in the persona file", + "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_updateDemoOrBioDetails(face@@finger@@iris/*BIO_TYPE*/,0,0/*UPDATE_ATTRIBUTES*/,$$childPersona/*PERSONA_TO_UPDATE*/,$$personaFilePath/*PERSONA_TO_UPDATE_WITH*/)" + }, + "Step-26": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$childPersona,$$uin)" + }, + "Step-27": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$updateTemplate=e2e_getPacketTemplate(UPDATE/*PACKET_TYPE*/,$$childPersona)" + }, + "Step-28": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid1=e2e_generateAndUploadPacketSkippingPrereg($$childPersona,$$updateTemplate)" + }, + "Step-29": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid1)" + }, + "Step-30": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin1=e2e_getUINByRid($$rid1)" + } + }, + { + "Scenario": "173", + "Tag": "Postive_Test", + "Persona": "ResidentMaleAdult", + "Group": "New_Infant", + "Description": " Infant Resident A and Adult Resident B got their UINs and Resident B is trying to update Resident A UIN with his biometrics", + "Step-0": { + "Description": "Performs health check of given component", + "Input Parameters": "Keyword to check, only packetcreator is supported", + "Return Value": "NA", + "Action": "e2e_getPingHealth(packetcreator)" + }, + "Step-1": { + "Description": "Reads the pre-requisite data at the given index", + "Input Parameters": "Index. Other parameter details can be found in parameter in-line comments", + "Return Value": "Pre-requiste details", + "Action": "$$details1=e2e_ReadPreReq(1/*PRE_REQUISITE_DATA_INDEX*/)" + }, + "Step-2": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/)" + }, + "Step-3": { + "Description": "Performs health check of required server components to run end-to-end scenarios", + "Input Parameters": "NA", + "Return Value": "NA", + "Action": "e2e_getPingHealth(targetenv)" + }, + "Step-4": { + "Description": "Generates the persona file", + "Input Parameters": "Details are in parameters in-line comments", + "Return Value": "Persona file path", + "Action": "$$parentPersona=e2e_getResidentData(1/*NUMBER_OF_RESIDENTS*/,adult/*PERSONA_TYPE*/,false/*GUARDIAN_FLAG*/,Male)" + }, + "Step-5": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$parentTemplate=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$parentPersona)" + }, + "Step-6": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$parentRid=e2e_generateAndUploadPacketSkippingPrereg($$parentPersona,$$parentTemplate)" + }, + "Step-7": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$parentRid)" + }, + "Step-8": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$parentUin=e2e_getUINByRid($$parentRid)" + }, + "Step-9": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$parentPersona,$$parentUin)" + }, + "Step-10": { + "Description": "Generates persona data", + "Input Parameters": "Details in parameters in-line comments", + "Return Value": "Persona file path", + "Action": "$$childPersona=e2e_getResidentData(1/*NUMBER_OF_RESIDENTS*/,infant/*PERSONA_TYPE*/,true/*GUARDIAN_FLAG*/,Male/*GENDER*/@@false/*FINGER_BIOMETRIC_FLAG*/@@false/*IRIS_BIOMETRIC_FLAG*/@@true/*FACE_BIOMETRIC_FLAG*/)" + }, + "Step-11": { + "Description": "Updates persona data with gaudian details", + "Input Parameters": "Gaurdian and child persona file pahts", + "Return Value": "NA", + "Action": "e2e_updateResidentWithGuardianSkippingPreReg($$parentPersona,$$childPersona)" + }, + "Step-12": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$childTemplate=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$childPersona)" + }, + "Step-13": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$childRid=e2e_generateAndUploadPacketSkippingPrereg($$childPersona,$$childTemplate)" + }, + "Step-14": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$childRid)" + }, + "Step-15": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$childUin=e2e_getUINByRid($$childRid)" + }, + "Step-16": { + "Description": "Checks RID stage and stage status", + "Input Parameters": "RID, stage and stage status", + "Return Value": "NA", + "Action": "e2e_CheckRIDStage($$childRid,INTRODUCER_VALIDATION,SUCCESS)" + }, + "Step-17": { + "Description": "Checks RID stage and stage status", + "Input Parameters": "RID, stage and stage status", + "Return Value": "NA", + "Action": "e2e_CheckRIDStage($$childRid,VERIFICATION,SUCCESS)" + }, + "Step-18": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/,null/*PUT_SCENARIO_DETAILS_IN_CONTEXT*/@@99/*SWITCH_DEMOGRAPHIC_DATA*/)" + }, + "Step-19": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-20": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath)" + }, + "Step-21": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath,$$templatePath)" + }, + "Step-22": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid)" + }, + "Step-23": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin=e2e_getUINByRid($$rid)" + }, + "Step-24": { + "Description": "Generates the hash for the given modalities", + "Input Parameters": "Modalitie and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "Hash value", + "Action": "$$modalityHashValue=e2e_getBioModalityHash(-1/*CHECK_PERSONA_PRESENCE*/,FACE,$$personaFilePath)" + }, + "Step-25": { + "Description": "Sets expectatation on mock ABIS", + "Input Parameters": "Modalities hash value. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_configureMockAbis(-1/*CHECK_PERSONA_PRESENCE*/,FACE,true/*DUPLICATE_FLAG*/,FACE,$$personaFilePath,$$modalityHashValue,-1/*DEFAULT_MOCK_DELAY*/,@@Duplicate/*STATUS_CODE*/)" + }, + "Step-26": { + "Description": "Updates Demo graphic details and biometric in the persona file", + "Input Parameters": "Data to update and persona file path. Other details can be found in the parameter in-line comments", + "Return Value": "NA", + "Action": "e2e_updateDemoOrBioDetails(face/*BIO_TYPE*/,0,0/*UPDATE_ATTRIBUTES*/,$$childPersona/*PERSONA_TO_UPDATE*/,$$personaFilePath/*PERSONA_TO_UPDATE_WITH*/)" + }, + "Step-27": { + "Description": "Updates persona with UIN", + "Input Parameters": "Persona file path and UIN", + "Return Value": "NA", + "Action": "e2e_updateResidentWithUIN($$childPersona,$$uin)" + }, + "Step-28": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$updateTemplate=e2e_getPacketTemplate(UPDATE/*PACKET_TYPE*/,$$childPersona)" + }, + "Step-29": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid1=e2e_generateAndUploadPacketSkippingPrereg($$childPersona,$$updateTemplate)" + }, + "Step-30": { + "Description": "Checks the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid1)" + }, + "Step-31": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin1=e2e_getUINByRid($$rid1)" + } + }, + { + "Scenario": "174", + "Tag": "Postive_Test", + "Persona": "ResidentFemaleAdult", + "Group": "Adult_New", + "Description": "Resident walk-ins to registration center completes the process tries to get UIN card with invalid Officer ID", + "Step-0": { + "Description": "Performs health check of given component", + "Input Parameters": "Keyword to check, only packetcreator is supported", + "Return Value": "NA", + "Action": "e2e_getPingHealth(packetcreator)" + }, + "Step-1": { + "Description": "Reads the pre-requisite data at the given index", + "Input Parameters": "Details can be found in in-line comments on the parameters", + "Return Value": "pre-requiste details", + "Action": "$$details1=e2e_ReadPreReq(1/*PRE_REQUISITE_DATA_INDEX*/)" + }, + "Step-2": { + "Description": "Sets the context for scenario execution", + "Input Parameters": "Enviornment and user details. Other prarameters details can be found in-line", + "Return Value": "NA", + "Action": "e2e_setContext(env_context,$$details1,false/*GENERATE_PRIVATE_KEY*/,invalidOfficerID/*INVALID_PACKET_CREATION_DATE*/)" + }, + "Step-3": { + "Description": "Performs health check of required server components to run end-to-end scenarios", + "Input Parameters": "NA", + "Return Value": "NA", + "Action": "e2e_getPingHealth(targetenv)" + }, + "Step-4": { + "Description": "Generates persona data", + "Input Parameters": "Details are in parameter in-line comments", + "Return Value": "Persona file path", + "Action": "$$personaFilePath=e2e_getResidentData(1,adult/*PERSONA_TYPE*/,false,Female)" + }, + "Step-5": { + "Description": "Generates packet template based on the persona data", + "Input Parameters": "Process and persona file path", + "Return Value": "Generated Template file path", + "Action": "$$templatePath=e2e_getPacketTemplate(NEW/*PACKET_TYPE*/,$$personaFilePath)" + }, + "Step-6": { + "Description": "Genertes and uploads packet with given persona and packet template skipping pre-registration step", + "Input Parameters": "Persona file path and template file path", + "Return Value": "RID", + "Action": "$$rid=e2e_generateAndUploadPacketSkippingPrereg($$personaFilePath,$$templatePath)" + }, + "Step-7": { + "Description": "Checkes the RID status against given packet processing status", + "Input Parameters": "Packet processing status and RID", + "Return Value": "NA", + "Action": "e2e_checkStatus(PROCESSED/*PACKET_STATUS*/,$$rid)" + }, + "Step-8": { + "Description": "Gets the UIN for the given RID", + "Input Parameters": "RID", + "Return Value": "UIN", + "Action": "$$uin=e2e_getUINByRid($$rid)" + }, + "Step-9": { + "Description": "Checks RID stage and stage status", + "Input Parameters": "RID, stage and stage status", + "Return Value": "NA", + "Action": "e2e_CheckRIDStage($$rid,PRINT_SERVICE,PROCESSED)" + } + }, { "Scenario": "AFTER_SUITE", "Tag": "Postive_Test", diff --git a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/dto/UpdatePersonaDto.java b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/dto/UpdatePersonaDto.java index ef705f71f..461dab852 100644 --- a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/dto/UpdatePersonaDto.java +++ b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/dto/UpdatePersonaDto.java @@ -8,6 +8,7 @@ @Data public class UpdatePersonaDto { String personaFilePath; + String testPersonaPath; Properties updateAttributeList; List regenAttributeList; List missAttributeList; //ID Scheme elements or biometric sub modalities to be added to exception list diff --git a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketMakerService.java b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketMakerService.java index 23b990416..200b12557 100644 --- a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketMakerService.java +++ b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketMakerService.java @@ -626,9 +626,10 @@ boolean createPacket(String containerRootFolder, String regId, String dataFilePa logger.error(e1.getMessage()); } officerId = p.getProperty(MOSIP_TEST_REGCLIENT_USERID); - - updatePacketMetaInfo(packetRootFolder, OPERATIONSDATA, "officerId", officerId, false); - + + if (!VariableManager.getVariableValue(contextKey, "invalidOfficerIDFlag").toString().equals("invalidOfficerID")) { + updatePacketMetaInfo(packetRootFolder, OPERATIONSDATA, "officerId", officerId, false); + } supervisorId = p.getProperty(MOSIPTEST_REGCLIENT_SUPERVISORID); if (VariableManager.getVariableValue(contextKey, CHANGESUPERVISORNAMETODIFFCASE).toString() diff --git a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketSyncService.java b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketSyncService.java index 03d72d90b..36d7aa9af 100644 --- a/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketSyncService.java +++ b/mosip-packet-creator/src/main/java/io/mosip/testrig/dslrig/packetcreator/service/PacketSyncService.java @@ -1202,8 +1202,12 @@ public String updatePersonaData(List updatePersonaRequest, Str List regenAttrs = req.getRegenAttributeList(); if (regenAttrs != null) { for (String attr : regenAttrs) { - ResidentDataProvider.updateBiometric(persona, attr, contextKey); - + if (req.getTestPersonaPath() != null) { + ResidentModel testPersona = ResidentModel.readPersona(req.getTestPersonaPath()); + ResidentDataProvider.updateBiometricWithTestPersona(persona, testPersona, attr, contextKey); + } else { + ResidentDataProvider.updateBiometric(persona, attr, contextKey); + } } } Properties updateAttrs = req.getUpdateAttributeList(); @@ -1213,6 +1217,7 @@ public String updatePersonaData(List updatePersonaRequest, Str List missList = req.getMissAttributeList(); if (missList != null && !missList.isEmpty()) persona.setMissAttributes(missList); + persona.save(); persona.writePersona(req.getPersonaFilePath()); diff --git a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/BiometricDataProvider.java b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/BiometricDataProvider.java index 7ce5e0e60..b027b89ef 100644 --- a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/BiometricDataProvider.java +++ b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/BiometricDataProvider.java @@ -1,7 +1,12 @@ package io.mosip.testrig.dslrig.dataprovider; +import java.awt.image.BufferedImage; +import java.io.BufferedInputStream; import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; @@ -20,6 +25,7 @@ import java.util.List; import java.util.stream.Collectors; +import javax.imageio.ImageIO; import javax.xml.parsers.FactoryConfigurationError; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; @@ -249,8 +255,8 @@ public static MDSRCaptureModel regenBiometricViaMDS(ResidentModel resident, Stri .parseBoolean(VariableManager.getVariableValue(contextKey, "invalidCertFlag").toString()); if (invalidCertFlag) - p12path = Paths.get(VariableManager.getVariableValue(VariableManager.NS_DEFAULT, "invalidCertpath") - .toString()); + p12path = Paths.get( + VariableManager.getVariableValue(VariableManager.NS_DEFAULT, "invalidCertpath").toString()); else p12path = Paths.get(certsDir, "DSL-IDA-" + VariableManager.getVariableValue(contextKey, "db-server")); @@ -265,7 +271,7 @@ public static MDSRCaptureModel regenBiometricViaMDS(ResidentModel resident, Stri port = CentralizedMockSBI.startSBI(contextKey, "Registration", "Biometric Device", p12path.toString()); } catch (Exception e) { - logger.error("Exception occured during startSBI " + contextKey,e); + logger.error("Exception occured during startSBI " + contextKey, e); } if (port != 0) { RestClient.logInfo(contextKey, "Found the port " + contextKey + " port number is: " + port); @@ -939,7 +945,7 @@ public static BiometricDataModel getBiometricData(Boolean bFinger, String contex if (index > 9) break; - + byte[] fdata = CommonUtil.read(f.getAbsolutePath()); fingerPrintRaw[index] = fdata; fingerPrints[index] = Base64.getEncoder().encodeToString(fdata); @@ -1009,7 +1015,7 @@ public static BiometricDataModel getBiometricData(Boolean bFinger, String contex if (index > 9) break; - + byte[] fdata; try { fdata = CommonUtil.read(f.getAbsolutePath()); @@ -1034,6 +1040,68 @@ public static BiometricDataModel getBiometricData(Boolean bFinger, String contex return data; } + public static BiometricDataModel updateFingerData(String contextKey) throws IOException { + + BiometricDataModel data = new BiometricDataModel(); + // reach cached finger prints from folder + String dirPath = VariableManager.getVariableValue(contextKey, MOUNTPATH).toString() + + VariableManager.getVariableValue(contextKey, "mosip.test.persona.fingerprintdatapath").toString(); + RestClient.logInfo(contextKey, DIRPATH + dirPath); + Hashtable> tblFiles = new Hashtable>(); + File dir = new File(dirPath); + + File listDir[] = dir.listFiles(); + int numberOfSubfolders = listDir.length; + + int min = 1; + int max = numberOfSubfolders; + int randomNumber; + String beforescenario = VariableManager.getVariableValue(contextKey, SCENARIO).toString(); + String afterscenario = beforescenario.substring(0, beforescenario.indexOf(':')); + int currentScenarioNumber = Integer.valueOf(afterscenario); + + // Generate a random number that is not equal to currentScenarioNumber + randomNumber = (int) (Math.random() * (max - min)) + min; + int impressionToPick = (currentScenarioNumber < numberOfSubfolders) ? currentScenarioNumber : randomNumber; + + for (int i = min; i <= max; i++) { + List lst = CommonUtil.listFiles(dirPath + String.format("/Impression_%d/fp_1/", i)); + tblFiles.put(i, lst); + } + + String[] fingerPrints = new String[10]; + String[] fingerPrintHash = new String[10]; + byte[][] fingerPrintRaw = new byte[10][1]; + List firstSet = tblFiles.get(impressionToPick); + RestClient.logInfo(contextKey, "Impression used " + impressionToPick); + + int index = 0; + for (File f : firstSet) { + + if (index > 9) + break; + + byte[] fdata; + try { + fdata = CommonUtil.read(f.getAbsolutePath()); + fingerPrintRaw[index] = fdata; + fingerPrints[index] = Base64.getEncoder().encodeToString(fdata); + + fingerPrintHash[index] = CommonUtil.getHexEncodedHash(fdata); + + } catch (Exception e) { + logger.error(e.getMessage()); + } + index++; + + } + data.setFingerPrint(fingerPrints); + data.setFingerHash(fingerPrintHash); + data.setFingerRaw(fingerPrintRaw); + + return data; + } + // generate using Anguli static Hashtable> generateFingerprint(String outDir, int nFingerPrints, @@ -1170,7 +1238,8 @@ static List generateIris(int count, String contextKey) throws Exc int currentScenarioNumber = Integer.valueOf(afterscenario); - // If the available impressions are less than scenario number, pick the random one + // If the available impressions are less than scenario number, pick the random + // one // otherwise pick the impression of same of scenario number int impressionToPick = (currentScenarioNumber < numberOfSubfolders) ? currentScenarioNumber : randomNumber; @@ -1228,6 +1297,141 @@ static List generateIris(int count, String contextKey) throws Exc return retVal; } + // Left Eye, Right Eye + static List updateIris(String contextKey) throws Exception { + + List retVal = new ArrayList(); + IrisDataModel m = new IrisDataModel(); + String srcPath = VariableManager.getVariableValue(contextKey, MOUNTPATH).toString() + + VariableManager.getVariableValue(contextKey, "mosip.test.persona.irisdatapath").toString(); + String leftbmp = null; + String rightbmp = null; + // reach cached finger prints from folder + RestClient.logInfo(contextKey, DIRPATH + srcPath); + File dir = new File(srcPath); + + File listDir[] = dir.listFiles(); + int numberOfSubfolders = listDir.length; + + int min = 1; + int max = numberOfSubfolders; + int randomNumber; + String beforescenario = VariableManager.getVariableValue(contextKey, SCENARIO).toString(); + String afterscenario = beforescenario.substring(0, beforescenario.indexOf(':')); + int currentScenarioNumber = Integer.valueOf(afterscenario); + + // Generate a random number that is not equal to currentScenarioNumber + randomNumber = (int) (Math.random() * (max - min)) + min; + int impressionToPick = (currentScenarioNumber < numberOfSubfolders) ? currentScenarioNumber : randomNumber; + + File folder = new File(srcPath + "/" + String.format("%03d", impressionToPick)); + + File[] listOfFiles = folder.listFiles(); + + for (File file : listOfFiles) { + if (file.getName().contains("L")) { + leftbmp = file.getName(); + } else { + rightbmp = file.getName(); + } + } + + if (leftbmp == null) { + leftbmp = rightbmp; + } + if (rightbmp == null) { + rightbmp = leftbmp; + } + String fPathL = srcPath + "/" + String.format("%03d", impressionToPick) + "/" + leftbmp; + String fPathR = srcPath + "/" + String.format("%03d", impressionToPick) + "/" + rightbmp; + + String leftIrisData = ""; + String rightIrisData = ""; + String irisHash = ""; + byte[] fldata = null; + byte[] frdata = null; + if (Files.exists(Paths.get(fPathL))) { + fldata = CommonUtil.read(fPathL); + leftIrisData = Hex.encodeHexString(fldata); + irisHash = CommonUtil.getHexEncodedHash(fldata); + m.setLeftHash(irisHash); + } + if (Files.exists(Paths.get(fPathR))) { + frdata = CommonUtil.read(fPathR); + rightIrisData = Hex.encodeHexString(frdata); + irisHash = CommonUtil.getHexEncodedHash(frdata); + m.setRightHash(irisHash); + } + if (leftIrisData.equals("")) { + fldata = frdata; + leftIrisData = rightIrisData; + } else if (rightIrisData.equals("")) { + frdata = fldata; + rightIrisData = leftIrisData; + } + m.setLeft(leftIrisData); + m.setRight(rightIrisData); + m.setRawLeft(fldata); + m.setRawRight(frdata); + retVal.add(m); + + return retVal; + } + + static byte[][] updateFaceData(String contextKey) { + + byte[] bencoded = null; + byte[] bData = null; + try { + + String dirPath = VariableManager.getVariableValue(contextKey, "mountPath").toString() + + VariableManager.getVariableValue(contextKey, "mosip.test.persona.facedatapath").toString(); + + File dir = new File(dirPath); + FileFilter filter = new FileFilter() { + @Override + public boolean accept(File pathname) { + return !pathname.isDirectory(); + } + }; + File[] listDir = dir.listFiles(filter); + int numberOfSubfolders = listDir.length; + + int min = 1; + int max = numberOfSubfolders; + int randomNumber; + String beforescenario = VariableManager.getVariableValue(contextKey, SCENARIO).toString(); + String afterscenario = beforescenario.substring(0, beforescenario.indexOf(':')); + int currentScenarioNumber = Integer.valueOf(afterscenario); + + // Generate a random number that is not equal to currentScenarioNumber + randomNumber = (int) (Math.random() * (max - min)) + min; + int impressionToPick = (currentScenarioNumber < numberOfSubfolders) ? currentScenarioNumber : randomNumber; + + File file = new File(dirPath + String.format("/face%04d.jpg", impressionToPick)); + BufferedImage img = null; + + try (FileInputStream fos = new FileInputStream(file); + BufferedInputStream bis = new BufferedInputStream(fos)) { + img = ImageIO.read(bis); + logger.info("Image picked from this path=" + file); + } + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + ImageIO.write(img, "jpg", baos); + baos.flush(); + bData = baos.toByteArray(); + bencoded = PhotoProvider.encodeFaceImageData(bData); + + baos.close(); + + } catch (Exception e) { + + logger.error(e.getMessage()); + } + return new byte[][] { bencoded, bData }; + } + public static void main(String[] args) { try { diff --git a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/ResidentDataProvider.java b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/ResidentDataProvider.java index ca369bba4..8e086e1bc 100644 --- a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/ResidentDataProvider.java +++ b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/ResidentDataProvider.java @@ -86,14 +86,15 @@ public static ResidentModel updateBiometric(ResidentModel model,String bioType,S boolean bDirty = false; if(bioType.equalsIgnoreCase("finger")) { - BiometricDataModel bioData = BiometricDataProvider.getBiometricData(true,contextKey); + BiometricDataModel bioData = BiometricDataProvider.updateFingerData(contextKey); model.getBiometric().setFingerPrint( bioData.getFingerPrint()); model.getBiometric().setFingerHash( bioData.getFingerHash()); + model.getBiometric().setFingerRaw(bioData.getFingerRaw()); bDirty = true; } else if(bioType.equalsIgnoreCase("iris")) { - List iris = BiometricDataProvider.generateIris(1,contextKey); + List iris = BiometricDataProvider.updateIris(contextKey); if(iris != null && !iris.isEmpty()) { model.getBiometric().setIris(iris.get(0)); bDirty = true; @@ -102,9 +103,7 @@ public static ResidentModel updateBiometric(ResidentModel model,String bioType,S else if(bioType.equalsIgnoreCase("face")) { BiometricDataModel bioData = model.getBiometric(); -// byte[][] faceData = PhotoProvider.getPhoto(CommonUtil.generateRandomNumbers(1, DataProviderConstants.MAX_PHOTOS, 1)[0], -// model.getGender().name() , contextKey); - byte[][] faceData = PhotoProvider.getPhoto(contextKey); + byte[][] faceData = BiometricDataProvider.updateFaceData(contextKey); bioData.setEncodedPhoto( Base64.getEncoder().encodeToString(faceData[0])); bioData.setRawFaceData(faceData[1]); @@ -117,6 +116,26 @@ public static ResidentModel updateBiometric(ResidentModel model,String bioType,S return model; } + + public static ResidentModel updateBiometricWithTestPersona(ResidentModel model, ResidentModel testModel, + String bioType, String contextKey) throws Exception { + + if (bioType.equalsIgnoreCase("finger")) { + + model.getBiometric().setFingerHash(testModel.getBiometric().getFingerHash()); + model.getBiometric().setFingerPrint(testModel.getBiometric().getFingerPrint()); + model.getBiometric().setFingerRaw(testModel.getBiometric().getFingerRaw()); + } else if (bioType.equalsIgnoreCase("iris")) { + model.getBiometric().setIris(testModel.getBiometric().getIris()); + } else if (bioType.equalsIgnoreCase("face")) { + + model.getBiometric().setEncodedPhoto(testModel.getBiometric().getEncodedPhoto()); + model.getBiometric().setFaceHash(testModel.getBiometric().getFaceHash()); + model.getBiometric().setRawFaceData(testModel.getBiometric().getRawFaceData()); + } + return model; + } + private static String[] getConfiguredLanguages(String contextKey) { String [] lang_arr = null; List langs= new ArrayList(); diff --git a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/mds/MDSClient.java b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/mds/MDSClient.java index bca1b4760..5672ddf0d 100644 --- a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/mds/MDSClient.java +++ b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/mds/MDSClient.java @@ -205,7 +205,6 @@ public void createProfile(String profilePath,String profile, ResidentModel resid } - public void removeProfile(String profilePath,String profile,int port,String contextKey) { setProfile("Default",port,contextKey); File profDir = new File(profilePath + "/"+ profile); diff --git a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/test/registrationclient/RegistrationSteps.java b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/test/registrationclient/RegistrationSteps.java index 4fc9e0447..93577c5d6 100644 --- a/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/test/registrationclient/RegistrationSteps.java +++ b/mosipTestDataProvider/src/io/mosip/testrig/dslrig/dataprovider/test/registrationclient/RegistrationSteps.java @@ -110,7 +110,7 @@ public String getRIDStatus(String rid, String contextKey) throws Exception { reqWrapper.put("requesttime", CommonUtil.getUTCDateTime(LocalDateTime.now())); reqWrapper.put("version", "v1"); req.put("individualId", rid); - req.put("individualIdType", "RID"); + req.put("individualIdType", "RID"); reqWrapper.put("request", req); JSONObject response = RestClient.post(url, reqWrapper, "resident", contextKey);