Skip to content

Commit

Permalink
add new test newmod3 test d'idempotenza activate
Browse files Browse the repository at this point in the history
  • Loading branch information
DamDory committed Jul 29, 2022
1 parent b0087ff commit 5fe8cd8
Show file tree
Hide file tree
Showing 8 changed files with 350 additions and 121 deletions.
266 changes: 164 additions & 102 deletions report/index.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
<fiscalCode>#creditor_institution_code_old#</fiscalCode>
<noticeNumber>#notice_number_old#</noticeNumber>
</qrCode>
<expirationTime>5000</expirationTime>
<amount>10.00</amount>
<dueDate>2021-12-31</dueDate>
<paymentNote>causale</paymentNote>
Expand Down Expand Up @@ -67,4 +66,4 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_KEY retrived by the query idempotency_key on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response

Then check outcome is KO of activatePaymentNotice response
And check faultCode is PPT_ERRORE_IDEMPOTENZA of activatePaymentNotice response
#DB check
Scenario: Execute activatePaymentNotice request
Given the Execute activatePaymentNotice1 request scenario executed successfully
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response
And save activatePaymentNotice response in activatePaymentNotice1

Scenario: Execute activatePaymentNotice1 request
Given the Execute activatePaymentNotice request scenario executed successfully
Expand Down Expand Up @@ -61,13 +62,13 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
#DB check
Scenario: Execute activatePaymentNotice request
Given the Execute activatePaymentNotice1 request scenario executed successfully
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS retrived by the query payment_status on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_KEY retrived by the query idempotency_key on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response
And save activatePaymentNotice response in activatePaymentNotice1
And saving activatePaymentNotice request in activatePaymentNotice1

Scenario: Execute activatePaymentNotice1 request
Given the Execute activatePaymentNotice request scenario executed successfully
Expand All @@ -44,7 +46,7 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
<password>pwdpwdpwd</password>
<idempotencyKey>$activatePaymentNotice.idempotencyKey</idempotencyKey>
<qrCode>
<fiscalCode>#creditor_institution_code_old#</fiscalCode>
<fiscalCode>66666666666</fiscalCode>
<noticeNumber>$activatePaymentNotice.noticeNumber</noticeNumber>
</qrCode>
<amount>10.00</amount>
Expand All @@ -55,18 +57,19 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response
Then check outcome is KO of activatePaymentNotice response
And check faultCode is PPT_ERRORE_IDEMPOTENZA of activatePaymentNotice response

#DB check
Scenario: Execute activatePaymentNotice request
Given the Execute activatePaymentNotice1 request scenario executed successfully
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS retrived by the query payment_status on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Feature: semantic check for activatePaymentNotice regarding idempotency

Background:
Given systems up
And nodo-dei-pagamenti has config parameter useIdempotency set to true

Scenario: Execute activatePaymentNotice request
Given initial XML activatePaymentNotice
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd">
<soapenv:Header/>
<soapenv:Body>
<nod:activatePaymentNoticeReq>
<idPSP>70000000001</idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>#idempotency_key#</idempotencyKey>
<qrCode>
<fiscalCode>#creditor_institution_code_old#</fiscalCode>
<noticeNumber>#notice_number_old#</noticeNumber>
</qrCode>
<amount>10.00</amount>
<dueDate>2021-12-31</dueDate>
<paymentNote>causale</paymentNote>
</nod:activatePaymentNoticeReq>
</soapenv:Body>
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response
And save activatePaymentNotice response in activatePaymentNotice1
And saving activatePaymentNotice request in activatePaymentNotice1

Scenario: Execute activatePaymentNotice1 request
Given the Execute activatePaymentNotice request scenario executed successfully
And initial XML activatePaymentNotice
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd">
<soapenv:Header/>
<soapenv:Body>
<nod:activatePaymentNoticeReq>
<idPSP>70000000001</idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>$activatePaymentNotice.idempotencyKey</idempotencyKey>
<qrCode>
<fiscalCode>$activatePaymentNotice1.fiscalCode</fiscalCode>
<noticeNumber>#notice_number_old#</noticeNumber>
</qrCode>
<amount>10.00</amount>
<dueDate>2021-12-31</dueDate>
<paymentNote>causale</paymentNote>
</nod:activatePaymentNoticeReq>
</soapenv:Body>
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is KO of activatePaymentNotice response
And check faultCode is PPT_ERRORE_IDEMPOTENZA of activatePaymentNotice response

#DB check
Scenario: Execute activatePaymentNotice request
Given the Execute activatePaymentNotice1 request scenario executed successfully
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3








Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Feature: semantic check for activatePaymentNotice regarding idempotency

Background:
Given systems up
And nodo-dei-pagamenti has config parameter useIdempotency set to true

Scenario: Execute activatePaymentNotice request
Given initial XML activatePaymentNotice
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd">
<soapenv:Header/>
<soapenv:Body>
<nod:activatePaymentNoticeReq>
<idPSP>70000000001</idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>#idempotency_key#</idempotencyKey>
<qrCode>
<fiscalCode>#creditor_institution_code_old#</fiscalCode>
<noticeNumber>#notice_number_old#</noticeNumber>
</qrCode>
<expirationTime>150000</expirationTime>
<amount>10.00</amount>
<dueDate>2021-12-31</dueDate>
<paymentNote>causale</paymentNote>
</nod:activatePaymentNoticeReq>
</soapenv:Body>
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response
And save activatePaymentNotice response in activatePaymentNotice1
And saving activatePaymentNotice request in activatePaymentNotice1

Scenario: Execute activatePaymentNotice1 request
Given the Execute activatePaymentNotice request scenario executed successfully
And initial XML activatePaymentNotice
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:nod="http://pagopa-api.pagopa.gov.it/node/nodeForPsp.xsd">
<soapenv:Header/>
<soapenv:Body>
<nod:activatePaymentNoticeReq>
<idPSP>70000000001</idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>$activatePaymentNotice.idempotencyKey</idempotencyKey>
<qrCode>
<fiscalCode>$activatePaymentNotice.fiscalCode</fiscalCode>
<noticeNumber>$activatePaymentNotice.noticeNumber</noticeNumber>
</qrCode>
<amount>10.00</amount>
<dueDate>2021-12-31</dueDate>
<paymentNote>causale</paymentNote>
</nod:activatePaymentNoticeReq>
</soapenv:Body>
</soapenv:Envelope>
"""
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is OK of activatePaymentNotice response

#DB check
Scenario: Execute activatePaymentNotice request
Given the Execute activatePaymentNotice1 request scenario executed successfully
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_PAYMENT_STATUS_SNAPSHOT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value PAYING of the record at column STATUS of the table POSITION_STATUS_SNAPSHOT retrived by the query payment_status_1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_ACTIVATE retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table POSITION_PAYMENT retrived by the query payment_status_pay_only_act1 on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3








6 changes: 5 additions & 1 deletion src/integ-test/bdd-test/resources/query_AutomationTest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
},
"NewMod3" : {
"payment_status":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice.fiscalCode'",
"payment_status_1":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice1.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice1.fiscalCode'",
"payment_status_pay":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice.fiscalCode' AND PAYMENT_TOKEN ='$activatePaymentNoticeResponse.paymentToken'",
"payment_status_pay_act1":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice.fiscalCode' AND PAYMENT_TOKEN ='$activatePaymentNotice1Response.paymentToken'",
"payment_status_pay_only_act1":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice1.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice1.fiscalCode' AND PAYMENT_TOKEN ='$activatePaymentNotice1Response.paymentToken'",
"payment_status_orderby":"SELECT columns FROM table_name WHERE NOTICE_ID ='$activatePaymentNotice.noticeNumber' AND PA_FISCAL_CODE = '$activatePaymentNotice.fiscalCode' ORDER BY ID ASC",
"position_payment": "SELECT columns FROM table_name WHERE PAYMENT_TOKEN ='$activatePaymentNoticeResponse.paymentToken'",
"payment_status_retry_05_token1":"SELECT s.columns FROM table_name s WHERE s.NOTICE_ID ='$activatePaymentNotice1.noticeNumber' AND s.PA_FISCAL_CODE = '$activatePaymentNotice.fiscalCode'",
Expand Down Expand Up @@ -39,7 +42,8 @@
"payment_token_v2":"SELECT columns FROM table_name where PAYMENT_TOKEN = '$activatePaymentNoticeResponse.paymentToken-v2'",
"rt_stati":"SELECT columns FROM table_name where IUV = '$iuv' and IDENT_DOMINIO= '$activatePaymentNotice.fiscalCode'",
"idempotency_cache":"SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$sendPaymentOutcome.idempotencyKey'",
"idempotency_cache_act":"SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$activatePaymentNotice.idempotencyKey'",
"idempotency_act":"SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$activatePaymentNotice.idempotencyKey'",
"idempotency_cache_act":"SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$activatePaymentNotice.idempotencyKey' AND PSP_ID = '$activatePaymentNotice.idPSP'",
"idempotency_key":"SELECT * FROM IDEMPOTENCY_CACHE WHERE IDEMPOTENCY_KEY = '$sendPaymentOutcome.idempotencyKey' AND PSP_ID = '$activatePaymentNotice.idPSP'",
"idempotency_cache_psp":"SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$activatePaymentNotice.idempotencyKey' AND PSP_ID = '$activatePaymentNotice.idPSP'",
"idempotency_cache_psp_1" : "SELECT columns FROM table_name WHERE IDEMPOTENCY_KEY = '$activatePaymentNotice1.idempotencyKey' AND PSP_ID = '$activatePaymentNotice1.idPSP'",
Expand Down

0 comments on commit 5fe8cd8

Please sign in to comment.