-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOSIP-36423 - Automated Negative Scenarios for PMS (#939)
* MOSIP-36423 Signed-off-by: Prathmesh Jadhav <[email protected]> * [MOSIP-36423] - Automated GetAllDeviceListMappedWithSbi Signed-off-by: Prathmesh Jadhav <[email protected]> * MOSIP-36423 - Automated Negative Scenarios for PMS Signed-off-by: Prathmesh Jadhav <[email protected]> --------- Signed-off-by: Prathmesh Jadhav <[email protected]> Signed-off-by: prathmeshj12 <[email protected]>
- Loading branch information
1 parent
ff88871
commit 8050095
Showing
7 changed files
with
731 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": "{{id}}", | ||
"version": "{{version}}", | ||
"requestTime": "{{requesttime}}", | ||
"metadata": {}, | ||
"request": { | ||
"deviceId": "{{deviceId}}" | ||
} | ||
} |
183 changes: 183 additions & 0 deletions
183
api-test/src/main/resources/pms/DeactivateDevice/DeactivateDeviceNegativeScenarios.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
] | ||
}' |
9 changes: 9 additions & 0 deletions
9
...eactivateSBIWithAssociatedDevices/DeactivateSBIWithAssociatedDevicesNegativeScenarios.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"id": "{{id}}", | ||
"version": "{{version}}", | ||
"requestTime": "{{requesttime}}", | ||
"metadata": {}, | ||
"request": { | ||
"sbiId": "{{sbiId}}" | ||
} | ||
} |
Oops, something went wrong.