From 1235285aa1f39adfe0e460790bf4f2666e998b47 Mon Sep 17 00:00:00 2001 From: Fernando-Granato <117268775+Fernando-Granato@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:16:14 +0200 Subject: [PATCH] feat(deploy pipeline): added new api-tests after dev deploy for NPG flow (#93) --- .devops/azure-templates/api-tests.yml | 4 +++- .devops/deploy-pipelines.yml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.devops/azure-templates/api-tests.yml b/.devops/azure-templates/api-tests.yml index 97847988..d3f42ee5 100644 --- a/.devops/azure-templates/api-tests.yml +++ b/.devops/azure-templates/api-tests.yml @@ -1,5 +1,7 @@ parameters: # Required + - name: "CHECKOUT_FOR_ECOMMERCE_COLLECTION" + type: "string" - name: "ENV_FILE" type: string - name: "TEST_FILE_PREFIX" @@ -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() diff --git a/.devops/deploy-pipelines.yml b/.devops/deploy-pipelines.yml index 9bc20108..e7e902a0 100644 --- a/.devops/deploy-pipelines.yml +++ b/.devops/deploy-pipelines.yml @@ -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" @@ -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" @@ -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"