Skip to content

Commit

Permalink
add new test newmod3
Browse files Browse the repository at this point in the history
  • Loading branch information
DamDory committed Aug 3, 2022
1 parent 32b5b0b commit 71cfb31
Show file tree
Hide file tree
Showing 16 changed files with 1,589 additions and 95 deletions.
990 changes: 901 additions & 89 deletions report/index.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: semantic check for activatePaymentNotice regarding idempotency
#DB check
Scenario: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And check datetime plus number of date default_idempotency_key_validity_minutes of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And check datetime plus number of date minutes:60000 of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act 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 $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Feature: semantic check for activatePaymentNotice regarding idempotency

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

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#</fiscalCode>
<noticeNumber>#notice_number#</noticeNumber>
</qrCode>
<expirationTime>240000</expirationTime>
<amount>10.00</amount>
<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: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And check datetime plus number of date default_idempotency_key_validity_minutes of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act 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 $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNoticeResponse.paymentToken of the record at column TOKEN of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column INSERTED_TIMESTAMP of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Feature: semantic check for activatePaymentNotice regarding idempotency

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

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#</fiscalCode>
<noticeNumber>#notice_number#</noticeNumber>
</qrCode>
<expirationTime>120000</expirationTime>
<amount>10.00</amount>
<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: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And check datetime plus number of date default_idempotency_key_validity_minutes of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act 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 $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNoticeResponse.paymentToken of the record at column TOKEN of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column INSERTED_TIMESTAMP of the table IDEMPOTENCY_CACHE retrived by the query idempotency_cache_act on db nodo_online under macro NewMod3
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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></idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>#idempotency_key#</idempotencyKey>
<qrCode>
<fiscalCode>#creditor_institution_code#</fiscalCode>
<noticeNumber>#notice_number#</noticeNumber>
</qrCode>
<amount>10.00</amount>
<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_SINTASSI_EXTRAXSD of activatePaymentNotice response

#DB check
Scenario: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And verify 0 record for 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,46 @@
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>pspSconosciuto</idPSP>
<idBrokerPSP>70000000001</idBrokerPSP>
<idChannel>70000000001_01</idChannel>
<password>pwdpwdpwd</password>
<idempotencyKey>#idempotency_key#</idempotencyKey>
<qrCode>
<fiscalCode>#creditor_institution_code#</fiscalCode>
<noticeNumber>#notice_number#</noticeNumber>
</qrCode>
<amount>10.00</amount>
<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_PSP_SCONOSCIUTO of activatePaymentNotice response

#DB check
Scenario: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And check datetime plus number of date 1 of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act 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
And checks the value $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column INSERTED_TIMESTAMP 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,53 @@
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#</fiscalCode>
<noticeNumber>#notice_number#</noticeNumber>
</qrCode>
<amount>10.00</amount>
<paymentNote>errore_response</paymentNote>
</nod:activatePaymentNoticeReq>
</soapenv:Body>
</soapenv:Envelope>
"""
And initial XML paGetPayment
"""
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:paf="http://pagopa-api.pagopa.gov.it/pa/paForNode.xsd">
<soapenv:Header />
</soapenv:Envelope>
"""
And EC replies to nodo-dei-pagamenti with the paGetPayment
When PSP sends SOAP activatePaymentNotice to nodo-dei-pagamenti
Then check outcome is KO of activatePaymentNotice response
And check faultCode is PPT_STAZIONE_INT_PA_ERRORE_RESPONSE of activatePaymentNotice response

#DB check
Scenario: DB check
Given the Execute activatePaymentNotice request scenario executed successfully
And check datetime plus number of date 1 of the record at column VALID_TO of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act 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
And checks the value $activatePaymentNotice.fiscalCode of the record at column PA_FISCAL_CODE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value activatePaymentNotice of the record at column PRIMITIVA of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idPSP of the record at column PSP_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.noticeNumber of the record at column NOTICE_ID of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value $activatePaymentNotice.idempotencyKey of the record at column IDEMPOTENCY_KEY of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column HASH_REQUEST of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column RESPONSE of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
And checks the value NotNone of the record at column INSERTED_TIMESTAMP of the table IDEMPOTENCY_CACHE retrived by the query idempotency_act on db nodo_online under macro NewMod3
Loading

0 comments on commit 71cfb31

Please sign in to comment.