From 73354c859cef064049a930b05600e62dba85e253 Mon Sep 17 00:00:00 2001 From: Nandhukumar Date: Fri, 1 Dec 2023 13:09:58 +0530 Subject: [PATCH] MOSIP-30525 Signed-off-by: Nandhukumar --- .../fw/util/OutputValidationUtil.java | 43 ++++++++++++------- .../apirig/global/utils/GlobalConstants.java | 2 + .../apirig/testscripts/AddIdentity.java | 3 +- .../apirig/testscripts/AuditValidator.java | 2 +- .../testrig/apirig/testscripts/BioAuth.java | 8 ++-- .../apirig/testscripts/BioAuthOld.java | 2 +- .../testscripts/BookAppoinmentByPrid.java | 3 +- .../apirig/testscripts/CreatePreReg.java | 3 +- .../apirig/testscripts/DBValidator.java | 2 +- .../apirig/testscripts/DeleteWithParam.java | 4 +- .../testrig/apirig/testscripts/DemoAuth.java | 8 ++-- .../DemoAuthSimplePostForAutoGenId.java | 8 ++-- .../apirig/testscripts/EsignetBioAuth.java | 8 ++-- .../apirig/testscripts/GetWithParam.java | 4 +- .../testscripts/GetWithParamForAutoGenId.java | 4 +- .../GetWithParamForAutoGenIdForKeyCloak.java | 4 +- .../GetWithParamForDownloadCard.java | 4 +- .../GetWithParamWithOtpGenerate.java | 4 +- .../apirig/testscripts/GetWithQueryParam.java | 4 +- .../GetWithQueryParamForDownloadCard.java | 4 +- .../testrig/apirig/testscripts/KycAuth.java | 4 +- .../apirig/testscripts/MassUINGenerator.java | 3 +- .../apirig/testscripts/MultiFactorAuth.java | 2 +- .../testscripts/MultiFactorAuthNew.java | 8 ++-- .../testrig/apirig/testscripts/OtpAuth.java | 2 +- .../apirig/testscripts/OtpAuthNew.java | 8 ++-- .../PatchWithBodyWithOtpGenerate.java | 4 +- .../testscripts/PatchWithPathParam.java | 4 +- .../PatchWithPathParamsAndBody.java | 4 +- .../testscripts/PatchWithQueryParam.java | 4 +- .../PostWithAutogenIdWithOtpGenerate.java | 4 +- ...ostWithAutogenIdWithOtpGenerateForWla.java | 4 +- .../PostWithBodyAndPathParams.java | 4 +- ...ostWithBodyAndQueryParamsForAutoGenId.java | 4 +- .../PostWithBodyWithOtpGenerate.java | 4 +- ...WithBodyWithOtpGenerateAndPdfDownload.java | 4 +- .../PostWithBodyWithPdfDownload.java | 4 +- .../testscripts/PostWithFormDataAndFile.java | 4 +- ...WithFormDataAndFileForNotificationAPI.java | 4 +- .../PostWithFormDataAndMultipleFile.java | 4 +- .../PostWithFormPathParamAndFile.java | 4 +- .../testscripts/PostWithOnlyPathParam.java | 4 +- .../testscripts/PostWithParamAndFile.java | 4 +- .../PostWithPathParamsAndBody.java | 4 +- .../PostWithPathParamsAndBodyForKeyCloak.java | 4 +- .../apirig/testscripts/PutWithPathParam.java | 4 +- .../testscripts/PutWithPathParamsAndBody.java | 4 +- .../apirig/testscripts/SimpleDelete.java | 4 +- .../apirig/testscripts/SimplePatch.java | 4 +- .../testscripts/SimplePatchForAutoGenId.java | 4 +- .../apirig/testscripts/SimplePost.java | 4 +- .../testscripts/SimplePostForAutoGenId.java | 4 +- .../SimplePostForAutoGenIdForUrlEncoded.java | 4 +- .../SimplePostForDeRegisterDevice.java | 4 +- .../SimplePostForRegisteredDevice.java | 4 +- .../testrig/apirig/testscripts/SimplePut.java | 4 +- .../apirig/testscripts/UpdateDraft.java | 4 +- .../apirig/testscripts/UpdateIdentity.java | 4 +- .../apirig/testscripts/UpdatePrereg.java | 4 +- 59 files changed, 150 insertions(+), 133 deletions(-) diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/authentication/fw/util/OutputValidationUtil.java b/automationtests/src/main/java/io/mosip/testrig/apirig/authentication/fw/util/OutputValidationUtil.java index d40e606059..cd6ac31bd7 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/authentication/fw/util/OutputValidationUtil.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/authentication/fw/util/OutputValidationUtil.java @@ -510,29 +510,40 @@ else if (!checkErrorsOnlyInResponse) } public static boolean doesResponseHasErrors(String responseString) { - JSONObject responseJson = new JSONObject(responseString); boolean breturn = false; - JSONArray errors = null; - String error = null; - if (responseJson.has("errors")) { - errors = responseJson.optJSONArray("errors"); - } else if (responseJson.has("error")) { - error = responseJson.getString("error"); + try { + JSONObject responseJson = new JSONObject(responseString); + JSONArray errors = null; + String error = null; + if (responseJson.has("errors")) { + errors = responseJson.optJSONArray("errors"); + } + else if (responseJson.has("error")) { + error = responseJson.getString("error"); + } + + if (errors != null) + breturn = (errors.length() > 0); + else if (error != null) + breturn = true; + + } catch (JSONException e) { + OUTPUTVALIDATION_LOGGER.error("Invalid JSON response: " + responseString); } - if (errors != null) - breturn = (errors.length() > 0); - else if (error != null) - breturn = true; - + return breturn; } public static boolean doesResponseHasErrorCode(String responseString, int errorCode) { - JSONObject responseJson = new JSONObject(responseString); - if (responseJson.has("status")) { - return responseJson.getInt("status") == errorCode; + try { + JSONObject responseJson = new JSONObject(responseString); + if (responseJson.has("status")) { + return responseJson.getInt("status") == errorCode; + } + } catch (JSONException e) { + OUTPUTVALIDATION_LOGGER.error("Invalid JSON response: " + responseString); } - + return false; } diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/global/utils/GlobalConstants.java b/automationtests/src/main/java/io/mosip/testrig/apirig/global/utils/GlobalConstants.java index 3b9de14d4e..6ac5d16748 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/global/utils/GlobalConstants.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/global/utils/GlobalConstants.java @@ -205,6 +205,8 @@ public class GlobalConstants { public static final String EXPECTED_VS_ACTUAL = "EXPECTED vs ACTUAL"; public static final String RID_GENERATOR = "ridgenerator"; public static final String VID_FEATURE_NOT_SUPPORTED = "VID feature not supported. Hence skipping the testcase"; + public static final String UIN_FEATURE_NOT_SUPPORTED = "UIN feature not supported. Hence skipping the testcase"; public static final String FEATURE_NOT_SUPPORTED = "feature not supported"; public static final String SKIPPED = "Skipped"; + public static final String TARGET_ENV_HEALTH_CHECK_FAILED = GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED; } \ No newline at end of file diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java index 5cf57e5f2b..778196e272 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AddIdentity.java @@ -35,6 +35,7 @@ import io.mosip.testrig.apirig.authentication.fw.util.OutputValidationUtil; import io.mosip.testrig.apirig.authentication.fw.util.ReportUtil; import io.mosip.testrig.apirig.authentication.fw.util.RestClient; +import io.mosip.testrig.apirig.global.utils.GlobalConstants; import io.mosip.testrig.apirig.kernel.util.ConfigManager; import io.mosip.testrig.apirig.kernel.util.KernelAuthentication; import io.mosip.testrig.apirig.kernel.util.KeycloakUserManager; @@ -89,7 +90,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } testCaseDTO.setInputTemplate(AdminTestUtil.modifySchemaGenerateHbs(testCaseDTO.isRegenerateHbs())); String uin = JsonPrecondtion diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AuditValidator.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AuditValidator.java index 497b8a186d..682d9352ac 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AuditValidator.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/AuditValidator.java @@ -72,7 +72,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } String[] templateFields = testCaseDTO.getTemplateFields(); List queryProp = Arrays.asList(templateFields); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java index 3ec83c1b31..0ebe963452 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuth.java @@ -102,16 +102,16 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad String[] kycFields = testCaseDTO.getKycFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -166,7 +166,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuthOld.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuthOld.java index 152181869f..5b66c470a8 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuthOld.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BioAuthOld.java @@ -83,7 +83,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getEndPoint().contains("$partnerKeyURL$")) { testCaseDTO.setEndPoint( diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BookAppoinmentByPrid.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BookAppoinmentByPrid.java index 7e20d34835..d00a05b575 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BookAppoinmentByPrid.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/BookAppoinmentByPrid.java @@ -29,6 +29,7 @@ import io.mosip.testrig.apirig.authentication.fw.util.OutputValidationUtil; import io.mosip.testrig.apirig.authentication.fw.util.ReportUtil; import io.mosip.testrig.apirig.authentication.fw.util.RestClient; +import io.mosip.testrig.apirig.global.utils.GlobalConstants; import io.mosip.testrig.apirig.kernel.util.ConfigManager; import io.mosip.testrig.apirig.kernel.util.KernelAuthentication; import io.mosip.testrig.apirig.testrunner.HealthChecker; @@ -84,7 +85,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad String timeSlotTo = null; testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } Response slotAvailabilityResponse = RestClient.getRequestWithCookie( ApplnURI + properties.getProperty("appointmentavailabilityurl") diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/CreatePreReg.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/CreatePreReg.java index 961ed75eab..8f8fbd6f35 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/CreatePreReg.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/CreatePreReg.java @@ -28,6 +28,7 @@ import io.mosip.testrig.apirig.authentication.fw.util.AuthenticationTestException; import io.mosip.testrig.apirig.authentication.fw.util.OutputValidationUtil; import io.mosip.testrig.apirig.authentication.fw.util.ReportUtil; +import io.mosip.testrig.apirig.global.utils.GlobalConstants; import io.mosip.testrig.apirig.kernel.util.ConfigManager; import io.mosip.testrig.apirig.service.BaseTestCase; import io.mosip.testrig.apirig.testrunner.HealthChecker; @@ -83,7 +84,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException, NoSuchAlgorithmException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } testCaseDTO.setInputTemplate(AdminTestUtil.generateHbsForPrereg(false)); String[] templateFields = testCaseDTO.getTemplateFields(); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DBValidator.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DBValidator.java index 9c12a5947b..d4401ba84d 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DBValidator.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DBValidator.java @@ -75,7 +75,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } String inputJson = getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DeleteWithParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DeleteWithParam.java index 653f5c398f..994bb6b892 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DeleteWithParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DeleteWithParam.java @@ -82,9 +82,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java index 17cf63069f..b7f1db959e 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuth.java @@ -84,17 +84,17 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -149,7 +149,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java index c4d5931d6b..49e40c0faf 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/DemoAuthSimplePostForAutoGenId.java @@ -97,17 +97,17 @@ public void test(TestCaseDTO testCaseDTO) testCaseName = testCaseDTO.getTestCaseName(); String[] kycFields = testCaseDTO.getKycFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -221,7 +221,7 @@ public void test(TestCaseDTO testCaseDTO) } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/EsignetBioAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/EsignetBioAuth.java index 9334c58b71..b3c320b1c7 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/EsignetBioAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/EsignetBioAuth.java @@ -84,17 +84,17 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -167,7 +167,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad ActualOPJson = AdminTestUtil.getRequestJson("config/errorUINIdp.json").toString(); } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java index 2038e2e165..ac0d51d95c 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParam.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java index 0e794edc52..e3355802c4 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenId.java @@ -86,10 +86,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenIdForKeyCloak.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenIdForKeyCloak.java index 0f9c5ce330..bbf08876cf 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenIdForKeyCloak.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForAutoGenIdForKeyCloak.java @@ -81,10 +81,10 @@ public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForDownloadCard.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForDownloadCard.java index 2b8e49c2e0..fcfce54ed0 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForDownloadCard.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamForDownloadCard.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamWithOtpGenerate.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamWithOtpGenerate.java index 8a835f5c39..e2437b8ed3 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamWithOtpGenerate.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithParamWithOtpGenerate.java @@ -80,10 +80,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParam.java index 644df9761a..4d5c500770 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParam.java @@ -81,13 +81,13 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (ConfigManager.isInServiceNotDeployedList(GlobalConstants.ADMIN) && testCaseName.contains("BulkUpload_")) { throw new SkipException("Service not deployed. Hence skipping this test case"); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParamForDownloadCard.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParamForDownloadCard.java index 7c2f88364c..f83000fb63 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParamForDownloadCard.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/GetWithQueryParamForDownloadCard.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws Exception { testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/KycAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/KycAuth.java index 0d697a8aa2..619aaaa0ac 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/KycAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/KycAuth.java @@ -82,10 +82,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MassUINGenerator.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MassUINGenerator.java index 0db260be72..bf547c2fcb 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MassUINGenerator.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MassUINGenerator.java @@ -35,6 +35,7 @@ import io.mosip.testrig.apirig.authentication.fw.util.ReportUtil; import io.mosip.testrig.apirig.authentication.fw.util.RestClient; import io.mosip.testrig.apirig.authentication.fw.util.RunConfigUtil; +import io.mosip.testrig.apirig.global.utils.GlobalConstants; import io.mosip.testrig.apirig.kernel.util.ConfigManager; import io.mosip.testrig.apirig.kernel.util.KernelAuthentication; import io.mosip.testrig.apirig.testrunner.HealthChecker; @@ -89,7 +90,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } for (int i = 0; i < perTCUinCount; i++) { createUins(testCaseDTO, i); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuth.java index 95d6fda3f1..d65337f3ef 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuth.java @@ -81,7 +81,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } JSONObject req = new JSONObject(testCaseDTO.getInput()); if (testCaseDTO.getEndPoint().contains(GlobalConstants.$PARTNERKEYURL$)) { diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java index 61f253279c..cf951e2aa0 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/MultiFactorAuthNew.java @@ -82,17 +82,17 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -199,7 +199,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad ActualOPJson = AdminTestUtil.getRequestJson("config/errorUIN.json").toString(); } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuth.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuth.java index cb555b1242..641b816551 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuth.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuth.java @@ -84,7 +84,7 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getEndPoint().contains(GlobalConstants.$PARTNERKEYURL$)) { testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace(GlobalConstants.$PARTNERKEYURL$, diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java index 1bff35b565..a2691e4675 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/OtpAuthNew.java @@ -87,17 +87,17 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } if (testCaseDTO.getTestCaseName().contains("uin") || testCaseDTO.getTestCaseName().contains("UIN")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("UIN") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("uin")) { - throw new SkipException("Idtype UIN is not supported. Hence skipping the testcase"); + throw new SkipException(GlobalConstants.UIN_FEATURE_NOT_SUPPORTED); } } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); @@ -220,7 +220,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad } } else { - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") || BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { ActualOPJson = getJsonFromTemplate(testCaseDTO.getOutput(), testCaseDTO.getOutputTemplate()); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java index 58ee899e6b..f6f3d1df1d 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithBodyWithOtpGenerate.java @@ -77,10 +77,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParam.java index 4e2715aece..4776d220ed 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParam.java @@ -79,10 +79,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParamsAndBody.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParamsAndBody.java index 3a99c1dbc6..18e1c8a904 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParamsAndBody.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithPathParamsAndBody.java @@ -80,10 +80,10 @@ public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithQueryParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithQueryParam.java index a781547bcc..e04e00a46f 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithQueryParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PatchWithQueryParam.java @@ -80,10 +80,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java index c4f5ed2cd6..9400b99c3e 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerate.java @@ -85,10 +85,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException, NumberFormatException, InterruptedException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerateForWla.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerateForWla.java index d8267bfdb3..552d96338e 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerateForWla.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithAutogenIdWithOtpGenerateForWla.java @@ -81,9 +81,9 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndPathParams.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndPathParams.java index d0067edfaa..4f7f89aa14 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndPathParams.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndPathParams.java @@ -85,9 +85,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndQueryParamsForAutoGenId.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndQueryParamsForAutoGenId.java index 6ff247e20a..2ff8ed6e3b 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndQueryParamsForAutoGenId.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyAndQueryParamsForAutoGenId.java @@ -66,10 +66,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java index d46d9d4c48..dd7e726e0e 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerate.java @@ -81,9 +81,9 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerateAndPdfDownload.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerateAndPdfDownload.java index 749b9da4b4..f0f36f4ade 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerateAndPdfDownload.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithOtpGenerateAndPdfDownload.java @@ -86,10 +86,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithPdfDownload.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithPdfDownload.java index b6781aa203..179f8f5300 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithPdfDownload.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithBodyWithPdfDownload.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFile.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFile.java index 79b1dc2f53..e33449ff4a 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFile.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFile.java @@ -79,10 +79,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFileForNotificationAPI.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFileForNotificationAPI.java index 7a7aff316c..fba42fee2d 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFileForNotificationAPI.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndFileForNotificationAPI.java @@ -80,10 +80,10 @@ public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); testCaseDTO = AdminTestUtil.filterHbs(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndMultipleFile.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndMultipleFile.java index c5b6e5b312..ec3a527dce 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndMultipleFile.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormDataAndMultipleFile.java @@ -79,9 +79,9 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormPathParamAndFile.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormPathParamAndFile.java index 1ec95ee652..c2a243eadf 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormPathParamAndFile.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithFormPathParamAndFile.java @@ -80,9 +80,9 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java index 95fb65de99..58e1cf69a9 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithOnlyPathParam.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = isTestCaseValidForExecution(testCaseDTO); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithParamAndFile.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithParamAndFile.java index 28d74cf9b4..38881c5123 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithParamAndFile.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithParamAndFile.java @@ -84,9 +84,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseName = isTestCaseValidForExecution(testCaseDTO); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBody.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBody.java index 788fe6ab4a..a028f8440a 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBody.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBody.java @@ -83,10 +83,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { String regCenterId = null; if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBodyForKeyCloak.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBodyForKeyCloak.java index e35eafbdd6..15a45e4ec5 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBodyForKeyCloak.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PostWithPathParamsAndBodyForKeyCloak.java @@ -78,10 +78,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParam.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParam.java index b1402c0395..3505674729 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParam.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParam.java @@ -80,10 +80,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParamsAndBody.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParamsAndBody.java index 7ace5ed498..4a62d7e026 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParamsAndBody.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/PutWithPathParamsAndBody.java @@ -83,10 +83,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimpleDelete.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimpleDelete.java index ad41761478..88d7f0a132 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimpleDelete.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimpleDelete.java @@ -64,10 +64,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatch.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatch.java index 1f9f1061fd..644b289a73 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatch.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatch.java @@ -84,10 +84,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = isTestCaseValidForExecution(testCaseDTO); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatchForAutoGenId.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatchForAutoGenId.java index 6166d12bde..09dd35aaeb 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatchForAutoGenId.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePatchForAutoGenId.java @@ -82,10 +82,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java index 608e51501b..07dabbac9e 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePost.java @@ -86,10 +86,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad auditLogCheck = testCaseDTO.isAuditLogCheck(); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java index 950097f459..0e8ddc0491 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenId.java @@ -88,9 +88,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException, NoSuchAlgorithmException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenIdForUrlEncoded.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenIdForUrlEncoded.java index e0e19533fe..a8008dccdb 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenIdForUrlEncoded.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForAutoGenIdForUrlEncoded.java @@ -84,9 +84,9 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException, NoSuchAlgorithmException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForDeRegisterDevice.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForDeRegisterDevice.java index 41c84f6e46..b3c4e0d839 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForDeRegisterDevice.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForDeRegisterDevice.java @@ -82,10 +82,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForRegisteredDevice.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForRegisteredDevice.java index 8b1ae2a2d0..a34d1c55dc 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForRegisteredDevice.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePostForRegisteredDevice.java @@ -88,10 +88,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); String inputJson = getJsonFromTemplate(testCaseDTO.getInput(), testCaseDTO.getInputTemplate()); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePut.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePut.java index 681fd0eb3a..13e74fb480 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePut.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/SimplePut.java @@ -82,10 +82,10 @@ public Object[] getTestCaseList(ITestContext context) { public void test(TestCaseDTO testCaseDTO) throws AdminTestException { testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java index 475abf2ded..78ff0625eb 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateDraft.java @@ -80,10 +80,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseName = testCaseDTO.getTestCaseName(); testCaseDTO.setInputTemplate(AdminTestUtil.generateHbsForUpdateDraft()); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java index a1173d75f3..d63cf1bb37 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdateIdentity.java @@ -98,10 +98,10 @@ public void updateIdentity(TestCaseDTO testCaseDTO) throws AuthenticationTestExc testCaseName = testCaseDTO.getTestCaseName(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED); diff --git a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdatePrereg.java b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdatePrereg.java index 977b413b42..051439bc71 100644 --- a/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdatePrereg.java +++ b/automationtests/src/main/java/io/mosip/testrig/apirig/testscripts/UpdatePrereg.java @@ -83,10 +83,10 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad testCaseDTO.setInputTemplate(AdminTestUtil.generateHbsForPrereg(true)); String[] templateFields = testCaseDTO.getTemplateFields(); if (HealthChecker.signalTerminateExecution) { - throw new SkipException("Target env health check failed " + HealthChecker.healthCheckFailureMapS); + throw new SkipException(GlobalConstants.TARGET_ENV_HEALTH_CHECK_FAILED + HealthChecker.healthCheckFailureMapS); } - if (testCaseDTO.getTestCaseName().contains("vid") || testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { + if (testCaseDTO.getTestCaseName().contains("VID") || testCaseDTO.getTestCaseName().contains("Vid")) { if (!BaseTestCase.getSupportedIdTypesValueFromActuator().contains("VID") && !BaseTestCase.getSupportedIdTypesValueFromActuator().contains("vid")) { throw new SkipException(GlobalConstants.VID_FEATURE_NOT_SUPPORTED);