From 80500952c91bc61287bcfbee5352be5203f20a50 Mon Sep 17 00:00:00 2001 From: prathmeshj12 <166711249+prathmeshj12@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:39:31 +0530 Subject: [PATCH] MOSIP-36423 - Automated Negative Scenarios for PMS (#939) * MOSIP-36423 Signed-off-by: Prathmesh Jadhav * [MOSIP-36423] - Automated GetAllDeviceListMappedWithSbi Signed-off-by: Prathmesh Jadhav * MOSIP-36423 - Automated Negative Scenarios for PMS Signed-off-by: Prathmesh Jadhav --------- Signed-off-by: Prathmesh Jadhav Signed-off-by: prathmeshj12 <166711249+prathmeshj12@users.noreply.github.com> --- .../DeactivateDeviceNegativeScenarios.hbs | 9 + .../DeactivateDeviceNegativeScenarios.yml | 183 ++++++++ ...WithAssociatedDevicesNegativeScenarios.hbs | 9 + ...WithAssociatedDevicesNegativeScenarios.yml | 433 ++++++++++++++++++ ...ovedDeviceProviderIdsNegativeScenarios.yml | 35 ++ ...viceListMappedWithSbiNegativeScenarios.yml | 39 ++ api-test/testNgXmlFiles/pmsApi.xml | 23 + 7 files changed, 731 insertions(+) create mode 100644 api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.hbs create mode 100644 api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.yml create mode 100644 api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.hbs create mode 100644 api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.yml create mode 100644 api-test/src/main/resources/pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIdsNegativeScenarios.yml create mode 100644 api-test/src/main/resources/pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbiNegativeScenarios.yml diff --git a/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.hbs b/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.hbs new file mode 100644 index 0000000000..b7a4d5c2cd --- /dev/null +++ b/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.hbs @@ -0,0 +1,9 @@ +{ + "id": "{{id}}", + "version": "{{version}}", + "requestTime": "{{requesttime}}", + "metadata": {}, + "request": { + "deviceId": "{{deviceId}}" + } +} \ No newline at end of file diff --git a/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.yml b/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.yml new file mode 100644 index 0000000000..edbd7f416b --- /dev/null +++ b/api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.yml @@ -0,0 +1,183 @@ +DeactivateDeviceNegativeScenarios: + Pms_DeactivateDevice_without_authentication_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_01 + description: Deactivate Device without Partner authentication + role: batch + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "KER-ATH-401" + } + ] +}' + Pms_DeactivateDevice_with_Invalid_Device_ID_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_02 + description: Deactivate Device by passing invalid Device ID + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "deviceId": "APPLE1111222" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_006" + } + ] +}' + Pms_DeactivateDevice_with_Invalid_requestTime_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_03 + description: Deactivate Device by passing invalid requestTime + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "1111-07-22T08:21:17.665Z", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_006" + } + ] +}' + Pms_DeactivateDevice_Missing_requestTime_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_04 + description: Deactivate Device while keeping requestTime paramter as Missing + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_004" + } + ] +}' + Pms_DeactivateDevice_Empty_requestTime_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_05 + description: Deactivate Device while keeping requestTime paramter as Empty + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "$REMOVE$", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_004" + } + ] +}' + Pms_DeactivateDevice_with_Invalid_RandomDevice_ID_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_06 + description: Deactivate Device by passwing invalid Random Device ID + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "deviceId": "00001111222" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_006" + } + ] +}' + Pms_DeactivateDevice_Already_deactivated_device_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_07 + description: Deactivate Device which has been already Deactivated + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDevice + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_014" + } + ] +}' + Pms_DeactivateDevice_with_Invalid_Version_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_08 + description: Deactivate Device by passing invalid Version + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDeviceNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.device.post", + "version": "99", + "requesttime": "$TIMESTAMP$", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateDevice_with_Empty_Version_Neg: + endPoint: /v1/partnermanager/devicedetail/deactivate-device + uniqueIdentifier: TC_PMS_DeactivateDevice_09 + description: Deactivate Device while keeping Version parameter as Empty + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateDevice/DeactivateDeviceNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.device.post", + "version": "$REMOVE$", + "requesttime": "$TIMESTAMP$", + "deviceId": "$ID:SaveDeviceDetails_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' diff --git a/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.hbs b/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.hbs new file mode 100644 index 0000000000..e3c25d64f9 --- /dev/null +++ b/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.hbs @@ -0,0 +1,9 @@ +{ + "id": "{{id}}", + "version": "{{version}}", + "requestTime": "{{requesttime}}", + "metadata": {}, + "request": { + "sbiId": "{{sbiId}}" + } +} \ No newline at end of file diff --git a/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.yml b/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.yml new file mode 100644 index 0000000000..97ceb96220 --- /dev/null +++ b/api-test/src/main/resources/pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.yml @@ -0,0 +1,433 @@ +DeactivateSBIWithAssociatedDevicesNegativeScenarios: + Pms_DeactivateSBIWithAssociatedDevices_Without_Authentication_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_01 + description: Deactivate SBI with associated Devices without Partner authentication + role: batch + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevices + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "KER-ATH-401" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Missing_requestTime_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_02 + description: Deactivate SBI while keeping requestTime parameter as Missing in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevices + outputTemplate: pms/error + input: '{ + "requesttime": "$REMOVE$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_004" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Empty_requestTime_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_03 + description: Deactivate SBI while keeping requestTime parameter as Empty in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevices + outputTemplate: pms/error + input: '{ + "requesttime": "", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_004" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_04 + description: Deactivate SBI by passing Invalid ID parameter in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "JSKSKA56888", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_002" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Missing_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_05 + description: Deactivate SBI while keeping ID parameter as Missing in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "$REMOVE$", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_002" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Keeping_IDas_Null_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_06 + description: Deactivate SBI while keeping ID parameter as Null in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "Null", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_002" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Empty_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_07 + description: Deactivate SBI while keeping ID parameter as Empty in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_002" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Missing_Version_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_08 + description: Deactivate SBI without Version parameter in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "$REMOVE$", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Null_Version_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_09 + description: Deactivate SBI while keeping Version parameter as Null in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "Null", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Empty_Version_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_10 + description: Deactivate SBI while keeping Version parameter as Empty in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_VersionValue_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_11 + description: Deactivate SBI while keeping Version parameter as invalid value 1 in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_VersionValue_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_12 + description: Deactivate SBI while keeping Version parameter as invalid value 0 in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_VersionValue_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_13 + description: Deactivate SBI while keeping Version parameter as invalid values in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "9977", + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_003" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_requestTime_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_14 + description: Deactivate SBI while keeping Request Time parameter as invalid in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "1111-07-22T08:21:17.665Z", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_REQUEST_ERROR_006" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Missing_ObjectParameter_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_15 + description: Deactivate SBI while keeping Object parameter as Missing in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "$REMOVE$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_017" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Already_deactivated_SBI_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_16 + description: Deactivate SBI which already Deactivated in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevices + outputTemplate: pms/error + input: '{ + "requesttime": "$TIMESTAMP$", + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_020" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Null_SBI_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_17 + description: Deactivate SBI while keeping SBI ID parameter as Null in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "Null" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_005" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Empty_SBI_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_18 + description: Deactivate SBI while keeping SBI ID parameter as Empty in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_005" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_InvalidNumeric_SBI_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_19 + description: Deactivate SBI while keeping SBI ID parameter as Invalid Numeric values in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "0101022" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_005" + } + ] +}' + Pms_DeactivateSBIWithAssociatedDevices_Invalid_SBI_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/deactivate-sbi + uniqueIdentifier: TC_PMS_DeactivateSBIWithAssociatedDevices_20 + description: Deactivate SBI while keeping SBI ID parameter as Invalid values in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: post + inputTemplate: pms/DeactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios + outputTemplate: pms/error + input: '{ + "id": "mosip.pms.deactivate.sbi.post", + "version": "1.0", + "requesttime": "$TIMESTAMP$", + "sbiId": "APPLEMANCAP" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_005" + } + ] +}' \ No newline at end of file diff --git a/api-test/src/main/resources/pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIdsNegativeScenarios.yml b/api-test/src/main/resources/pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIdsNegativeScenarios.yml new file mode 100644 index 0000000000..af177aff6e --- /dev/null +++ b/api-test/src/main/resources/pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIdsNegativeScenarios.yml @@ -0,0 +1,35 @@ +GetAllApprovedDeviceProviderIdsNegativeScenarios: + Pms_GetAllApprovedDeviceProviderIds_Without_Authentication_Neg: + endPoint: /v1/partnermanager/partners/getAllApprovedDeviceProviderIds + uniqueIdentifier: TC_PMS_GetAllApprovedDeviceProviderIds_01 + description: Retrieve All Approved Device ProviderIds Without Authentication + role: batch + restMethod: get + inputTemplate: pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIds + outputTemplate: pms/error + input: '{ +}' + output: '{ + "errors": [ + { + "errorCode": "KER-ATH-401" + } + ] +}' + Pms_GetAllApprovedDeviceProviderIds_Invalid_Token_Neg: + endPoint: /v1/partnermanager/partners/getAllApprovedDeviceProviderIds + uniqueIdentifier: TC_PMS_GetAllApprovedDeviceProviderIds_02 + description: Retrieve All Approved Device ProviderIds with invalid access token + role: regproc + restMethod: get + inputTemplate: pms/GetAllApprovedDeviceProviderIds/GetAllApprovedDeviceProviderIds + outputTemplate: pms/error + input: '{ +}' + output: '{ + "errors": [ + { + "errorCode": "KER-ATH-403" + } + ] +}' \ No newline at end of file diff --git a/api-test/src/main/resources/pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbiNegativeScenarios.yml b/api-test/src/main/resources/pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbiNegativeScenarios.yml new file mode 100644 index 0000000000..250ce157e1 --- /dev/null +++ b/api-test/src/main/resources/pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbiNegativeScenarios.yml @@ -0,0 +1,39 @@ +GetAllDeviceListMappedWithSbiNegativeScenarios: + Pms_GetAllDeviceListMappedWithSbi_without_authentication_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/sbi-devices/{sbiId} + uniqueIdentifier: TC_PMS_GetAllDeviceListMappedWithSbiNegativeScenarios_01 + description: Retrieve all Device list which are mapped with SBI without Authentication + role: batch + checkErrorsOnlyInResponse: true + restMethod: get + inputTemplate: pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbi + outputTemplate: pms/error + input: '{ + "sbiId": "$ID:SaveSecureBiometricInterfaceCreateDto_DeviceProvider_AllValid_Smoke_sid_id$" +}' + output: '{ + "errors": [ + { + "errorCode": "KER-ATH-401" + } + ] +}' + Pms_GetAllDeviceListMappedWithSbi_Invalid_SBI_ID_Neg: + endPoint: /v1/partnermanager/securebiometricinterface/sbi-devices/{sbiId} + uniqueIdentifier: TC_PMS_GetAllDeviceListMappedWithSbiNegativeScenarios_02 + description: Retrieve all Device list which are mapped with SBI by provinding invalid SBI id in request + role: partnerrevampdevice + checkErrorsOnlyInResponse: true + restMethod: get + inputTemplate: pms/GetAllDeviceListMappedWithSbi/GetAllDeviceListMappedWithSbi + outputTemplate: pms/error + input: '{ + "sbiId": "AJDJD9281" +}' + output: '{ + "errors": [ + { + "errorCode": "PMS_DEVICE_ERROR_005" + } + ] +}' \ No newline at end of file diff --git a/api-test/testNgXmlFiles/pmsApi.xml b/api-test/testNgXmlFiles/pmsApi.xml index d2434b3bc4..05ba7ecd57 100644 --- a/api-test/testNgXmlFiles/pmsApi.xml +++ b/api-test/testNgXmlFiles/pmsApi.xml @@ -462,6 +462,13 @@ + + + + + + @@ -470,6 +477,14 @@ name="io.mosip.testrig.apirig.testscripts.SimplePost" /> + + + + + + @@ -478,6 +493,14 @@ name="io.mosip.testrig.apirig.testscripts.SimplePost" /> + + + + + +