Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-36423 - Automated Negative Scenarios for PMS #939

Merged
merged 6 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"id": "{{id}}",
"version": "{{version}}",
"requestTime": "{{requesttime}}",
"metadata": {},
"request": {
"deviceId": "{{deviceId}}"
}
}
prathmeshj12 marked this conversation as resolved.
Show resolved Hide resolved
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