Photo by Monica Garniga on Unsplash

Recipe for automating end to end tests with Postman + Newman + CI Azure Devops

--

1.What is this?

In this recipe you will learn how to automate end-to-end tests using Postman and Newman.
The purpose of this article is to be directly to the point, but if you want to know more about e2e tests and other tests, please feel free to click on the links below.

2. What tools do I need?

3.How to do it?

  1. The first thing to do is to create a Postman Collection with all requests, tests and environments needed.
  2. With all Requests and tests written, it’s time to export your collection and environment file. You should export it to a directory that will be accessible in the future.
  3. Run newman over the exported collection and environment files: newman run directory/e2e_collection.json -e directory/dev.postman_environment.json — reporters cli,junit — reporter-junit-export junitReport.xml
  4. Publish results

4.Nice, but how to integrate it with Azure Devops?

If you use Azure Devops, it may be necessary to integrate end to end tests besides unit tests. In this case you already have an awesome and super powered Postman Collection, so why not use it?

  1. Go to Pipelines -> Releases and add a new stage
  2. Edit Agent tasks with:

That’s all Folks

--

--

No responses yet