Skip to main content

Running Tests in ADO Release Pipeline

Don't put credentials or keys for any Revver user in postman environment variables that have access to real customer data, or any other sensitive data in case these API keys were ever compromised.

You can run a Postman collection with a specific environment in an ADO release pipeline stage. The following steps can be taken to set this up.

  1. Click on the ... (three dots) icon next to the collection you want to run in the pipeline, which is outlined in BLUE in image 1.
  2. Select Run Collection option in the dropdown that appears, which is outlined in YELLOW in Image 1.
  3. In the right panel, in the Choose how to run your collection section, select Automate runs via CLI, which is outlined in RED in Image 1.
  4. In the bottom of the right panel, click the Configure command link, which is outlined in GREEN in Image 1.
  5. You will be taken to a new page.
  6. In the Choos the collections you want to run section, make sure the correct Collection and Environment are selected. This is outlined in ORANGE in image 2.
    1. You can select multiple collection / environment pairs if you wish
  7. In CI/CD configuration section, make sure Azure Pipelines and Windows is selected. This is outlined in PURPLE in image 2.
  8. You will need to generate a new API Key if you don't already have one setup. You can do this by clicking the Generate API Key button, outlined in PINK in image 2.
  9. In the azure pipeline stage that you wish to run the Postman tests in you will need to Powershell tasks. The first task will install the Postman CLI on the build agent, and the second task will authenticate with your API key and run the collection. On each task select the Inline type, and copy the scripts (highlighted in BROWN in image 2) into the script section of the task.
    1. In the second script you will need to replace $(POSTMAN_API_KEY) with your actual postman API key. 
Image 1

image.png

Image 2
image.pngImage 3

image.png