Skip to content

Commit

Permalink
feat(deploy pipeline): added new api-tests after dev deploy for NPG f…
Browse files Browse the repository at this point in the history
…low (#93)
  • Loading branch information
Fernando-Granato authored Oct 13, 2023
1 parent 1102999 commit 1235285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .devops/azure-templates/api-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
parameters:
# Required
- name: "CHECKOUT_FOR_ECOMMERCE_COLLECTION"
type: "string"
- name: "ENV_FILE"
type: string
- name: "TEST_FILE_PREFIX"
Expand All @@ -11,7 +13,7 @@ steps:
displayName: 'Newman installation'
- script: |
newman run api-tests/checkout-tests/checkout-for-ecommerce-api.tests.json -e ${{ parameters.ENV_FILE }} --ignore-redirects --reporters cli,junit --reporter-junit-export Results/checkout-for-ecommerce-${{ parameters.TEST_FILE_PREFIX }}-api-TEST.xml
newman run ${{ parameters.CHECKOUT_FOR_ECOMMERCE_COLLECTION }} -e ${{ parameters.ENV_FILE }} --ignore-redirects --reporters cli,junit --reporter-junit-export Results/checkout-for-ecommerce-${{ parameters.TEST_FILE_PREFIX }}-api-TEST.xml
displayName: 'Run api test app - env file: ${{ parameters.ENV_FILE }}'
- task: PublishTestResults@2
condition: succeededOrFailed()
Expand Down
3 changes: 3 additions & 0 deletions .devops/deploy-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ stages:
- checkout: pagopaCheckoutTests
- template: azure-templates/api-tests.yml
parameters:
CHECKOUT_FOR_ECOMMERCE_COLLECTION: "api-tests/checkout-tests/npg/checkout-for-ecommerce-api.tests.json"
ENV_FILE: "api-tests/dev.envs.json"
TEST_FILE_PREFIX: "dev"

Expand Down Expand Up @@ -243,6 +244,7 @@ stages:
- checkout: pagopaCheckoutTests
- template: azure-templates/api-tests.yml
parameters:
CHECKOUT_FOR_ECOMMERCE_COLLECTION: "api-tests/checkout-tests/pgs/checkout-for-ecommerce-api.tests.json"
ENV_FILE: "api-tests/uat.payment-requests.blue.envs.json"
TEST_FILE_PREFIX: "blue-uat"

Expand Down Expand Up @@ -374,6 +376,7 @@ stages:
- checkout: pagopaCheckoutTests
- template: azure-templates/api-tests.yml
parameters:
CHECKOUT_FOR_ECOMMERCE_COLLECTION: "api-tests/checkout-tests/pgs/checkout-for-ecommerce-api.tests.json"
ENV_FILE: "api-tests/uat.envs.json"
TEST_FILE_PREFIX: "green-uat"

Expand Down

0 comments on commit 1235285

Please sign in to comment.