Skip to content

Commit

Permalink
MOSIP-37965 - Automated the negative testcases for L2 flow apis (#448)
Browse files Browse the repository at this point in the history
* MOSIP-37965 - Automated the negative testcases

Signed-off-by: Mohanachandran S <[email protected]>

* MOSIP-37965 - Added negative testcases

Signed-off-by: Mohanachandran S <[email protected]>

* MOSIP-37965 - Added negative testcases

Signed-off-by: Mohanachandran S <[email protected]>

---------

Signed-off-by: Mohanachandran S <[email protected]>
  • Loading branch information
mohanachandran-s authored Dec 2, 2024
1 parent 0b8b670 commit a0c03af
Show file tree
Hide file tree
Showing 19 changed files with 192 additions and 219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ public void test(TestCaseDTO testCaseDTO)
int order = 1;
String typeValue = "START";
JSONObject messageObject = new JSONObject(message2);

if (testCaseName.contains("_Incomplete")) {
sendWebsocketMessage = false;
}

try {

Expand Down
10 changes: 10 additions & 0 deletions api-test/src/main/resources/signup/ClaimDetails/ClaimDetails.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ClaimDetails:
Signup_ESignet_ClaimDetails_AuthToken_Xsrf_uin_Valid_Smoke:
endPoint: /v1/esignet/authorization/claim-details
uniqueIdentifier: TC_Signup_ESignet_ClaimDetails_01
description: Fetching the claim details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand All @@ -15,6 +17,8 @@ ClaimDetails:
}'
Signup_ESignet_ClaimDetails_AuthToken_Xsrf_uin_Valid_forGetSlot_disabilityTypeVISION_Smoke:
endPoint: /v1/esignet/authorization/claim-details
uniqueIdentifier: TC_Signup_ESignet_ClaimDetails_Prerequisite
description: Fetching the claim details and this testcase is prerequisite
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand All @@ -29,6 +33,8 @@ ClaimDetails:
}'
Signup_ESignet_ClaimDetails_AuthToken_Xsrf_uin_Valid_forGetSlot_disabilityTypeAUDITORY_Smoke:
endPoint: /v1/esignet/authorization/claim-details
uniqueIdentifier: TC_Signup_ESignet_ClaimDetails_Prerequisite
description: Fetching the claim details and this testcase is prerequisite
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand All @@ -43,6 +49,8 @@ ClaimDetails:
}'
Signup_ESignet_ClaimDetails_AuthToken_Xsrf_uin_Valid_forGetSlot_disabilityTypeMOBILITY_Smoke:
endPoint: /v1/esignet/authorization/claim-details
uniqueIdentifier: TC_Signup_ESignet_ClaimDetails_Prerequisite
description: Fetching the claim details and this testcase is prerequisite
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand All @@ -57,6 +65,8 @@ ClaimDetails:
}'
Signup_ESignet_ClaimDetails_AuthToken_Xsrf_uin_Valid_forGetSlot_disabilityTypeNEUROLOGICAL_Smoke:
endPoint: /v1/esignet/authorization/claim-details
uniqueIdentifier: TC_Signup_ESignet_ClaimDetails_Prerequisite
description: Fetching the claim details and this testcase is prerequisite
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,45 @@ CompleteSignupVerification:
"transactionId": "$ID:ESignet_OAuthDetailsRequest_V3_AuthToken_Xsrf_uin_all_Valid_Smoke_sid_transactionId$"
}'
output: '{
"status": "COMPLETED"
}'
Signup_ESignet_CompleteSignupVerification_AuthToken_Xsrf_uin_IncompleteKYC_Neg:
endPoint: /v1/esignet/authorization/complete-signup-redirect
description: Completing the Signup verifcation with incomplete KYC
role: resident
restMethod: post
inputTemplate: signup/CompleteSignupVerification/CompleteSignupVerification
outputTemplate: signup/error
input: '{
"encodedHash": "$ID:ESignet_OAuthDetailsRequest_V3_AuthToken_Xsrf_uin_all_Valid_forGetSlot_disabilityTypeVISION_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:ESignet_OAuthDetailsRequest_V3_AuthToken_Xsrf_uin_all_Valid_forGetSlot_disabilityTypeVISION_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "verification_incomplete",
"errorMessage": "verification_incomplete"
}
]
}'
Signup_ESignet_CompleteSignupVerification_AuthToken_Xsrf_uin_IncompleteKYC_BeforeStatusEndPoint_Neg:
endPoint: /v1/esignet/authorization/complete-signup-redirect
description: Completing the Signup verifcation with incomplete KYC
role: resident
restMethod: post
inputTemplate: signup/CompleteSignupVerification/CompleteSignupVerification
outputTemplate: signup/error
input: '{
"encodedHash": "$ID:ESignet_OAuthDetailsRequest_V3_AuthToken_Xsrf_uin_all_Valid_forGetSlot_disabilityTypeAUDITORY_Smoke_sid_encodedResp$",
"requestTime": "$TIMESTAMP$",
"transactionId": "$ID:ESignet_OAuthDetailsRequest_V3_AuthToken_Xsrf_uin_all_Valid_forGetSlot_disabilityTypeAUDITORY_Smoke_sid_transactionId$"
}'
output: '{
"errors": [
{
"errorCode": "verification_incomplete",
"errorMessage": "verification_incomplete"
}
]
}'
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GetIdVerifier:
Signup_ESignet_GetIdVerifier_STransId_uin_all_Valid_Smoke:
endPoint: /v1/signup/identity-verification/identity-verifier/{verifierId}
description: To get the details of specific identity verifier with valid details
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,19 @@ GetIdentityVerificationStatus:
"idvSlotAllotted": "$ID:ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_Smoke_Sid_idvSlotAllotted$"
}'
output: '{
"status": "COMPLETED"
}'
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_Incomplete_KYC:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_04
description: Get Identity Verification Status with invalid an IDV slot assigned in the cookie
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatus/GetIdentityVerificationStatus
outputTemplate: signup/GetIdentityVerificationStatus/GetIdentityVerificationStatusResult
input: '{
"idvSlotAllotted": "$ID:ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_disabilityTypeVISION_Smoke_Sid_idvSlotAllotted$"
}'
output: '{
"status": "STARTED"
}'
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"response": {
"status": "{{status}}"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
GetIdentityVerificationStatusNegTC:
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_Empty_GetSlot_Id_Neg:
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_before_initiating_websocket_connection_Neg:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_01
description: Get Identity Verification Status with an empty getSlotId
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_04
description: Get Identity Verification Status with invalid an IDV slot assigned in the cookie
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatusNegTC/GetIdentityVerificationStatusNegTC
outputTemplate: signup/error
input: '{
"idvSlotAllotted": ""
"idvSlotAllotted": "$ID:ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_posNeg_Smoke_Sid_idvSlotAllotted$"
}'
output: '{
"errors": [
Expand All @@ -18,16 +18,16 @@ GetIdentityVerificationStatusNegTC:
}
]
}'
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_without_IDV_SLOT_ALLOTTED_in_the_cookie_Neg:
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_Empty_GetSlot_Id_Neg:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_02
description: Get Identity Verification Status without an IDV slot assigned in the cookie
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_01
description: Get Identity Verification Status with an empty getSlotId
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatusNegTC/GetIdentityVerificationStatusNegTC
outputTemplate: signup/error
input: '{
"idvSlotAllotted": "$REMOVE$"
"idvSlotAllotted": ""
}'
output: '{
"errors": [
Expand All @@ -37,16 +37,16 @@ GetIdentityVerificationStatusNegTC:
}
]
}'
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_with_invalid_IDV_SLOT_ALLOTTED_in_the_cookie_Neg:
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_without_IDV_SLOT_ALLOTTED_in_the_cookie_Neg:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_03
description: Get Identity Verification Status with invalid an IDV slot assigned in the cookie
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_02
description: Get Identity Verification Status without an IDV slot assigned in the cookie
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatusNegTC/GetIdentityVerificationStatusNegTC
outputTemplate: signup/error
input: '{
"idvSlotAllotted": "1234567892"
"idvSlotAllotted": "$REMOVE$"
}'
output: '{
"errors": [
Expand All @@ -56,16 +56,16 @@ GetIdentityVerificationStatusNegTC:
}
]
}'
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_before_initiating_websocket_connection_Neg:
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_with_invalid_IDV_SLOT_ALLOTTED_in_the_cookie_Neg:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_04
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_03
description: Get Identity Verification Status with invalid an IDV slot assigned in the cookie
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatusNegTC/GetIdentityVerificationStatusNegTC
outputTemplate: signup/error
input: '{
"idvSlotAllotted": "$ID:ESignet_InitiateIdVerification_STransId_AuthToken_Xsrf_NegTC_Valid_Smoke_Sid_Neg_idvTransactionID$"
"idvSlotAllotted": "1234567892"
}'
output: '{
"errors": [
Expand All @@ -75,22 +75,3 @@ GetIdentityVerificationStatusNegTC:
}
]
}'
Signup_ESignet_GetIdentityVerificationStatus_AuthToken_Xsrf_STransId_uin_all_when_KYC_process_fails_in_websocket_Neg:
endPoint: /v1/signup/identity-verification/status
uniqueIdentifier: TC_Signup_ESignet_GetIdentityVerificationStatusNegTC_04
description: Get Identity Verification Status with invalid an IDV slot assigned in the cookie
role: resident
restMethod: get
inputTemplate: signup/GetIdentityVerificationStatusNegTC/GetIdentityVerificationStatusNegTC
outputTemplate: signup/error
input: '{
"idvSlotAllotted": "$ID:ESignet_InitiateIdVerification_STransId_AuthToken_Xsrf_NegTC_Valid_Smoke_Sid_Neg_idvTransactionID$"
}'
output: '{
"errors": [
{
"errorCode": "invalid_transaction",
"errorMessage": "invalid_transaction"
}
]
}'
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"response": {
"status": "{{status}}"
}
}
5 changes: 5 additions & 0 deletions api-test/src/main/resources/signup/GetSlot/GetSlot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GetSlot:
Signup_ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_Smoke_Sid:
endPoint: /v1/signup/identity-verification/slot
description: To get the slot ID to begin the video identity verification process with vaild details
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand All @@ -17,6 +18,7 @@ GetSlot:
}'
Signup_ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_disabilityTypeVISION_Smoke_Sid:
endPoint: /v1/signup/identity-verification/slot
description: To get the slot ID to begin the video identity verification process with vaild details for vision type disability
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand All @@ -34,6 +36,7 @@ GetSlot:
}'
Signup_ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_disabilityTypeAUDITORY_Smoke_Sid:
endPoint: /v1/signup/identity-verification/slot
description: To get the slot ID to begin the video identity verification process with vaild details for auditory type disability
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand All @@ -51,6 +54,7 @@ GetSlot:
}'
Signup_ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_disabilityTypeMOBILITY_Smoke_Sid:
endPoint: /v1/signup/identity-verification/slot
description: To get the slot ID to begin the video identity verification process with vaild details for mobility type disability
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand All @@ -68,6 +72,7 @@ GetSlot:
}'
Signup_ESignet_GetSlot_STransId_AuthToken_Xsrf_uin_all_Valid_disabilityTypeNEUROLOGICAL_Smoke_Sid:
endPoint: /v1/signup/identity-verification/slot
description: To get the slot ID to begin the video identity verification process with vaild details for neurology type disability
role: resident
restMethod: post
checkErrorsOnlyInResponse: true
Expand Down
Loading

0 comments on commit a0c03af

Please sign in to comment.