From e118a0d879d49e2f39fb0b6949cb33248b3062c3 Mon Sep 17 00:00:00 2001 From: Anover000 Date: Fri, 22 Mar 2024 18:54:47 +0530 Subject: [PATCH 01/27] batch tcs update --- .../stepdef/IdentityMapperStepDef.java | 2 +- .../resources/batch_demo_csv/bulk_payment.csv | 12 +++++----- .../batch_demo_csv/ph-ee-bulk-splitting.csv | 20 ++++++++-------- src/test/java/resources/bulkPayment.feature | 24 +++++++++++++++++++ 4 files changed, 41 insertions(+), 17 deletions(-) diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/IdentityMapperStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/IdentityMapperStepDef.java index a88ee17e1..d54bf18f7 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/IdentityMapperStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/IdentityMapperStepDef.java @@ -518,7 +518,7 @@ public void iCreateAIdentityMapperDTOForRegisteringBeneficiary() { fspIndex = 0; } String payeeFsp = payeeFspArray[fspIndex]; - BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO(payeeIdentifier, "00", null, payeeFspConfig.getPayeeFsp(payeeFsp)); + BeneficiaryDTO beneficiaryDTO = new BeneficiaryDTO(payeeIdentifier, "00", "1234", payeeFspConfig.getPayeeFsp(payeeFsp)); beneficiaryDTOList.add(beneficiaryDTO); fspIndex++; } diff --git a/src/test/java/resources/batch_demo_csv/bulk_payment.csv b/src/test/java/resources/batch_demo_csv/bulk_payment.csv index 3fbc8913a..31c9cee76 100644 --- a/src/test/java/resources/batch_demo_csv/bulk_payment.csv +++ b/src/test/java/resources/batch_demo_csv/bulk_payment.csv @@ -1,7 +1,7 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,g1e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,3001003873110196,850,USD,Test Payee Payment -1,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,3001003874120160,222,USD,Test Payee Payment -2,f1e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,3001003873110195,840,USD,Test Payee Payment -3,q1e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,3001003873110196,750,USD,Test Payee Payment -4,a2aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,3001003874120160,122,USD,Test Payee Payment -5,z1e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,3001003873110195,740,USD,Test Payee Payment \ No newline at end of file +0,g1e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,400173110196,850,USD,Test Payee Payment +1,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,222,USD,Test Payee Payment +2,f1e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,400173110195,840,USD,Test Payee Payment +3,q1e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,400173110196,750,USD,Test Payee Payment +4,a2aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,122,USD,Test Payee Payment +5,z1e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,400173110195,740,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/ph-ee-bulk-splitting.csv b/src/test/java/resources/batch_demo_csv/ph-ee-bulk-splitting.csv index 4a9c8a16c..1a2bd83ec 100644 --- a/src/test/java/resources/batch_demo_csv/ph-ee-bulk-splitting.csv +++ b/src/test/java/resources/batch_demo_csv/ph-ee-bulk-splitting.csv @@ -1,13 +1,13 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note 0,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,850,USD,Test Payee Payment 1,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,222,USD,Test Payee Payment -2,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,840,USD,Test Payee Payment -3,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,830,USD,Test Payee Payment -4,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,333,USD,Test Payee Payment -5,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,820,USD,Test Payee Payment -6,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,810,USD,Test Payee Payment -7,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,444,USD,Test Payee Payment -8,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,800,USD,Test Payee Payment -9,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,860,USD,Test Payee Payment -10,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,555,USD,Test Payee Payment -11,f1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,870,USD,Test Payee Payment \ No newline at end of file +2,a1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,840,USD,Test Payee Payment +3,l1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,830,USD,Test Payee Payment +4,k2aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,333,USD,Test Payee Payment +5,c1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,820,USD,Test Payee Payment +6,x1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,810,USD,Test Payee Payment +7,m2aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,444,USD,Test Payee Payment +8,p1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,800,USD,Test Payee Payment +9,q1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,860,USD,Test Payee Payment +10,e2aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,003001003874120160,555,USD,Test Payee Payment +11,t1e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,003001003873110196,870,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 418ad4235..c1692d542 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -24,3 +24,27 @@ Feature: Test ability to make payment to individual with bank account Then I am able to parse batch summary response And Status of transaction is "COMPLETED" And I should have matching total txn count and successful txn count in response + + Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status without lookup + Given I have tenant as "paymentbb2" + And I have the demo csv file "bulk_payment.csv" + And I create a list of payee identifiers from csv file + When I can inject MockServer + Then I can start mock server + And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 + And I create a IdentityMapperDTO for registering beneficiary + Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" + And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration + And I create a new clientCorrelationId + And I have private key + And I generate signature + When I call the batch transactions endpoint with expected status of 202 + Then I should get non empty response + And I am able to parse batch transactions response + And I fetch batch ID from batch transaction API's response +# Then I will sleep for 10000 millisecond + Given I have tenant as "paymentbb2" + When I call the batch summary API with expected status of 200 with total 6 txns + Then I am able to parse batch summary response + And Status of transaction is "COMPLETED" + And I should have matching total txn count and successful txn count in response \ No newline at end of file From 8accf00d6a75eec29e4edd1fea20696d1589b036 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Fri, 29 Mar 2024 13:50:46 +0530 Subject: [PATCH 02/27] mjl + cl tests --- .../resources/batch_demo_csv/batchTransactionGsma.csv | 6 +++--- .../batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv | 7 +++++++ src/test/java/resources/bulkPayment.feature | 8 ++++---- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv index 951c21f5f..3d7c9e51b 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv @@ -1,4 +1,4 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,b82610db-769e-45b3-a473-e35c4a8ffbfe,gsma,msisdn,164,msisdn,201,10,USD,Test Payee Payment -1,1e8a9b02-894b-4db2-9966-ad28427c4f33,gsma,msisdn,165,msisdn,202,5,USD,Test Payee Payment -2,a23b0448-97c7-46a8-a525-7c80bded8f09,gsma,msisdn,166,msisdn,203,1,USD,Test Payee Payment \ No newline at end of file +0,ca3a9c24-03fa-4290-ab58-9005b624d830,gsma,msisdn,1607,msisdn,1470,10,USD,Test Payee Payment +1,27b0c614-0eb5-43b0-bf1a-0c3232d6bcac,gsma,msisdn,1608,msisdn,1471,5,USD,Test Payee Payment +2,2dd985de-68f5-4ec0-981e-8aa94980faa9,gsma,msisdn,1609,msisdn,1472,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv b/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv new file mode 100644 index 000000000..ef3390265 --- /dev/null +++ b/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv @@ -0,0 +1,7 @@ +id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note +0,g2e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,400173110196,150,USD,Test Payee Payment +1,71aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,222,USD,Test Payee Payment +2,f4e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,400173110195,140,USD,Test Payee Payment +3,q4e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110196,150,USD,Test Payee Payment +4,a4aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,400174120160,222,USD,Test Payee Payment +5,z4e22fe3-9740-4fba-97b6-78f43bfa7f0f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110195,140,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index c1692d542..63cd16b3b 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -25,9 +25,9 @@ Feature: Test ability to make payment to individual with bank account And Status of transaction is "COMPLETED" And I should have matching total txn count and successful txn count in response - Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status without lookup - Given I have tenant as "paymentbb2" - And I have the demo csv file "bulk_payment.csv" + Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status + Given I have tenant as "paymentbb1" + And I have the demo csv file "bulk_payment_closedl_mock_mojaloop.csv" And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server @@ -43,7 +43,7 @@ Feature: Test ability to make payment to individual with bank account And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response # Then I will sleep for 10000 millisecond - Given I have tenant as "paymentbb2" + Given I have tenant as "paymentbb1" When I call the batch summary API with expected status of 200 with total 6 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" From 20a03b9bddd198e5a6f16d3f92dc26cc1974705a Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 15:43:41 +0530 Subject: [PATCH 03/27] Testing only gov --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa89477fd..804995063 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -317,17 +317,17 @@ workflows: - AWS - Helm - slack - - test-chart-ams: - requires: - - deploying-bpmns - context: - - AWS - - Helm - - slack - - Ngrok +# - test-chart-ams: +# requires: +# - deploying-bpmns +# context: +# - AWS +# - Helm +# - slack +# - Ngrok - test-chart-gov: requires: - - test-chart-ams + - deploying-bpmns context: - AWS - Helm From 701a3818db0e5715585080d6da1f054719bbfbc6 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 16:14:51 +0530 Subject: [PATCH 04/27] Testing only gov --- .../batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv b/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv index ef3390265..fd9923ee8 100644 --- a/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv +++ b/src/test/java/resources/batch_demo_csv/bulk_payment_closedl_mock_mojaloop.csv @@ -2,6 +2,8 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifi 0,g2e22fe3-9740-4fba-97b6-78f43bfa7f2f,closedloop,accountNumber,003001003879112168,accountNumber,400173110196,150,USD,Test Payee Payment 1,71aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,222,USD,Test Payee Payment 2,f4e22fe3-9740-4fba-97b6-78f43bfa7f0f,closedloop,accountNumber,003001003879112168,accountNumber,400173110195,140,USD,Test Payee Payment -3,q4e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110196,150,USD,Test Payee Payment -4,a4aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,400174120160,222,USD,Test Payee Payment -5,z4e22fe3-9740-4fba-97b6-78f43bfa7f0f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110195,140,USD,Test Payee Payment \ No newline at end of file +3,72aa3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,220,USD,Test Payee Payment +4,77za3ea4-e6f6-4880-877f-39f6ac4d052e,closedloop,accountNumber,003001003879112168,accountNumber,400174120160,122,USD,Test Payee Payment +5,q0e22fe3-9740-4fba-97b6-78f43bfa7f2f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110196,750,USD,Test Payee Payment +6,a4aa3ea4-e6f6-4880-877f-39f6ac4d052e,mojaloop,accountNumber,003001003879112168,accountNumber,400174120160,722,USD,Test Payee Payment +7,z4e22fe3-9740-4fba-97b6-78f43bfa7f0f,mojaloop,accountNumber,003001003879112168,accountNumber,400173110195,740,USD,Test Payee Payment \ No newline at end of file From 82a53d418f67b69122d0029460c68560b1f96521 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 17:40:04 +0530 Subject: [PATCH 05/27] Testing only gov --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 63cd16b3b..4669d2fad 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -44,7 +44,7 @@ Feature: Test ability to make payment to individual with bank account And I fetch batch ID from batch transaction API's response # Then I will sleep for 10000 millisecond Given I have tenant as "paymentbb1" - When I call the batch summary API with expected status of 200 with total 6 txns + When I call the batch summary API with expected status of 200 with total 8 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" And I should have matching total txn count and successful txn count in response \ No newline at end of file From ca21781cde323f5d7750a0ef4f72911de7bff53a Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 20:30:02 +0530 Subject: [PATCH 06/27] Testing only gov1 --- .circleci/config.yml | 2 +- src/main/resources/application.yaml | 2 +- src/test/java/resources/bulkPayment.feature | 56 ++++++++++----------- src/test/java/resources/gsmaP2P.feature | 3 +- src/test/java/resources/mojaloop.feature | 2 +- 5 files changed, 33 insertions(+), 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 804995063..0864c9262 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -227,7 +227,7 @@ jobs: export CALLBACK_URL="https://$NGROK_PUBLIC_URL" echo -n "Public url ." echo $CALLBACK_URL - ./gradlew test -Dcucumber.filter.tags="@gov" + ./gradlew test -Dcucumber.filter.tags="@gov1" echo -n "Test execution is completed, kill ngrok" pkill ngrok - store_test_results: diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 2df866732..ded75246f 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -26,7 +26,7 @@ paybill: settlement: "/confirmation" bulk-processor: - contactpoint: "https://bulk-connector.sandbox.fynarfin.io" + contactpoint: "https://localhost:8443" endpoints: bulk-transactions: "/batchtransactions" simulate: "/simulate" diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 4669d2fad..086c31a05 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -1,29 +1,29 @@ -@gov +@gov1 Feature: Test ability to make payment to individual with bank account - Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status - Given I have tenant as "paymentbb1" - And I have the demo csv file "bulk_payment.csv" - And I create a list of payee identifiers from csv file - When I can inject MockServer - Then I can start mock server - And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 - And I create a IdentityMapperDTO for registering beneficiary - Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" - And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration - And I create a new clientCorrelationId - And I have private key - And I generate signature - When I call the batch transactions endpoint with expected status of 202 - Then I should get non empty response - And I am able to parse batch transactions response - And I fetch batch ID from batch transaction API's response -# Then I will sleep for 10000 millisecond - Given I have tenant as "paymentbb1" - When I call the batch summary API with expected status of 200 with total 6 txns - Then I am able to parse batch summary response - And Status of transaction is "COMPLETED" - And I should have matching total txn count and successful txn count in response +# Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status +# Given I have tenant as "paymentbb1" +# And I have the demo csv file "bulk_payment.csv" +# And I create a list of payee identifiers from csv file +# When I can inject MockServer +# Then I can start mock server +## And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 +## And I create a IdentityMapperDTO for registering beneficiary +## Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" +## And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration +# And I create a new clientCorrelationId +# And I have private key +# And I generate signature +# When I call the batch transactions endpoint with expected status of 202 +# Then I should get non empty response +# And I am able to parse batch transactions response +# And I fetch batch ID from batch transaction API's response +## Then I will sleep for 10000 millisecond +# Given I have tenant as "paymentbb1" +# When I call the batch summary API with expected status of 200 with total 6 txns +# Then I am able to parse batch summary response +# And Status of transaction is "COMPLETED" +# And I should have matching total txn count and successful txn count in response Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status Given I have tenant as "paymentbb1" @@ -31,10 +31,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server - And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 - And I create a IdentityMapperDTO for registering beneficiary - Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" - And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration +# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 +# And I create a IdentityMapperDTO for registering beneficiary +# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" +# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature diff --git a/src/test/java/resources/gsmaP2P.feature b/src/test/java/resources/gsmaP2P.feature index 7c7d02841..658b69528 100644 --- a/src/test/java/resources/gsmaP2P.feature +++ b/src/test/java/resources/gsmaP2P.feature @@ -1,4 +1,5 @@ -@amsIntegration @govtodo +@amsIntegration @govtodo @gov1 +//remove it @gov1 Feature: GSMA Outbound Transfer test Scenario: GSMA Withdrawal Transfer testx (Payer Debit only) diff --git a/src/test/java/resources/mojaloop.feature b/src/test/java/resources/mojaloop.feature index 3cae45cf8..7ba6aec46 100644 --- a/src/test/java/resources/mojaloop.feature +++ b/src/test/java/resources/mojaloop.feature @@ -1,4 +1,4 @@ -@gov @ext +@gov1 @ext Feature: Mojaloop test Scenario: ML connector partial payee party lookup test From 2a958901611ecd9ad5440384e908557f449f5b2b Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 20:30:45 +0530 Subject: [PATCH 07/27] Testing only gov1 --- src/test/java/resources/bulkPayment.feature | 54 ++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 086c31a05..ec4e65c96 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -1,29 +1,29 @@ @gov1 Feature: Test ability to make payment to individual with bank account -# Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status -# Given I have tenant as "paymentbb1" -# And I have the demo csv file "bulk_payment.csv" -# And I create a list of payee identifiers from csv file -# When I can inject MockServer -# Then I can start mock server -## And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 -## And I create a IdentityMapperDTO for registering beneficiary -## Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" -## And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration -# And I create a new clientCorrelationId -# And I have private key -# And I generate signature -# When I call the batch transactions endpoint with expected status of 202 -# Then I should get non empty response -# And I am able to parse batch transactions response -# And I fetch batch ID from batch transaction API's response -## Then I will sleep for 10000 millisecond -# Given I have tenant as "paymentbb1" -# When I call the batch summary API with expected status of 200 with total 6 txns -# Then I am able to parse batch summary response -# And Status of transaction is "COMPLETED" -# And I should have matching total txn count and successful txn count in response + Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status + Given I have tenant as "paymentbb1" + And I have the demo csv file "bulk_payment.csv" + And I create a list of payee identifiers from csv file + When I can inject MockServer + Then I can start mock server + And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 + And I create a IdentityMapperDTO for registering beneficiary + Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" + And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration + And I create a new clientCorrelationId + And I have private key + And I generate signature + When I call the batch transactions endpoint with expected status of 202 + Then I should get non empty response + And I am able to parse batch transactions response + And I fetch batch ID from batch transaction API's response +# Then I will sleep for 10000 millisecond + Given I have tenant as "paymentbb1" + When I call the batch summary API with expected status of 200 with total 6 txns + Then I am able to parse batch summary response + And Status of transaction is "COMPLETED" + And I should have matching total txn count and successful txn count in response Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status Given I have tenant as "paymentbb1" @@ -31,10 +31,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server -# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 -# And I create a IdentityMapperDTO for registering beneficiary -# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" -# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration + And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 + And I create a IdentityMapperDTO for registering beneficiary + Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" + And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature From b723e5b87822fa4bd48304e0eb6dd0493300287a Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 21:08:05 +0530 Subject: [PATCH 08/27] Testing only gov1 --- src/test/java/resources/bulkPayment.feature | 16 ++++++++-------- src/test/java/resources/gsmaP2P.feature | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index ec4e65c96..4c0c9c248 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -7,10 +7,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server - And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 - And I create a IdentityMapperDTO for registering beneficiary - Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" - And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration +# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 +# And I create a IdentityMapperDTO for registering beneficiary +# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" +# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature @@ -31,10 +31,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server - And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 - And I create a IdentityMapperDTO for registering beneficiary - Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" - And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration +# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 +# And I create a IdentityMapperDTO for registering beneficiary +# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" +# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature diff --git a/src/test/java/resources/gsmaP2P.feature b/src/test/java/resources/gsmaP2P.feature index 658b69528..7e2b065f3 100644 --- a/src/test/java/resources/gsmaP2P.feature +++ b/src/test/java/resources/gsmaP2P.feature @@ -1,5 +1,5 @@ @amsIntegration @govtodo @gov1 -//remove it @gov1 + Feature: GSMA Outbound Transfer test Scenario: GSMA Withdrawal Transfer testx (Payer Debit only) From 2a5e6e24dc75083a156ec7697166dc41849f2fde Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Mon, 1 Apr 2024 21:09:40 +0530 Subject: [PATCH 09/27] Testing only gov1 --- src/main/resources/application.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index ded75246f..2df866732 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -26,7 +26,7 @@ paybill: settlement: "/confirmation" bulk-processor: - contactpoint: "https://localhost:8443" + contactpoint: "https://bulk-connector.sandbox.fynarfin.io" endpoints: bulk-transactions: "/batchtransactions" simulate: "/simulate" From 4b60857bb34fd96078be6c4c9c245cea1e9ae610 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Tue, 2 Apr 2024 10:50:40 +0530 Subject: [PATCH 10/27] Testing only gov1 --- src/test/java/resources/bulkPayment.feature | 133 ++++++++++++++++++-- 1 file changed, 124 insertions(+), 9 deletions(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 4c0c9c248..9b9c732d8 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -7,10 +7,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server -# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 -# And I create a IdentityMapperDTO for registering beneficiary -# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" -# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration + And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 + And I create a IdentityMapperDTO for registering beneficiary + Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" + And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature @@ -31,10 +31,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server -# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 -# And I create a IdentityMapperDTO for registering beneficiary -# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" -# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration + And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 + And I create a IdentityMapperDTO for registering beneficiary + Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" + And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature @@ -47,4 +47,119 @@ Feature: Test ability to make payment to individual with bank account When I call the batch summary API with expected status of 200 with total 8 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" - And I should have matching total txn count and successful txn count in response \ No newline at end of file + And I should have matching total txn count and successful txn count in response + + + Scenario: Bulk Transfer with ClosedLoop and GSMA + #payer 1 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "1" and account balance of 100 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "1" balance + #payee 1 creation + When I create and setup a "payee" with id "1" and account balance of 10 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "1" balance + + Then Create a csv file with file name "batchTransactionGsma.csv" + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 10 and id 0 + + #payer 2 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "2" and account balance of 50 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "2" balance + #payee 2 creation + When I create and setup a "payee" with id "2" and account balance of 20 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "2" balance + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 1 + + #payer 3 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "3" and account balance of 50 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "3" balance + #payee 2 creation + When I create and setup a "payee" with id "3" and account balance of 20 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "3" balance + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 2 + + #payer 2 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "4" and account balance of 50 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "4" balance + #payee 2 creation + When I create and setup a "payee" with id "4" and account balance of 20 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "4" balance + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 + + #payer 2 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "5" and account balance of 50 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "5" balance + #payee 2 creation + When I create and setup a "payee" with id "5" and account balance of 20 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "5" balance + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 + #payer 3 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "6" and account balance of 30 + Given I have tenant as "payerfsp" + Then I call the balance api for payer "6" balance + #payee 3 creation + When I create and setup a "payee" with id "6" and account balance of 30 + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "6" balance + + Then add last row to csv with current payer and payee, payment mode as "gsma" and transfer amount 1 and id 5 + #batch process + Given I have tenant as "payerfsp" + And I have the demo csv file "batchTransactionGsma.csv" + And I generate clientCorrelationId + And I have private key + And I generate signature + When I call the batch transactions endpoint with expected status of 202 + And I am able to parse batch transactions response + And I fetch batch ID from batch transaction API's response + When I call the batch summary API for gsma with expected status of 200 with total 6 txns + Then I should get non empty response + Then I am able to parse batch summary response + And Status of transaction is "COMPLETED" + And I should have matching total txn count and successful txn count in response + #payer debit check + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "1" balance after debit + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "2" balance after debit + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "3" balance after debit + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "4" balance after debit + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "5" balance after debit + Given I have tenant as "payerfsp" + Then I call the balance api for payer with id "6" balance after debit + #payee credit check + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "1" balance after credit + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "2" balance after credit + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "3" balance after credit + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "4" balance after credit + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "5" balance after credit + Given I have tenant as "payeefsp3" + Then I call the balance api for payee with id "6" balance after credit + From ee0f1e41e1a9fb4fcf334be9548cef1d8db1d9f4 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Tue, 2 Apr 2024 11:28:23 +0530 Subject: [PATCH 11/27] Testing only gov1 --- .../cucumber/stepdef/GSMATransferStepDef.java | 43 +++++++++++++ .../stepdef/PayerFundTransferStepDef.java | 40 +++++++++++++ .../batchTransactionGsmaClosedLoop.csv | 7 +++ src/test/java/resources/bulkPayment.feature | 60 +++++++++---------- 4 files changed, 120 insertions(+), 30 deletions(-) create mode 100644 src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java index 1954816fe..c978b6fa0 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java @@ -693,6 +693,28 @@ public void iCallTheBalanceApiForPayeeBalance(String id) throws JsonProcessingEx } + @Then("I call the balance api for payee {string} balance for combine test cases") + public void iCallTheBalanceApiForPayeeBalanceForCombinedTestsCases(String id) throws JsonProcessingException { + RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); + String finalEndpoint = amsBalanceEndpoint; + if (scenarioScopeState.payeeIdentifierforBatch == null) { + scenarioScopeState.payeeIdentifierforBatch = new String[7]; + } + scenarioScopeState.payeeIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payeeIdentifier; + finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); + finalEndpoint = finalEndpoint.replace("{IdentifierId}", creditParty.isEmpty() ? scenarioScopeState.payeeIdentifier : creditParty); + logger.info("Endpoint: " + finalEndpoint); + scenarioScopeState.response = RestAssured.given(requestSpec).baseUri(amsBaseUrl).body("").expect() + .spec(new ResponseSpecBuilder().expectStatusCode(200).build()).when().get(finalEndpoint).andReturn().asString(); + logger.info("Balance Response: " + scenarioScopeState.response); + InteropAccountDTO interopAccountDTO = objectMapper.readValue(scenarioScopeState.response, InteropAccountDTO.class); + assertThat( + interopAccountDTO.getAvailableBalance().intValue() >= scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]) + .isTrue(); + + } + + @Then("I call the balance api for payee with id {string} balance after credit") public void iCallTheBalanceApiForPayeeBalanceAfterCredit(String id) throws JsonProcessingException { RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); @@ -731,6 +753,27 @@ public void iCallTheBalanceApiForPayerBalance(String id) throws JsonProcessingEx } + @Then("I call the balance api for payer {string} balance for combine test cases") + public void iCallTheBalanceApiForPayerBalanceForCombinedTestCases(String id) throws JsonProcessingException { + RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); + String finalEndpoint = amsBalanceEndpoint; + if (scenarioScopeState.payerIdentifierforBatch == null) { + scenarioScopeState.payerIdentifierforBatch = new String[7]; + } + scenarioScopeState.payerIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payerIdentifier; + finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); + finalEndpoint = finalEndpoint.replace("{IdentifierId}", debitParty.isEmpty() ? scenarioScopeState.payerIdentifier : debitParty); + logger.info("Endpoint: " + finalEndpoint); + scenarioScopeState.response = RestAssured.given(requestSpec).baseUri(amsBaseUrl).body("").expect() + .spec(new ResponseSpecBuilder().expectStatusCode(200).build()).when().get(finalEndpoint).andReturn().asString(); + logger.info("Balance Response: " + scenarioScopeState.response); + InteropAccountDTO interopAccountDTO = objectMapper.readValue(scenarioScopeState.response, InteropAccountDTO.class); + assertThat( + interopAccountDTO.getAvailableBalance().intValue() >= scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]) + .isTrue(); + + } + @Then("I call the balance api for payer with id {string} balance after debit") public void iCallTheBalanceApiForPayerBalanceAfterDebit(String id) throws JsonProcessingException { RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java index 1598522f1..9f0ee6585 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java @@ -527,6 +527,20 @@ public void addRowToCsvFile(String paymentMode, int transferAmount, int id) thro scenarioScopeState.gsmaP2PAmtDebitForBatch[id + 1] = transferAmount; } + @Then("add row to csv with current payer and payee, payment mode as {string} and transfer amount {int} and id {int} for combine test cases") + public void addRowToCsvFileForCombinedTestCases(String paymentMode, int transferAmount, int id) throws IOException { + + String[] row = { String.valueOf(id), UUID.randomUUID().toString(), paymentMode, "msisdn", scenarioScopeState.payerIdentifier, + "msisdn", scenarioScopeState.payeeIdentifier, String.valueOf(transferAmount), "USD", "Test Payee Payment" }; + String filePath = Utils.getAbsoluteFilePathToResource(scenarioScopeState.filename); + csvHelper.addRow(filePath, row); + scenarioScopeState.gsmaP2PAmtDebit = scenarioScopeState.gsmaP2PAmtDebit + transferAmount; + if (scenarioScopeState.gsmaP2PAmtDebitForBatch == null) { + scenarioScopeState.gsmaP2PAmtDebitForBatch = new int[7]; + } + scenarioScopeState.gsmaP2PAmtDebitForBatch[id + 1] = transferAmount; + } + @Then("add last row to csv with current payer and payee, payment mode as {string} and transfer amount {int} and id {int}") public void addLastRowToCsvFile(String paymentMode, int transferAmount, int id) throws IOException { @@ -565,4 +579,30 @@ public void consolidatedPayeeCreationSteps(String client, String id, int amount) } } + @When("I create and setup a {string} with id {string} and account balance of {int} for combine test cases") + public void consolidatedPayeeCreationStepsForCombinedTestsCases(String client, String id, int amount) throws JsonProcessingException { + setTenantForPayer(client); + callCreateClientEndpoint(client); + callCreateSavingsProductEndpoint(client); + callCreateSavingsAccountEndpoint(client); + callCreateInteropIdentifierEndpoint(client); + callApproveSavingsEndpoint("approve", client); + callSavingsActivateEndpoint("activate", client); + callDepositAccountEndpoint("deposit", amount, client); + if (client.equals("payer")) { + if (scenarioScopeState.initialBalForPayerForBatch == null) { + scenarioScopeState.initialBalForPayerForBatch = new int[7]; + } + scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]).isNotNull(); + + } else if (client.equals("payee")) { + if (scenarioScopeState.initialBalForPayeeForBatch == null) { + scenarioScopeState.initialBalForPayeeForBatch = new int[7]; + } + scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]).isNotNull(); + } + } + } diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv new file mode 100644 index 000000000..35fd69b79 --- /dev/null +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -0,0 +1,7 @@ +id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note +0,3e2d489f-031f-418a-a225-f619a38ada22,gsma,msisdn,2050,msisdn,1865,10,USD,Test Payee Payment +1,76f94eb7-d20e-4641-b193-9dc972a32f5f,gsma,msisdn,2051,msisdn,1866,5,USD,Test Payee Payment +2,00784a84-ac2c-4f3f-ba64-47c597db4e14,gsma,msisdn,2052,msisdn,1867,5,USD,Test Payee Payment +3,ce750869-018c-40bd-84d6-34e2e633b33c,closedloop,msisdn,2053,msisdn,1868,5,USD,Test Payee Payment +4,fe7c7b44-0e9e-4fe4-bd34-3802fe1e5014,closedloop,msisdn,2054,msisdn,1869,5,USD,Test Payee Payment +5,493361c0-f824-46e0-8f84-493ef181a7f5,gsma,msisdn,2055,msisdn,1870,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 9b9c732d8..641f19777 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -53,78 +53,78 @@ Feature: Test ability to make payment to individual with bank account Scenario: Bulk Transfer with ClosedLoop and GSMA #payer 1 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "1" and account balance of 100 + When I create and setup a "payer" with id "1" and account balance of 100 for combine test cases Given I have tenant as "payerfsp" - Then I call the balance api for payer "1" balance + Then I call the balance api for payer "1" balance for combine test cases #payee 1 creation - When I create and setup a "payee" with id "1" and account balance of 10 + When I create and setup a "payee" with id "1" and account balance of 10 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "1" balance + Then I call the balance api for payee "1" balance for combine test cases - Then Create a csv file with file name "batchTransactionGsma.csv" - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 10 and id 0 + Then Create a csv file with file name "batchTransactionGsmaClosedLoop.csv" + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 10 and id 0 for combine test cases #payer 2 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "2" and account balance of 50 + When I create and setup a "payer" with id "2" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" - Then I call the balance api for payer "2" balance + Then I call the balance api for payer "2" balance for combine test cases #payee 2 creation - When I create and setup a "payee" with id "2" and account balance of 20 + When I create and setup a "payee" with id "2" and account balance of 20 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "2" balance + Then I call the balance api for payee "2" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 1 + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 1 for combine test cases #payer 3 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "3" and account balance of 50 + When I create and setup a "payer" with id "3" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" Then I call the balance api for payer "3" balance #payee 2 creation - When I create and setup a "payee" with id "3" and account balance of 20 + When I create and setup a "payee" with id "3" and account balance of 20 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "3" balance + Then I call the balance api for payee "3" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 2 + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 2 for combine test cases #payer 2 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "4" and account balance of 50 + When I create and setup a "payer" with id "4" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" - Then I call the balance api for payer "4" balance + Then I call the balance api for payer "4" balance for combine test cases #payee 2 creation - When I create and setup a "payee" with id "4" and account balance of 20 + When I create and setup a "payee" with id "4" and account balance of 20 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "4" balance + Then I call the balance api for payee "4" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 for combine test cases #payer 2 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "5" and account balance of 50 + When I create and setup a "payer" with id "5" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" - Then I call the balance api for payer "5" balance + Then I call the balance api for payer "5" balance for combine test cases #payee 2 creation - When I create and setup a "payee" with id "5" and account balance of 20 + When I create and setup a "payee" with id "5" and account balance of 20 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "5" balance + Then I call the balance api for payee "5" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 for combine test cases #payer 3 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "6" and account balance of 30 + When I create and setup a "payer" with id "6" and account balance of 30 for combine test cases Given I have tenant as "payerfsp" - Then I call the balance api for payer "6" balance + Then I call the balance api for payer "6" balance for combine test cases #payee 3 creation - When I create and setup a "payee" with id "6" and account balance of 30 + When I create and setup a "payee" with id "6" and account balance of 30 for combine test cases Given I have tenant as "payeefsp3" - Then I call the balance api for payee "6" balance + Then I call the balance api for payee "6" balance for combine test cases Then add last row to csv with current payer and payee, payment mode as "gsma" and transfer amount 1 and id 5 #batch process Given I have tenant as "payerfsp" - And I have the demo csv file "batchTransactionGsma.csv" + And I have the demo csv file "batchTransactionGsmaClosedLoop.csv" And I generate clientCorrelationId And I have private key And I generate signature From d958b3dffdf53de787fe0b0130b209222eadd3f3 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Tue, 2 Apr 2024 14:00:40 +0530 Subject: [PATCH 12/27] Testing only gov1 --- .../batch_demo_csv/batchTransactionGsma.csv | 6 +++--- .../batchTransactionGsmaClosedLoop.csv | 12 ++++++------ src/test/java/resources/bulkPayment.feature | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv index 3d7c9e51b..4183bb6fb 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsma.csv @@ -1,4 +1,4 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,ca3a9c24-03fa-4290-ab58-9005b624d830,gsma,msisdn,1607,msisdn,1470,10,USD,Test Payee Payment -1,27b0c614-0eb5-43b0-bf1a-0c3232d6bcac,gsma,msisdn,1608,msisdn,1471,5,USD,Test Payee Payment -2,2dd985de-68f5-4ec0-981e-8aa94980faa9,gsma,msisdn,1609,msisdn,1472,1,USD,Test Payee Payment \ No newline at end of file +0,f41f4f3a-479f-44d3-b254-1f6574b11e09,gsma,msisdn,2224,msisdn,2032,10,USD,Test Payee Payment +1,caf6c982-7182-4d4d-9931-75da625cec66,gsma,msisdn,2225,msisdn,2033,5,USD,Test Payee Payment +2,7e79d1b1-d000-43f4-a13f-451dd4c51457,gsma,msisdn,2226,msisdn,2034,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 35fd69b79..03cf74233 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,7 +1,7 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,3e2d489f-031f-418a-a225-f619a38ada22,gsma,msisdn,2050,msisdn,1865,10,USD,Test Payee Payment -1,76f94eb7-d20e-4641-b193-9dc972a32f5f,gsma,msisdn,2051,msisdn,1866,5,USD,Test Payee Payment -2,00784a84-ac2c-4f3f-ba64-47c597db4e14,gsma,msisdn,2052,msisdn,1867,5,USD,Test Payee Payment -3,ce750869-018c-40bd-84d6-34e2e633b33c,closedloop,msisdn,2053,msisdn,1868,5,USD,Test Payee Payment -4,fe7c7b44-0e9e-4fe4-bd34-3802fe1e5014,closedloop,msisdn,2054,msisdn,1869,5,USD,Test Payee Payment -5,493361c0-f824-46e0-8f84-493ef181a7f5,gsma,msisdn,2055,msisdn,1870,1,USD,Test Payee Payment \ No newline at end of file +0,fb9374be-44cd-4a30-98d4-073a2e3c679e,gsma,msisdn,2218,msisdn,2026,10,USD,Test Payee Payment +1,b6b3314f-479c-494a-8a56-c86895add8d1,gsma,msisdn,2219,msisdn,2027,5,USD,Test Payee Payment +2,fad72385-78e3-4615-a912-461a2d2295b2,gsma,msisdn,2220,msisdn,2028,5,USD,Test Payee Payment +3,e758863c-5d0a-4f91-89b0-79f046f78e8b,closedloop,msisdn,2221,msisdn,2029,5,USD,Test Payee Payment +4,6229f1e8-1ac9-4b9f-9232-a389940b9e41,closedloop,msisdn,2222,msisdn,2030,5,USD,Test Payee Payment +5,23224cf0-f5ed-4dae-adee-8b7a4d0217b5,closedloop,msisdn,2223,msisdn,2031,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 641f19777..795537dbd 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -88,7 +88,7 @@ Feature: Test ability to make payment to individual with bank account Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 2 for combine test cases - #payer 2 creation + #payer 4 creation Given I have Fineract-Platform-TenantId as "payerfsp2" When I create and setup a "payer" with id "4" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" @@ -100,7 +100,7 @@ Feature: Test ability to make payment to individual with bank account Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 for combine test cases - #payer 2 creation + #payer 5 creation Given I have Fineract-Platform-TenantId as "payerfsp2" When I create and setup a "payer" with id "5" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" @@ -111,7 +111,7 @@ Feature: Test ability to make payment to individual with bank account Then I call the balance api for payee "5" balance for combine test cases Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 for combine test cases - #payer 3 creation + #payer 6 creation Given I have Fineract-Platform-TenantId as "payerfsp2" When I create and setup a "payer" with id "6" and account balance of 30 for combine test cases Given I have tenant as "payerfsp" @@ -121,7 +121,7 @@ Feature: Test ability to make payment to individual with bank account Given I have tenant as "payeefsp3" Then I call the balance api for payee "6" balance for combine test cases - Then add last row to csv with current payer and payee, payment mode as "gsma" and transfer amount 1 and id 5 + Then add last row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 1 and id 5 #batch process Given I have tenant as "payerfsp" And I have the demo csv file "batchTransactionGsmaClosedLoop.csv" From 77517b57b39e49bba0d62bbcd06aaec5c250040d Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Tue, 2 Apr 2024 15:35:04 +0530 Subject: [PATCH 13/27] Testing only gov1 --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 795537dbd..a2727edbb 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -123,7 +123,7 @@ Feature: Test ability to make payment to individual with bank account Then add last row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 1 and id 5 #batch process - Given I have tenant as "payerfsp" + Given I have tenant as "paymentbb1" And I have the demo csv file "batchTransactionGsmaClosedLoop.csv" And I generate clientCorrelationId And I have private key From 8072f3d814f674432c3d08b923506eb73f828cb1 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Tue, 2 Apr 2024 17:05:29 +0530 Subject: [PATCH 14/27] Testing only gov1 --- .../cucumber/stepdef/GSMATransferStepDef.java | 4 +- .../stepdef/PayerFundTransferStepDef.java | 6 +- .../batchTransactionGsmaClosedLoop.csv | 14 ++-- src/test/java/resources/bulkPayment.feature | 71 +++++++++---------- 4 files changed, 47 insertions(+), 48 deletions(-) diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java index c978b6fa0..9ce34c6ad 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java @@ -698,7 +698,7 @@ public void iCallTheBalanceApiForPayeeBalanceForCombinedTestsCases(String id) th RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); String finalEndpoint = amsBalanceEndpoint; if (scenarioScopeState.payeeIdentifierforBatch == null) { - scenarioScopeState.payeeIdentifierforBatch = new String[7]; + scenarioScopeState.payeeIdentifierforBatch = new String[9]; } scenarioScopeState.payeeIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payeeIdentifier; finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); @@ -758,7 +758,7 @@ public void iCallTheBalanceApiForPayerBalanceForCombinedTestCases(String id) thr RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); String finalEndpoint = amsBalanceEndpoint; if (scenarioScopeState.payerIdentifierforBatch == null) { - scenarioScopeState.payerIdentifierforBatch = new String[7]; + scenarioScopeState.payerIdentifierforBatch = new String[9]; } scenarioScopeState.payerIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payerIdentifier; finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java index 9f0ee6585..c2bde221d 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java @@ -536,7 +536,7 @@ public void addRowToCsvFileForCombinedTestCases(String paymentMode, int transfer csvHelper.addRow(filePath, row); scenarioScopeState.gsmaP2PAmtDebit = scenarioScopeState.gsmaP2PAmtDebit + transferAmount; if (scenarioScopeState.gsmaP2PAmtDebitForBatch == null) { - scenarioScopeState.gsmaP2PAmtDebitForBatch = new int[7]; + scenarioScopeState.gsmaP2PAmtDebitForBatch = new int[9]; } scenarioScopeState.gsmaP2PAmtDebitForBatch[id + 1] = transferAmount; } @@ -591,14 +591,14 @@ public void consolidatedPayeeCreationStepsForCombinedTestsCases(String client, S callDepositAccountEndpoint("deposit", amount, client); if (client.equals("payer")) { if (scenarioScopeState.initialBalForPayerForBatch == null) { - scenarioScopeState.initialBalForPayerForBatch = new int[7]; + scenarioScopeState.initialBalForPayerForBatch = new int[9]; } scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)] = amount; assertThat(scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]).isNotNull(); } else if (client.equals("payee")) { if (scenarioScopeState.initialBalForPayeeForBatch == null) { - scenarioScopeState.initialBalForPayeeForBatch = new int[7]; + scenarioScopeState.initialBalForPayeeForBatch = new int[9]; } scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)] = amount; assertThat(scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]).isNotNull(); diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 03cf74233..c999b3087 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,7 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,fb9374be-44cd-4a30-98d4-073a2e3c679e,gsma,msisdn,2218,msisdn,2026,10,USD,Test Payee Payment -1,b6b3314f-479c-494a-8a56-c86895add8d1,gsma,msisdn,2219,msisdn,2027,5,USD,Test Payee Payment -2,fad72385-78e3-4615-a912-461a2d2295b2,gsma,msisdn,2220,msisdn,2028,5,USD,Test Payee Payment -3,e758863c-5d0a-4f91-89b0-79f046f78e8b,closedloop,msisdn,2221,msisdn,2029,5,USD,Test Payee Payment -4,6229f1e8-1ac9-4b9f-9232-a389940b9e41,closedloop,msisdn,2222,msisdn,2030,5,USD,Test Payee Payment -5,23224cf0-f5ed-4dae-adee-8b7a4d0217b5,closedloop,msisdn,2223,msisdn,2031,1,USD,Test Payee Payment \ No newline at end of file +0,61c133fa-ed7c-4e14-aa28-2f9afb80d917,closedloop,msisdn,2395,msisdn,2198,10,USD,Test Payee Payment +1,7ffaac04-c76f-430d-8704-20b16886062c,closedloop,msisdn,2396,msisdn,2199,5,USD,Test Payee Payment +2,5b3f2f8b-e44e-4b76-bf30-3d6c618a7747,closedloop,msisdn,2397,msisdn,2200,5,USD,Test Payee Payment +3,425c9d31-6284-4479-bbcf-a04af6b7f913,closedloop,msisdn,2398,msisdn,2201,5,USD,Test Payee Payment +4,4c610dd9-e614-4935-859b-8e52f43d0b1f,closedloop,msisdn,2399,msisdn,2202,5,USD,Test Payee Payment +5,cea5199a-9b0e-460f-8282-f8f06548596f,gsma,msisdn,2400,msisdn,2203,6,USD,Test Payee Payment +6,dcb8a0a0-a5f4-40bf-858b-af9d03cf5781,gsma,msisdn,2401,msisdn,2204,7,USD,Test Payee Payment +7,8a12ec54-05d5-4faf-838f-2af644cc19fa,gsma,msisdn,2402,msisdn,2205,8,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index a2727edbb..2ed2b6e4f 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -62,7 +62,7 @@ Feature: Test ability to make payment to individual with bank account Then I call the balance api for payee "1" balance for combine test cases Then Create a csv file with file name "batchTransactionGsmaClosedLoop.csv" - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 10 and id 0 for combine test cases + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 10 and id 0 for combine test cases #payer 2 creation Given I have Fineract-Platform-TenantId as "payerfsp2" @@ -74,7 +74,7 @@ Feature: Test ability to make payment to individual with bank account Given I have tenant as "payeefsp3" Then I call the balance api for payee "2" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 1 for combine test cases + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 1 for combine test cases #payer 3 creation Given I have Fineract-Platform-TenantId as "payerfsp2" @@ -86,7 +86,7 @@ Feature: Test ability to make payment to individual with bank account Given I have tenant as "payeefsp3" Then I call the balance api for payee "3" balance for combine test cases - Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 5 and id 2 for combine test cases + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 2 for combine test cases #payer 4 creation Given I have Fineract-Platform-TenantId as "payerfsp2" @@ -99,8 +99,7 @@ Feature: Test ability to make payment to individual with bank account Then I call the balance api for payee "4" balance for combine test cases Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 for combine test cases - - #payer 5 creation + #payer 4 creation Given I have Fineract-Platform-TenantId as "payerfsp2" When I create and setup a "payer" with id "5" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" @@ -111,17 +110,41 @@ Feature: Test ability to make payment to individual with bank account Then I call the balance api for payee "5" balance for combine test cases Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 for combine test cases - #payer 6 creation + + #payer 4 creation Given I have Fineract-Platform-TenantId as "payerfsp2" - When I create and setup a "payer" with id "6" and account balance of 30 for combine test cases + When I create and setup a "payer" with id "6" and account balance of 50 for combine test cases Given I have tenant as "payerfsp" Then I call the balance api for payer "6" balance for combine test cases - #payee 3 creation - When I create and setup a "payee" with id "6" and account balance of 30 for combine test cases + #payee 2 creation + When I create and setup a "payee" with id "6" and account balance of 20 for combine test cases Given I have tenant as "payeefsp3" Then I call the balance api for payee "6" balance for combine test cases - Then add last row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 1 and id 5 + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 6 and id 5 for combine test cases + + #payer 5 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "7" and account balance of 50 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "7" balance for combine test cases + #payee 2 creation + When I create and setup a "payee" with id "7" and account balance of 20 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "7" balance for combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 7 and id 6 for combine test cases + #payer 6 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "8" and account balance of 30 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "8" balance for combine test cases + #payee 3 creation + When I create and setup a "payee" with id "8" and account balance of 30 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "8" balance for combine test cases + + Then add last row to csv with current payer and payee, payment mode as "gsma" and transfer amount 8 and id 7 #batch process Given I have tenant as "paymentbb1" And I have the demo csv file "batchTransactionGsmaClosedLoop.csv" @@ -131,35 +154,9 @@ Feature: Test ability to make payment to individual with bank account When I call the batch transactions endpoint with expected status of 202 And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response - When I call the batch summary API for gsma with expected status of 200 with total 6 txns + When I call the batch summary API for gsma with expected status of 200 with total 8 txns Then I should get non empty response Then I am able to parse batch summary response And Status of transaction is "COMPLETED" And I should have matching total txn count and successful txn count in response - #payer debit check - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "1" balance after debit - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "2" balance after debit - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "3" balance after debit - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "4" balance after debit - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "5" balance after debit - Given I have tenant as "payerfsp" - Then I call the balance api for payer with id "6" balance after debit - #payee credit check - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "1" balance after credit - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "2" balance after credit - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "3" balance after credit - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "4" balance after credit - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "5" balance after credit - Given I have tenant as "payeefsp3" - Then I call the balance api for payee with id "6" balance after credit From 2c513c78bca709765c9971f150ea02b128acc6c6 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 3 Apr 2024 10:33:58 +0530 Subject: [PATCH 15/27] Testing only gov1 --- .circleci/config.yml | 20 +++++++++---------- .../batchTransactionGsmaClosedLoop.csv | 16 +++++++-------- src/test/java/resources/bulkPayment.feature | 2 +- src/test/java/resources/gsmaP2P.feature | 2 +- src/test/java/resources/mojaloop.feature | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0864c9262..aa89477fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -227,7 +227,7 @@ jobs: export CALLBACK_URL="https://$NGROK_PUBLIC_URL" echo -n "Public url ." echo $CALLBACK_URL - ./gradlew test -Dcucumber.filter.tags="@gov1" + ./gradlew test -Dcucumber.filter.tags="@gov" echo -n "Test execution is completed, kill ngrok" pkill ngrok - store_test_results: @@ -317,15 +317,7 @@ workflows: - AWS - Helm - slack -# - test-chart-ams: -# requires: -# - deploying-bpmns -# context: -# - AWS -# - Helm -# - slack -# - Ngrok - - test-chart-gov: + - test-chart-ams: requires: - deploying-bpmns context: @@ -333,6 +325,14 @@ workflows: - Helm - slack - Ngrok + - test-chart-gov: + requires: + - test-chart-ams + context: + - AWS + - Helm + - slack + - Ngrok - create-tls-secret-paymenthub-namespace: context: - AWS diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index c999b3087..e9876837d 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,61c133fa-ed7c-4e14-aa28-2f9afb80d917,closedloop,msisdn,2395,msisdn,2198,10,USD,Test Payee Payment -1,7ffaac04-c76f-430d-8704-20b16886062c,closedloop,msisdn,2396,msisdn,2199,5,USD,Test Payee Payment -2,5b3f2f8b-e44e-4b76-bf30-3d6c618a7747,closedloop,msisdn,2397,msisdn,2200,5,USD,Test Payee Payment -3,425c9d31-6284-4479-bbcf-a04af6b7f913,closedloop,msisdn,2398,msisdn,2201,5,USD,Test Payee Payment -4,4c610dd9-e614-4935-859b-8e52f43d0b1f,closedloop,msisdn,2399,msisdn,2202,5,USD,Test Payee Payment -5,cea5199a-9b0e-460f-8282-f8f06548596f,gsma,msisdn,2400,msisdn,2203,6,USD,Test Payee Payment -6,dcb8a0a0-a5f4-40bf-858b-af9d03cf5781,gsma,msisdn,2401,msisdn,2204,7,USD,Test Payee Payment -7,8a12ec54-05d5-4faf-838f-2af644cc19fa,gsma,msisdn,2402,msisdn,2205,8,USD,Test Payee Payment \ No newline at end of file +0,a7873b41-cb43-453f-946f-38845fc27c55,closedloop,msisdn,2462,msisdn,2264,10,USD,Test Payee Payment +1,2aed7acc-9506-42ef-b6a0-275a7074bbbb,closedloop,msisdn,2463,msisdn,2265,5,USD,Test Payee Payment +2,73dffd54-d5fe-4da4-991b-fe2e61415325,closedloop,msisdn,2464,msisdn,2266,5,USD,Test Payee Payment +3,172bc17e-29b3-4045-b552-ca31973e247f,closedloop,msisdn,2465,msisdn,2267,5,USD,Test Payee Payment +4,927a14bb-71b2-46e2-aa09-cbb6da9f3a0c,closedloop,msisdn,2466,msisdn,2268,5,USD,Test Payee Payment +5,de2e4bd1-76be-407d-a33a-6cfb161fc260,gsma,msisdn,2467,msisdn,2269,6,USD,Test Payee Payment +6,a6e0e5d5-e5a4-4e42-857d-62bb0c2e9ee3,gsma,msisdn,2468,msisdn,2270,7,USD,Test Payee Payment +7,50ddfdbf-6da3-4264-af36-c254f0ccfe0b,gsma,msisdn,2469,msisdn,2271,8,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 2ed2b6e4f..615949b6c 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -1,4 +1,4 @@ -@gov1 +@gov Feature: Test ability to make payment to individual with bank account Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status diff --git a/src/test/java/resources/gsmaP2P.feature b/src/test/java/resources/gsmaP2P.feature index 7e2b065f3..eaddd9f4b 100644 --- a/src/test/java/resources/gsmaP2P.feature +++ b/src/test/java/resources/gsmaP2P.feature @@ -1,4 +1,4 @@ -@amsIntegration @govtodo @gov1 +@amsIntegration @govtodo Feature: GSMA Outbound Transfer test diff --git a/src/test/java/resources/mojaloop.feature b/src/test/java/resources/mojaloop.feature index 7ba6aec46..3cae45cf8 100644 --- a/src/test/java/resources/mojaloop.feature +++ b/src/test/java/resources/mojaloop.feature @@ -1,4 +1,4 @@ -@gov1 @ext +@gov @ext Feature: Mojaloop test Scenario: ML connector partial payee party lookup test From 91d253f373a6a2f157c744f5986fd474df6941e7 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 3 Apr 2024 12:28:44 +0530 Subject: [PATCH 16/27] Testing --- .../batchTransactionGsmaClosedLoop.csv | 16 ++++++++-------- src/test/java/resources/bulkPayment.feature | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index e9876837d..96ba3cc1b 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,a7873b41-cb43-453f-946f-38845fc27c55,closedloop,msisdn,2462,msisdn,2264,10,USD,Test Payee Payment -1,2aed7acc-9506-42ef-b6a0-275a7074bbbb,closedloop,msisdn,2463,msisdn,2265,5,USD,Test Payee Payment -2,73dffd54-d5fe-4da4-991b-fe2e61415325,closedloop,msisdn,2464,msisdn,2266,5,USD,Test Payee Payment -3,172bc17e-29b3-4045-b552-ca31973e247f,closedloop,msisdn,2465,msisdn,2267,5,USD,Test Payee Payment -4,927a14bb-71b2-46e2-aa09-cbb6da9f3a0c,closedloop,msisdn,2466,msisdn,2268,5,USD,Test Payee Payment -5,de2e4bd1-76be-407d-a33a-6cfb161fc260,gsma,msisdn,2467,msisdn,2269,6,USD,Test Payee Payment -6,a6e0e5d5-e5a4-4e42-857d-62bb0c2e9ee3,gsma,msisdn,2468,msisdn,2270,7,USD,Test Payee Payment -7,50ddfdbf-6da3-4264-af36-c254f0ccfe0b,gsma,msisdn,2469,msisdn,2271,8,USD,Test Payee Payment \ No newline at end of file +0,67c5df13-621a-43d7-b5f3-9615bff8ebfe,closedloop,msisdn,2632,msisdn,2425,10,USD,Test Payee Payment +1,5e7153ca-f7bc-4815-8fb6-8c73d3a9150e,closedloop,msisdn,2633,msisdn,2426,5,USD,Test Payee Payment +2,6f0f1bc1-d427-4174-bf31-eadf6f374122,closedloop,msisdn,2634,msisdn,2427,5,USD,Test Payee Payment +3,7e45c3fe-9d46-4acb-b79d-a29c294f3545,closedloop,msisdn,2635,msisdn,2428,5,USD,Test Payee Payment +4,9ad70453-70ba-46d5-a801-169ade5a9c4b,closedloop,msisdn,2636,msisdn,2429,5,USD,Test Payee Payment +5,7aeefebd-ad91-4435-b84c-b83146ee7746,gsma,msisdn,2637,msisdn,2430,6,USD,Test Payee Payment +6,de139099-3d39-4f7a-b907-cb94e81ea4fa,gsma,msisdn,2638,msisdn,2431,7,USD,Test Payee Payment +7,469c4dbc-6bf2-4f17-9b58-0b001a2d030b,gsma,msisdn,2639,msisdn,2432,8,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 615949b6c..f79d1b97c 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -25,7 +25,7 @@ Feature: Test ability to make payment to individual with bank account And Status of transaction is "COMPLETED" And I should have matching total txn count and successful txn count in response - Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status + Scenario: Bulk Transfer with ClosedLoop and Mojaloop Given I have tenant as "paymentbb1" And I have the demo csv file "bulk_payment_closedl_mock_mojaloop.csv" And I create a list of payee identifiers from csv file From ab117096fd01896789f8d51a6838f9760526e555 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 3 Apr 2024 13:42:47 +0530 Subject: [PATCH 17/27] Testing --- .../cucumber/stepdef/BatchApiStepDef.java | 33 +++++++++++++++++++ .../batchTransactionGsmaClosedLoop.csv | 16 ++++----- src/test/java/resources/bulkPayment.feature | 9 +++-- 3 files changed, 45 insertions(+), 13 deletions(-) diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java index 192b09320..556000da6 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java @@ -145,6 +145,26 @@ public void callBatchSummaryAPI(int expectedStatus, int totalTxns) { }); } + @When("I call the batch summary API with expected status of {int} with total successfull {int} txns") + public void callBatchSummaryAPIBulk(int expectedStatus, int totalTxns) { + await().atMost(awaitMost, SECONDS).pollDelay(pollDelay, SECONDS).pollInterval(pollInterval, SECONDS).untilAsserted(() -> { + RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); + if (authEnabled) { + requestSpec.header("Authorization", "Bearer " + scenarioScopeState.accessToken); + } + // requestSpec.queryParam("batchId", scenarioScopeDef.batchId); + logger.info("Calling with batch id: {}", scenarioScopeState.batchId); + + scenarioScopeState.response = RestAssured.given(requestSpec).baseUri(operationsAppConfig.operationAppContactPoint).expect() + .spec(new ResponseSpecBuilder().expectStatusCode(expectedStatus).build()).when() + .get(operationsAppConfig.batchSummaryEndpoint + "/" + scenarioScopeState.batchId).andReturn().asString(); + + logger.info("Batch Summary Response: " + scenarioScopeState.response); + BatchDTO res = objectMapper.readValue(scenarioScopeState.response, BatchDTO.class); + assertThat(res.getSuccessful()).isEqualTo(totalTxns); + }); + } + @When("I call the batch summary API for gsma with expected status of {int} with total {int} txns") public void callBatchSummaryAPIGSMA(int expectedStatus, int totalTxns) { await().atMost(awaitMost, SECONDS).pollDelay(pollDelay, SECONDS).pollInterval(pollInterval, SECONDS).untilAsserted(() -> { @@ -376,6 +396,19 @@ public void iShouldHaveMatchingTotalTxnCountAndSuccessfulTxnCountInResponse() { }); } + @And("My total txns {} and successful txn count in response should Match") + public void iShouldHaveMatchingTotalTxnCountAndSuccessfulTxnCount(int totalTxnsCount) { + await().atMost(awaitMost, SECONDS).untilAsserted(() -> { + assertThat(scenarioScopeState.batchDTO).isNotNull(); + assertThat(scenarioScopeState.batchDTO.getTotal()).isNotNull(); + assertThat(scenarioScopeState.batchDTO.getSuccessful()).isNotNull(); + assertThat(scenarioScopeState.batchDTO.getTotal()).isGreaterThan(0); + assertThat(scenarioScopeState.batchDTO.getSuccessful()).isGreaterThan(0); + assertThat(totalTxnsCount).isEqualTo(scenarioScopeState.batchDTO.getSuccessful()); + + }); + } + @When("I can assert the approved count as {int} and approved amount as {int}") public void iCanAssertTheApprovedCountAsAndApprovedAmountAs(int count, int amount) { BigDecimal approvedCount = scenarioScopeState.batchDTO.getApprovedCount(); diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 96ba3cc1b..33195aa61 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,67c5df13-621a-43d7-b5f3-9615bff8ebfe,closedloop,msisdn,2632,msisdn,2425,10,USD,Test Payee Payment -1,5e7153ca-f7bc-4815-8fb6-8c73d3a9150e,closedloop,msisdn,2633,msisdn,2426,5,USD,Test Payee Payment -2,6f0f1bc1-d427-4174-bf31-eadf6f374122,closedloop,msisdn,2634,msisdn,2427,5,USD,Test Payee Payment -3,7e45c3fe-9d46-4acb-b79d-a29c294f3545,closedloop,msisdn,2635,msisdn,2428,5,USD,Test Payee Payment -4,9ad70453-70ba-46d5-a801-169ade5a9c4b,closedloop,msisdn,2636,msisdn,2429,5,USD,Test Payee Payment -5,7aeefebd-ad91-4435-b84c-b83146ee7746,gsma,msisdn,2637,msisdn,2430,6,USD,Test Payee Payment -6,de139099-3d39-4f7a-b907-cb94e81ea4fa,gsma,msisdn,2638,msisdn,2431,7,USD,Test Payee Payment -7,469c4dbc-6bf2-4f17-9b58-0b001a2d030b,gsma,msisdn,2639,msisdn,2432,8,USD,Test Payee Payment \ No newline at end of file +0,6c3316c5-8fe1-4a35-9394-25c9982e7dfc,closedloop,msisdn,2663,msisdn,2455,10,USD,Test Payee Payment +1,b6b77f84-fb36-4770-9c0e-6cd2b5b75f96,closedloop,msisdn,2664,msisdn,2456,5,USD,Test Payee Payment +2,d72df76c-43c0-445c-9b9a-ff2645ab578a,closedloop,msisdn,2665,msisdn,2457,5,USD,Test Payee Payment +3,83ab259d-0d7b-4aff-b4c6-3dca09ec4ea7,closedloop,msisdn,2666,msisdn,2458,5,USD,Test Payee Payment +4,48c00913-ab60-40eb-a39b-bbf613023ff8,closedloop,msisdn,2667,msisdn,2459,5,USD,Test Payee Payment +5,a0999323-3495-4a66-9373-b1876ef35c04,gsma,msisdn,2668,msisdn,2460,6,USD,Test Payee Payment +6,5311e68c-7d4d-4f42-92b8-841471ba82a3,gsma,msisdn,2669,msisdn,2461,7,USD,Test Payee Payment +7,c9463943-67f3-4612-a7f4-1d5ba32a85f5,gsma,msisdn,2670,msisdn,2462,8,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index f79d1b97c..254677d9c 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -44,11 +44,10 @@ Feature: Test ability to make payment to individual with bank account And I fetch batch ID from batch transaction API's response # Then I will sleep for 10000 millisecond Given I have tenant as "paymentbb1" - When I call the batch summary API with expected status of 200 with total 8 txns + When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" - And I should have matching total txn count and successful txn count in response - + And My total txns 8 and successful txn count in response should Match Scenario: Bulk Transfer with ClosedLoop and GSMA #payer 1 creation @@ -154,9 +153,9 @@ Feature: Test ability to make payment to individual with bank account When I call the batch transactions endpoint with expected status of 202 And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response - When I call the batch summary API for gsma with expected status of 200 with total 8 txns + When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I should get non empty response Then I am able to parse batch summary response And Status of transaction is "COMPLETED" - And I should have matching total txn count and successful txn count in response + And My total txns 8 and successful txn count in response should Match From e9cf2e0f5dee93cba01d227a55b1b1858325682b Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 3 Apr 2024 21:10:11 +0530 Subject: [PATCH 18/27] Testing --- .../batchTransactionGsmaClosedLoop.csv | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 33195aa61..647fcc31b 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,6c3316c5-8fe1-4a35-9394-25c9982e7dfc,closedloop,msisdn,2663,msisdn,2455,10,USD,Test Payee Payment -1,b6b77f84-fb36-4770-9c0e-6cd2b5b75f96,closedloop,msisdn,2664,msisdn,2456,5,USD,Test Payee Payment -2,d72df76c-43c0-445c-9b9a-ff2645ab578a,closedloop,msisdn,2665,msisdn,2457,5,USD,Test Payee Payment -3,83ab259d-0d7b-4aff-b4c6-3dca09ec4ea7,closedloop,msisdn,2666,msisdn,2458,5,USD,Test Payee Payment -4,48c00913-ab60-40eb-a39b-bbf613023ff8,closedloop,msisdn,2667,msisdn,2459,5,USD,Test Payee Payment -5,a0999323-3495-4a66-9373-b1876ef35c04,gsma,msisdn,2668,msisdn,2460,6,USD,Test Payee Payment -6,5311e68c-7d4d-4f42-92b8-841471ba82a3,gsma,msisdn,2669,msisdn,2461,7,USD,Test Payee Payment -7,c9463943-67f3-4612-a7f4-1d5ba32a85f5,gsma,msisdn,2670,msisdn,2462,8,USD,Test Payee Payment \ No newline at end of file +0,1685ffdb-36cb-448f-9622-41f9d572b996,closedloop,msisdn,2821,msisdn,2605,10,USD,Test Payee Payment +1,7040745e-9959-40bd-8a18-d705b662f163,closedloop,msisdn,2822,msisdn,2606,5,USD,Test Payee Payment +2,3a8376ff-8003-4dd7-bd39-46c8fc4f1446,closedloop,msisdn,2823,msisdn,2607,5,USD,Test Payee Payment +3,61e4fdfa-cd5d-4356-8176-03edab7c37de,closedloop,msisdn,2824,msisdn,2608,5,USD,Test Payee Payment +4,73d5d001-4161-4221-b361-bdefe04cb981,closedloop,msisdn,2825,msisdn,2609,5,USD,Test Payee Payment +5,e7368c89-f976-4aca-89b9-8f89ba8c73ab,gsma,msisdn,2826,msisdn,2610,6,USD,Test Payee Payment +6,8ea52a89-d2e6-4ba0-bae8-30365da5c1ee,gsma,msisdn,2827,msisdn,2611,7,USD,Test Payee Payment +7,ecbca064-b725-44c6-a3f5-ef07dbf3cf9b,gsma,msisdn,2828,msisdn,2612,8,USD,Test Payee Payment \ No newline at end of file From 893d5ecea9dec36b341a90f0965485156c8fea20 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 3 Apr 2024 22:12:34 +0530 Subject: [PATCH 19/27] Testing --- .../cucumber/stepdef/BatchApiStepDef.java | 2 +- .../batchTransactionGsmaClosedLoop.csv | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java index 556000da6..708938167 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/BatchApiStepDef.java @@ -161,7 +161,7 @@ public void callBatchSummaryAPIBulk(int expectedStatus, int totalTxns) { logger.info("Batch Summary Response: " + scenarioScopeState.response); BatchDTO res = objectMapper.readValue(scenarioScopeState.response, BatchDTO.class); - assertThat(res.getSuccessful()).isEqualTo(totalTxns); + assertThat(res.getTotal()).isEqualTo(totalTxns); }); } diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 647fcc31b..3d4e2284b 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,1685ffdb-36cb-448f-9622-41f9d572b996,closedloop,msisdn,2821,msisdn,2605,10,USD,Test Payee Payment -1,7040745e-9959-40bd-8a18-d705b662f163,closedloop,msisdn,2822,msisdn,2606,5,USD,Test Payee Payment -2,3a8376ff-8003-4dd7-bd39-46c8fc4f1446,closedloop,msisdn,2823,msisdn,2607,5,USD,Test Payee Payment -3,61e4fdfa-cd5d-4356-8176-03edab7c37de,closedloop,msisdn,2824,msisdn,2608,5,USD,Test Payee Payment -4,73d5d001-4161-4221-b361-bdefe04cb981,closedloop,msisdn,2825,msisdn,2609,5,USD,Test Payee Payment -5,e7368c89-f976-4aca-89b9-8f89ba8c73ab,gsma,msisdn,2826,msisdn,2610,6,USD,Test Payee Payment -6,8ea52a89-d2e6-4ba0-bae8-30365da5c1ee,gsma,msisdn,2827,msisdn,2611,7,USD,Test Payee Payment -7,ecbca064-b725-44c6-a3f5-ef07dbf3cf9b,gsma,msisdn,2828,msisdn,2612,8,USD,Test Payee Payment \ No newline at end of file +0,ead8a498-5f97-44ed-866e-b5729f9dc71c,closedloop,msisdn,2936,msisdn,2716,10,USD,Test Payee Payment +1,7ca27144-5994-4107-ad54-9160fbb3f6e7,closedloop,msisdn,2937,msisdn,2717,5,USD,Test Payee Payment +2,3731d077-bede-4708-bbb1-e237d1d5c13d,closedloop,msisdn,2938,msisdn,2718,5,USD,Test Payee Payment +3,e475fcde-4bf8-4fba-b2df-acbb452ffb19,closedloop,msisdn,2939,msisdn,2719,5,USD,Test Payee Payment +4,89246be1-3211-4fea-850e-d34d20617e31,closedloop,msisdn,2940,msisdn,2720,5,USD,Test Payee Payment +5,a644c842-7b81-4b66-b10b-c1ccdc5b776e,gsma,msisdn,2941,msisdn,2721,6,USD,Test Payee Payment +6,a1019717-1cdc-4a6c-82ca-15a6295fc21b,gsma,msisdn,2942,msisdn,2722,7,USD,Test Payee Payment +7,0430429d-e8ec-4fdd-b56d-37da165c236f,gsma,msisdn,2943,msisdn,2723,8,USD,Test Payee Payment \ No newline at end of file From d0fd8b8aa87065da6470c6cf271935ac39114a63 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Thu, 4 Apr 2024 00:08:38 +0530 Subject: [PATCH 20/27] Testing --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 254677d9c..a8cec6f2b 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -145,7 +145,7 @@ Feature: Test ability to make payment to individual with bank account Then add last row to csv with current payer and payee, payment mode as "gsma" and transfer amount 8 and id 7 #batch process - Given I have tenant as "paymentbb1" + Given I have tenant as "payerfsp" And I have the demo csv file "batchTransactionGsmaClosedLoop.csv" And I generate clientCorrelationId And I have private key From 92a805274aa96a24d55464e3c1deba62f65249ab Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Thu, 4 Apr 2024 09:35:12 +0530 Subject: [PATCH 21/27] Testing --- src/test/java/resources/bulkPayment.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index a8cec6f2b..b44675df7 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -155,6 +155,7 @@ Feature: Test ability to make payment to individual with bank account And I fetch batch ID from batch transaction API's response When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I should get non empty response + Then I will sleep for 10000 millisecond Then I am able to parse batch summary response And Status of transaction is "COMPLETED" And My total txns 8 and successful txn count in response should Match From 75bf35cf5cd1305056577798a38c6acda03fe1ba Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Thu, 4 Apr 2024 10:06:27 +0530 Subject: [PATCH 22/27] Testing --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index b44675df7..be39cbc02 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -43,7 +43,7 @@ Feature: Test ability to make payment to individual with bank account And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response # Then I will sleep for 10000 millisecond - Given I have tenant as "paymentbb1" + Given I have tenant as "payerfsp" When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" From 4ccf07f8c4d52eab6509537bbc04de65cac2394c Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Thu, 4 Apr 2024 10:10:07 +0530 Subject: [PATCH 23/27] Testing --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index be39cbc02..11a48134f 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -153,9 +153,9 @@ Feature: Test ability to make payment to individual with bank account When I call the batch transactions endpoint with expected status of 202 And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response + Then I will sleep for 10000 millisecond When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I should get non empty response - Then I will sleep for 10000 millisecond Then I am able to parse batch summary response And Status of transaction is "COMPLETED" And My total txns 8 and successful txn count in response should Match From c012fa225429f745656f57c37fccc346ef358a81 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Thu, 4 Apr 2024 10:46:07 +0530 Subject: [PATCH 24/27] Testing --- src/test/java/resources/bulkPayment.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 11a48134f..b30048e51 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -43,7 +43,7 @@ Feature: Test ability to make payment to individual with bank account And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response # Then I will sleep for 10000 millisecond - Given I have tenant as "payerfsp" + Given I have tenant as "paymentbb1" When I call the batch summary API with expected status of 200 with total successfull 8 txns Then I am able to parse batch summary response And Status of transaction is "COMPLETED" From 165b1c02407ebf4113deb75bd1caf3579470b528 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 17 Apr 2024 12:00:27 +0530 Subject: [PATCH 25/27] Isolation test --- .circleci/config.yml | 4 ++-- build.gradle | 1 + src/main/resources/application.yaml | 3 +++ src/test/java/resources/bulkPayment.feature | 2 +- src/test/java/resources/mojaloop.feature | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aa89477fd..56b8feecd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -227,7 +227,7 @@ jobs: export CALLBACK_URL="https://$NGROK_PUBLIC_URL" echo -n "Public url ." echo $CALLBACK_URL - ./gradlew test -Dcucumber.filter.tags="@gov" + ./gradlew test -Dcucumber.filter.tags="@gov1" echo -n "Test execution is completed, kill ngrok" pkill ngrok - store_test_results: @@ -327,7 +327,7 @@ workflows: - Ngrok - test-chart-gov: requires: - - test-chart-ams + - deploying-bpmns context: - AWS - Helm diff --git a/build.gradle b/build.gradle index bf35aa029..e2972eb19 100644 --- a/build.gradle +++ b/build.gradle @@ -149,6 +149,7 @@ dependencies { testImplementation "com.github.tomakehurst:wiremock-jre8:2.35.0" testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.mifos:ph-ee-connector-common:1.8.1-SNAPSHOT' + implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation "com.google.truth:truth:1.1.3" testImplementation 'com.google.code.gson:gson:2.9.0' testImplementation('io.rest-assured:rest-assured:5.1.1') { diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 2df866732..969c43848 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,3 +1,6 @@ +server: + port: 8083 + operations-app: contactpoint: "https://ops-bk.sandbox.fynarfin.io" dpgcontactpoint: "https://ops-bk-dpg.sandbox.fynarfin.io" diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index b30048e51..3b51d930b 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -1,4 +1,4 @@ -@gov +@gov1 Feature: Test ability to make payment to individual with bank account Scenario: Input CSV file using the batch transaction API and poll batch summary API till we get completed status diff --git a/src/test/java/resources/mojaloop.feature b/src/test/java/resources/mojaloop.feature index 3cae45cf8..7ba6aec46 100644 --- a/src/test/java/resources/mojaloop.feature +++ b/src/test/java/resources/mojaloop.feature @@ -1,4 +1,4 @@ -@gov @ext +@gov1 @ext Feature: Mojaloop test Scenario: ML connector partial payee party lookup test From 88f7720dec55b092e84e91c262c1bdadbe6ddaba Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Wed, 17 Apr 2024 13:09:21 +0530 Subject: [PATCH 26/27] Isolation test --- src/test/java/resources/batch_demo_csv/batchTransaction.csv | 4 ++++ src/test/java/resources/mojaloop.feature | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 src/test/java/resources/batch_demo_csv/batchTransaction.csv diff --git a/src/test/java/resources/batch_demo_csv/batchTransaction.csv b/src/test/java/resources/batch_demo_csv/batchTransaction.csv new file mode 100644 index 000000000..104d52ac0 --- /dev/null +++ b/src/test/java/resources/batch_demo_csv/batchTransaction.csv @@ -0,0 +1,4 @@ +id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note +0,36ef6818-92b4-4d72-9c6d-37a9b8baf081,mojaloop,msisdn,3793,msisdn,3497,3,USD,Test Payee Payment +1,8a051d45-e82a-4883-ba83-078351a5c507,mojaloop,msisdn,3794,msisdn,3497,2,USD,Test Payee Payment +2,67de2c80-b006-4540-a4a7-7cfa51cd2739,mojaloop,msisdn,3795,msisdn,3498,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/mojaloop.feature b/src/test/java/resources/mojaloop.feature index 7ba6aec46..715a6725a 100644 --- a/src/test/java/resources/mojaloop.feature +++ b/src/test/java/resources/mojaloop.feature @@ -125,7 +125,7 @@ Feature: Mojaloop test When I call the batch transactions endpoint with expected status of 202 And I am able to parse batch transactions response And I fetch batch ID from batch transaction API's response -# Then I will sleep for 10000 millisecond + Then I will sleep for 10000 millisecond When I call the batch aggregate API with expected status of 200 with total 3 txns Then I should get non empty response Then I am able to parse batch summary response From 57ec7601000ef9161b7d90433e9bd79d813dc542 Mon Sep 17 00:00:00 2001 From: Abhinav Mishra Date: Fri, 19 Apr 2024 12:11:28 +0530 Subject: [PATCH 27/27] GOV75 test t-1 --- .../cucumber/stepdef/GSMATransferStepDef.java | 42 +++ .../stepdef/PayerFundTransferStepDef.java | 66 +++++ ...ansactioClosedLoopMojaloopFundTransfer.csv | 9 + .../batch_demo_csv/batchTransaction.csv | 6 +- .../batchTransactionGsmaClosedLoop.csv | 16 +- ...batchTransactionGsmaClosedLoopMojaloop.csv | 14 + src/test/java/resources/bulkPayment.feature | 260 +++++++++++++++++- 7 files changed, 398 insertions(+), 15 deletions(-) create mode 100644 src/test/java/resources/batch_demo_csv/batchTransactioClosedLoopMojaloopFundTransfer.csv create mode 100644 src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoopMojaloop.csv diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java index 9ce34c6ad..68d7aabcb 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/GSMATransferStepDef.java @@ -714,6 +714,27 @@ public void iCallTheBalanceApiForPayeeBalanceForCombinedTestsCases(String id) th } + @Then("I call the balance api for payee {string} balance for all combine test cases") + public void iCallTheBalanceApiForPayeeBalanceForAllCombinedTestsCases(String id) throws JsonProcessingException { + RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); + String finalEndpoint = amsBalanceEndpoint; + if (scenarioScopeState.payeeIdentifierforBatch == null) { + scenarioScopeState.payeeIdentifierforBatch = new String[15]; + } + scenarioScopeState.payeeIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payeeIdentifier; + finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); + finalEndpoint = finalEndpoint.replace("{IdentifierId}", creditParty.isEmpty() ? scenarioScopeState.payeeIdentifier : creditParty); + logger.info("Endpoint: " + finalEndpoint); + scenarioScopeState.response = RestAssured.given(requestSpec).baseUri(amsBaseUrl).body("").expect() + .spec(new ResponseSpecBuilder().expectStatusCode(200).build()).when().get(finalEndpoint).andReturn().asString(); + logger.info("Balance Response: " + scenarioScopeState.response); + InteropAccountDTO interopAccountDTO = objectMapper.readValue(scenarioScopeState.response, InteropAccountDTO.class); + assertThat( + interopAccountDTO.getAvailableBalance().intValue() >= scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]) + .isTrue(); + + } + @Then("I call the balance api for payee with id {string} balance after credit") public void iCallTheBalanceApiForPayeeBalanceAfterCredit(String id) throws JsonProcessingException { @@ -774,6 +795,27 @@ public void iCallTheBalanceApiForPayerBalanceForCombinedTestCases(String id) thr } + @Then("I call the balance api for payer {string} balance for all combine test cases") + public void iCallTheBalanceApiForAllPayerBalanceForCombinedTestCases(String id) throws JsonProcessingException { + RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); + String finalEndpoint = amsBalanceEndpoint; + if (scenarioScopeState.payerIdentifierforBatch == null) { + scenarioScopeState.payerIdentifierforBatch = new String[15]; + } + scenarioScopeState.payerIdentifierforBatch[Integer.parseInt(id)] = scenarioScopeState.payerIdentifier; + finalEndpoint = finalEndpoint.replace("{IdentifierType}", "MSISDN"); + finalEndpoint = finalEndpoint.replace("{IdentifierId}", debitParty.isEmpty() ? scenarioScopeState.payerIdentifier : debitParty); + logger.info("Endpoint: " + finalEndpoint); + scenarioScopeState.response = RestAssured.given(requestSpec).baseUri(amsBaseUrl).body("").expect() + .spec(new ResponseSpecBuilder().expectStatusCode(200).build()).when().get(finalEndpoint).andReturn().asString(); + logger.info("Balance Response: " + scenarioScopeState.response); + InteropAccountDTO interopAccountDTO = objectMapper.readValue(scenarioScopeState.response, InteropAccountDTO.class); + assertThat( + interopAccountDTO.getAvailableBalance().intValue() >= scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]) + .isTrue(); + + } + @Then("I call the balance api for payer with id {string} balance after debit") public void iCallTheBalanceApiForPayerBalanceAfterDebit(String id) throws JsonProcessingException { RequestSpecification requestSpec = Utils.getDefaultSpec(scenarioScopeState.tenant); diff --git a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java index c2bde221d..8bc74d9a7 100644 --- a/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java +++ b/src/test/java/org/mifos/integrationtest/cucumber/stepdef/PayerFundTransferStepDef.java @@ -541,6 +541,20 @@ public void addRowToCsvFileForCombinedTestCases(String paymentMode, int transfer scenarioScopeState.gsmaP2PAmtDebitForBatch[id + 1] = transferAmount; } + @Then("add row to csv with current payer and payee, payment mode as {string} and transfer amount {int} and id {int} for all combine test cases") + public void addRowToCsvFileForAllCombinedTestCases(String paymentMode, int transferAmount, int id) throws IOException { + + String[] row = { String.valueOf(id), UUID.randomUUID().toString(), paymentMode, "msisdn", scenarioScopeState.payerIdentifier, + "msisdn", scenarioScopeState.payeeIdentifier, String.valueOf(transferAmount), "USD", "Test Payee Payment" }; + String filePath = Utils.getAbsoluteFilePathToResource(scenarioScopeState.filename); + csvHelper.addRow(filePath, row); + scenarioScopeState.gsmaP2PAmtDebit = scenarioScopeState.gsmaP2PAmtDebit + transferAmount; + if (scenarioScopeState.gsmaP2PAmtDebitForBatch == null) { + scenarioScopeState.gsmaP2PAmtDebitForBatch = new int[14]; + } + scenarioScopeState.gsmaP2PAmtDebitForBatch[id + 1] = transferAmount; + } + @Then("add last row to csv with current payer and payee, payment mode as {string} and transfer amount {int} and id {int}") public void addLastRowToCsvFile(String paymentMode, int transferAmount, int id) throws IOException { @@ -605,4 +619,56 @@ public void consolidatedPayeeCreationStepsForCombinedTestsCases(String client, S } } + @When("I create and setup a {string} with id {string} and account balance of {int} for multiple payment mode bulk test cases") + public void consolidatedPayeeCreationStepsForMultpliePaymentModeTestsCases(String client, String id, int amount) throws JsonProcessingException { + setTenantForPayer(client); + callCreateClientEndpoint(client); + callCreateSavingsProductEndpoint(client); + callCreateSavingsAccountEndpoint(client); + callCreateInteropIdentifierEndpoint(client); + callApproveSavingsEndpoint("approve", client); + callSavingsActivateEndpoint("activate", client); + callDepositAccountEndpoint("deposit", amount, client); + if (client.equals("payer")) { + if (scenarioScopeState.initialBalForPayerForBatch == null) { + scenarioScopeState.initialBalForPayerForBatch = new int[14]; + } + scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]).isNotNull(); + + } else if (client.equals("payee")) { + if (scenarioScopeState.initialBalForPayeeForBatch == null) { + scenarioScopeState.initialBalForPayeeForBatch = new int[9]; + } + scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]).isNotNull(); + } + } + + @When("I create and setup a {string} with id {string} and account balance of {int} for all combine test cases") + public void consolidatedPayeeCreationStepsForAllCombinedTestsCases(String client, String id, int amount) throws JsonProcessingException { + setTenantForPayer(client); + callCreateClientEndpoint(client); + callCreateSavingsProductEndpoint(client); + callCreateSavingsAccountEndpoint(client); + callCreateInteropIdentifierEndpoint(client); + callApproveSavingsEndpoint("approve", client); + callSavingsActivateEndpoint("activate", client); + callDepositAccountEndpoint("deposit", amount, client); + if (client.equals("payer")) { + if (scenarioScopeState.initialBalForPayerForBatch == null) { + scenarioScopeState.initialBalForPayerForBatch = new int[15]; + } + scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayerForBatch[Integer.parseInt(id)]).isNotNull(); + + } else if (client.equals("payee")) { + if (scenarioScopeState.initialBalForPayeeForBatch == null) { + scenarioScopeState.initialBalForPayeeForBatch = new int[15]; + } + scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)] = amount; + assertThat(scenarioScopeState.initialBalForPayeeForBatch[Integer.parseInt(id)]).isNotNull(); + } + } + } diff --git a/src/test/java/resources/batch_demo_csv/batchTransactioClosedLoopMojaloopFundTransfer.csv b/src/test/java/resources/batch_demo_csv/batchTransactioClosedLoopMojaloopFundTransfer.csv new file mode 100644 index 000000000..ae1332a03 --- /dev/null +++ b/src/test/java/resources/batch_demo_csv/batchTransactioClosedLoopMojaloopFundTransfer.csv @@ -0,0 +1,9 @@ +id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note +0,bf5e4189-cfa4-4e1b-af87-b759d0cbf5b7,closedloop,msisdn,3860,msisdn,3543,10,USD,Test Payee Payment +1,2b161d23-b2f2-47ae-91e9-a99a30600c9d,closedloop,msisdn,3861,msisdn,3544,5,USD,Test Payee Payment +2,936b2c6f-92fe-4a86-85a3-48611fe8b56a,closedloop,msisdn,3862,msisdn,3545,5,USD,Test Payee Payment +3,f6a7aced-60fb-4542-bb78-cec4b6e9a83c,closedloop,msisdn,3863,msisdn,3546,5,USD,Test Payee Payment +4,d5c48256-6689-4ff5-ba5a-1c0b0d0ae444,closedloop,msisdn,3864,msisdn,3547,5,USD,Test Payee Payment +5,954495f6-d544-4a50-bfc1-862c34a2e569,mojaloop,msisdn,3865,msisdn,3548,3,USD,Test Payee Payment +6,c0c4f551-a48a-4d79-a71d-6cad8f124897,mojaloop,msisdn,3866,msisdn,3548,2,USD,Test Payee Payment +7,0df72164-6bf4-4a4e-941d-520466747fe7,mojaloop,msisdn,3867,msisdn,3549,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/batchTransaction.csv b/src/test/java/resources/batch_demo_csv/batchTransaction.csv index 104d52ac0..72a0e2525 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransaction.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransaction.csv @@ -1,4 +1,4 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,36ef6818-92b4-4d72-9c6d-37a9b8baf081,mojaloop,msisdn,3793,msisdn,3497,3,USD,Test Payee Payment -1,8a051d45-e82a-4883-ba83-078351a5c507,mojaloop,msisdn,3794,msisdn,3497,2,USD,Test Payee Payment -2,67de2c80-b006-4540-a4a7-7cfa51cd2739,mojaloop,msisdn,3795,msisdn,3498,1,USD,Test Payee Payment \ No newline at end of file +0,52c36327-2c70-48d1-aaa1-a6b3fe447fcd,mojaloop,msisdn,58,msisdn,53,3,USD,Test Payee Payment +1,0bdc4f1e-b287-408e-a1e1-9d9238ec90ac,mojaloop,msisdn,59,msisdn,53,2,USD,Test Payee Payment +2,3cc19513-7988-40cc-9858-24bdaa8b48fd,mojaloop,msisdn,60,msisdn,54,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv index 3d4e2284b..28675884f 100644 --- a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoop.csv @@ -1,9 +1,9 @@ id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note -0,ead8a498-5f97-44ed-866e-b5729f9dc71c,closedloop,msisdn,2936,msisdn,2716,10,USD,Test Payee Payment -1,7ca27144-5994-4107-ad54-9160fbb3f6e7,closedloop,msisdn,2937,msisdn,2717,5,USD,Test Payee Payment -2,3731d077-bede-4708-bbb1-e237d1d5c13d,closedloop,msisdn,2938,msisdn,2718,5,USD,Test Payee Payment -3,e475fcde-4bf8-4fba-b2df-acbb452ffb19,closedloop,msisdn,2939,msisdn,2719,5,USD,Test Payee Payment -4,89246be1-3211-4fea-850e-d34d20617e31,closedloop,msisdn,2940,msisdn,2720,5,USD,Test Payee Payment -5,a644c842-7b81-4b66-b10b-c1ccdc5b776e,gsma,msisdn,2941,msisdn,2721,6,USD,Test Payee Payment -6,a1019717-1cdc-4a6c-82ca-15a6295fc21b,gsma,msisdn,2942,msisdn,2722,7,USD,Test Payee Payment -7,0430429d-e8ec-4fdd-b56d-37da165c236f,gsma,msisdn,2943,msisdn,2723,8,USD,Test Payee Payment \ No newline at end of file +0,05cd9734-f25e-462d-a6ad-88606b66c19a,closedloop,msisdn,3852,msisdn,3535,10,USD,Test Payee Payment +1,f868df3a-2b0f-4c72-ad67-0708c3dbfa46,closedloop,msisdn,3853,msisdn,3536,5,USD,Test Payee Payment +2,9f2d8f3e-1d4b-4dfd-a441-764ee0a7f102,closedloop,msisdn,3854,msisdn,3537,5,USD,Test Payee Payment +3,345deafc-a280-4cf9-bdea-24ce04d62255,closedloop,msisdn,3855,msisdn,3538,5,USD,Test Payee Payment +4,f7959697-29bd-42ed-bd87-f814c6ff693b,closedloop,msisdn,3856,msisdn,3539,5,USD,Test Payee Payment +5,8b8c6cfd-4108-41e3-a326-4ed386657cb7,gsma,msisdn,3857,msisdn,3540,6,USD,Test Payee Payment +6,b0e78317-541b-4602-80e0-f529124a87a5,gsma,msisdn,3858,msisdn,3541,7,USD,Test Payee Payment +7,190a3682-6b97-4bb4-819a-7f29b9bc3513,gsma,msisdn,3859,msisdn,3542,8,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoopMojaloop.csv b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoopMojaloop.csv new file mode 100644 index 000000000..7c2f420c2 --- /dev/null +++ b/src/test/java/resources/batch_demo_csv/batchTransactionGsmaClosedLoopMojaloop.csv @@ -0,0 +1,14 @@ +id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note +0,7971c60a-4deb-4c41-96db-ca361024cc41,closedloop,msisdn,86,msisdn,77,10,USD,Test Payee Payment +1,77776b64-4e2c-40fc-a341-f4e8c9c44e19,closedloop,msisdn,87,msisdn,78,5,USD,Test Payee Payment +2,4337f8b1-c1b7-4cec-9cad-0d3e5e6de84f,closedloop,msisdn,88,msisdn,79,5,USD,Test Payee Payment +3,dca79c67-07e2-4532-8aa4-94e15e336786,closedloop,msisdn,89,msisdn,80,5,USD,Test Payee Payment +4,1d4054ad-8355-4c43-ad3c-b18eddd6d44d,closedloop,msisdn,90,msisdn,81,5,USD,Test Payee Payment +5,90835b3d-1e9a-4a4f-8480-e197bd405775,gsma,msisdn,91,msisdn,82,6,USD,Test Payee Payment +6,8f1e68e8-c8fe-4be5-8ec1-87fa443bdc8e,gsma,msisdn,92,msisdn,83,7,USD,Test Payee Payment +7,d35c95ad-2f77-4c54-9e63-50e4376d4c4c,gsma,msisdn,93,msisdn,84,8,USD,Test Payee Payment +8,bf2e059d-8ed1-4221-a8be-79bc5a154676,gsma,msisdn,94,msisdn,85,9,USD,Test Payee Payment +9,00054598-a5c0-41d5-af84-6a13fed4ca4c,gsma,msisdn,95,msisdn,86,10,USD,Test Payee Payment +10,de95b7c1-0e2f-4701-9472-5f1c7ea97a43,mojaloop,msisdn,96,msisdn,87,3,USD,Test Payee Payment +11,02ba2cb9-07d9-4f99-b23d-170f0fecab47,mojaloop,msisdn,97,msisdn,87,2,USD,Test Payee Payment +12,9f27d14e-8f18-4300-a4fa-f7260b49803e,mojaloop,msisdn,98,msisdn,88,1,USD,Test Payee Payment \ No newline at end of file diff --git a/src/test/java/resources/bulkPayment.feature b/src/test/java/resources/bulkPayment.feature index 3b51d930b..09412bb92 100644 --- a/src/test/java/resources/bulkPayment.feature +++ b/src/test/java/resources/bulkPayment.feature @@ -31,10 +31,10 @@ Feature: Test ability to make payment to individual with bank account And I create a list of payee identifiers from csv file When I can inject MockServer Then I can start mock server - And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 - And I create a IdentityMapperDTO for registering beneficiary - Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" - And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration +# And I can register the stub with "/registerBeneficiary" endpoint for "PUT" request with status of 200 +# And I create a IdentityMapperDTO for registering beneficiary +# Then I call the register beneficiary API with expected status of 202 and stub "/registerBeneficiary" +# And I should be able to verify that the "PUT" method to "/registerBeneficiary" endpoint received a request with successfull registration And I create a new clientCorrelationId And I have private key And I generate signature @@ -160,3 +160,255 @@ Feature: Test ability to make payment to individual with bank account And Status of transaction is "COMPLETED" And My total txns 8 and successful txn count in response should Match + + Scenario: Bulk Transfer with Closedloop and Real Mojaloop + #payer 1 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "1" and account balance of 100 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "1" balance for combine test cases + #payee 1 creation + When I create and setup a "payee" with id "1" and account balance of 10 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "1" balance for combine test cases + + Then Create a csv file with file name "batchTransactioClosedLoopMojaloopFundTransfer.csv" + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 10 and id 0 for combine test cases + + #payer 2 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "2" and account balance of 50 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "2" balance for combine test cases + #payee 2 creation + When I create and setup a "payee" with id "2" and account balance of 20 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "2" balance for combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 1 for combine test cases + + #payer 3 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "3" and account balance of 50 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "3" balance + #payee 3 creation + When I create and setup a "payee" with id "3" and account balance of 20 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "3" balance for combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 2 for combine test cases + + #payer 4 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "4" and account balance of 50 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "4" balance for combine test cases + #payee 4 creation + When I create and setup a "payee" with id "4" and account balance of 20 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "4" balance for combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 for combine test cases + #payer 5 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "5" and account balance of 50 for combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "5" balance for combine test cases + #payee 5 creation + When I create and setup a "payee" with id "5" and account balance of 20 for combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "5" balance for combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 for combine test cases + #Mojaloop + Given I am setting up Mojaloop + #payer and payee 6 for mojaloop [1] + When I create and setup a "payer" with account balance of 12 + When I create and setup a "payee" with account balance of 10 + Then I add "payer" to als + Then I add "payee" to als + Then add row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 3 and id 5 for combine test cases + + #payer and payee 7 for mojaloop [2] + Then I add "payer" to als + When I create and setup a "payer" with account balance of 120 + Then add row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 2 and id 6 for combine test cases + + When I create and setup a "payer" with account balance of 66 + When I create and setup a "payee" with account balance of 10 + Then I add "payer" to als + Then I add "payee" to als + Then add last row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 1 and id 7 + + Given I have Fineract-Platform-TenantId for "payer" + And I create a new clientCorrelationId + And I have private key + And I generate signature + When I call the batch transactions endpoint with expected status of 202 + Then I should get non empty response + And I am able to parse batch transactions response + And I fetch batch ID from batch transaction API's response + Then I will sleep for 10000 millisecond + Given I have tenant as "paymentbb1" + When I call the batch summary API with expected status of 200 with total successfull 8 txns + Then I am able to parse batch summary response + And Status of transaction is "COMPLETED" + And My total txns 8 and successful txn count in response should Match + + + Scenario: Bulk Transfer with ClosedLoop, Real mojaloop and Real GSMA + #payer 1 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "1" and account balance of 100 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "1" balance for all combine test cases + #payee 1 creation + When I create and setup a "payee" with id "1" and account balance of 10 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "1" balance for all combine test cases + + Then Create a csv file with file name "batchTransactionGsmaClosedLoopMojaloop.csv" + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 10 and id 0 for all combine test cases + + #payer 2 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "2" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "2" balance for all combine test cases + #payee 2 creation + When I create and setup a "payee" with id "2" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "2" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 1 for all combine test cases + + #payer 3 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "3" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "3" balance for all combine test cases + #payee 3 creation + When I create and setup a "payee" with id "3" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "3" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 2 for all combine test cases + + #payer 4 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "4" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "4" balance for all combine test cases + #payee 4 creation + When I create and setup a "payee" with id "4" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "4" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 3 for all combine test cases + #payer 5 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "5" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "5" balance for all combine test cases + #payee 5 creation + When I create and setup a "payee" with id "5" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "5" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "closedloop" and transfer amount 5 and id 4 for all combine test cases + + #payer 6 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "6" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "6" balance for all combine test cases + #payee 6 creation + When I create and setup a "payee" with id "6" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "6" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 6 and id 5 for all combine test cases + + #payer 7 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "7" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "7" balance for all combine test cases + #payee 7 creation + When I create and setup a "payee" with id "7" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "7" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 7 and id 6 for all combine test cases + #payer 8 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "8" and account balance of 30 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "8" balance for all combine test cases + #payee 8 creation + When I create and setup a "payee" with id "8" and account balance of 30 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "8" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 8 and id 7 for all combine test cases + + #payer 9 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "9" and account balance of 50 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "9" balance for all combine test cases + #payee 9 creation + When I create and setup a "payee" with id "9" and account balance of 20 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "9" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 9 and id 8 for all combine test cases + #payer 10 creation + Given I have Fineract-Platform-TenantId as "payerfsp2" + When I create and setup a "payer" with id "10" and account balance of 30 for all combine test cases + Given I have tenant as "payerfsp" + Then I call the balance api for payer "10" balance for all combine test cases + #payee 10 creation + When I create and setup a "payee" with id "10" and account balance of 30 for all combine test cases + Given I have tenant as "payeefsp3" + Then I call the balance api for payee "10" balance for all combine test cases + + Then add row to csv with current payer and payee, payment mode as "gsma" and transfer amount 10 and id 9 for all combine test cases + + #Mojaloop batch setup + Given I am setting up Mojaloop + #payer and payee 10 for mojaloop [1] + When I create and setup a "payer" with account balance of 12 + When I create and setup a "payee" with account balance of 10 + Then I add "payer" to als + Then I add "payee" to als + Then add row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 3 and id 10 for all combine test cases + + #payer and payee 11 for mojaloop [2] + Then I add "payer" to als + When I create and setup a "payer" with account balance of 120 + Then add row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 2 and id 11 for all combine test cases + + #payer and payee 12 for mojaloop [3] + When I create and setup a "payer" with account balance of 66 + When I create and setup a "payee" with account balance of 10 + Then I add "payer" to als + Then I add "payee" to als + Then add last row to csv with current payer and payee, payment mode as "mojaloop" and transfer amount 1 and id 12 + + #batch process + Given I have tenant as "payerfsp" + And I have the demo csv file "batchTransactionGsmaClosedLoopMojaloop.csv" + And I generate clientCorrelationId + And I have private key + And I generate signature + When I call the batch transactions endpoint with expected status of 202 + And I am able to parse batch transactions response + And I fetch batch ID from batch transaction API's response + Then I will sleep for 10000 millisecond + When I call the batch summary API with expected status of 200 with total successfull 13 txns + Then I should get non empty response + Then I am able to parse batch summary response + And Status of transaction is "COMPLETED" + And My total txns 13 and successful txn count in response should Match