How to automate API testing with Azure Devops and Postman?

Click for: original source

I have been using Postman for a long time to test API requests from my local machine. I started to investigate during one project what kind of automated integration test possibilities could Postman offer. Actually it offered very nice features what I haven’t used before. Best finding was possibility to integrate everything very easily to Azure DevOps pipelines. By Kalle Marjokorpi.

The article then quickly explains:

  • How to configure Postman API requests?
    • Set Postman environment variables
    • Create a collection for your requests
    • Shared pre-request scripts in collection level
    • Test requests
  • Configure tests to be executed in Azure DevOps
    • Export test requests and environment variables
    • Remove Client Secret from environment JSON configuration
    • Create YAML template

Postman provides an easy and powerful way to create automated integration tests which can be executed in Azure DevOps. Author considered it really nice that you could write Postman test scripts with javascript. Test object model is easy to learn and there is a lot of good documentation available. At least for a simple integration cases this is a very good tool. Sharing test scripts between tests is difficult and one reason why you should consider other frameworks for very complex test cases. Yo u will also find links to further reading in this article. Good job!

[Read More]

Tags devops azure cloud apis programming