Skip to content

Commit

Permalink
MOSIP-36423 - Automated Negative Scenarios for PMS (#939)
Browse files Browse the repository at this point in the history
* 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
prathmeshj12 authored Oct 25, 2024
1 parent ff88871 commit 8050095
Show file tree
Hide file tree
Showing 7 changed files with 731 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "{{id}}",
"version": "{{version}}",
"requestTime": "{{requesttime}}",
"metadata": {},
"request": {
"deviceId": "{{deviceId}}"
}
}
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"
}
]
}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "{{id}}",
"version": "{{version}}",
"requestTime": "{{requesttime}}",
"metadata": {},
"request": {
"sbiId": "{{sbiId}}"
}
}
Loading

0 comments on commit 8050095

Please sign in to comment.