Postman, has been in use by the web development community for more than a decade now. When it comes to the Microsoft Dynamics community, more specifically, Microsoft Dynamics Finance and Supply Chain consultants, it can be a comparatively new tool. The majority of Microsoft Dynamics professionals (including myself) have a background in Microsoft Dynamics AX. In Dynamics AX, very limited tooling was available apart from the AOT and the only kind of web services supported were SOAP endpoints.
I am personally a great advocate of developers’ productivity and more use of the open-source and community tools in the typical Dynamics development flows. Fortunately, Microsoft Dynamics 365 Finance and Supply Chain provides a richer and more modern infrastructure to support data migration and application integration scenarios than its predecessor, Microsoft Dynamics AX.
Postman, becomes handy while you are testing the custom APIs or just want to check the call to an OData APIs. Since, Microsoft Dynamics 365 Finance and Supply Chain, is now actually an Azure cloud application, this adds some complexity in different kind of pre-reqs in setting up the Postman. The purpose of this blog post is not to discuss the steps required to setup a Postman for Dynamics 365, as this is already well covered by Microsoft. You can read more about it here. Here, I am just going to focus on some of the best practices that are going to make the use of Postman even more effective.
Always create a collection
Always consider creating a new collection. With collections, you can:
- Organize your requests.
- help you make use of the variables, which improve maintenance and increase reusability.
Make effective use of Postman variables
Postman is quite flexible when it comes to the variable definition, and you can define it at various levels, depending upon your needs. Think about defining because:
- It helps with reusability.
- Improves maintenance.
Consider defining the following as environment variables or collection variables in the case of Dynamics:
- Tenant id.
- Application id.
- Authorization end point.
- Authorization token, which you are going to receive from Azure AD.
- Client secret.
- Base API URL of your Dynamics 365 Finance and Supply Chain environment.
Consider checking in the file into your Azure DevOps repository
Export the Postman and periodically check-in to your Azure DevOps TFS repository. Alternatively, you can also consider the share feature within the Postman.
Test your APIs using test scripts in Postman
As a solution architect, I have been required to test the APIs. In most of the times, it all works without a need of a test scripts. Test scripts become handy for me while testing custom APIs, especially when the development is still ongoing. You can find a complete reference on how to write test scripts in Postman here.
About Impulz Technologies LLC
Impulz Technologies, is a Silver Certified Microsoft Partner company. We specialize in the implementation, consulting and development of Microsoft Dynamics and Microsoft Power Platform. Impulz Technologies also provide staff augmentation services all across the US. For more information please contact us at 630-540-6302 or email us at email@example.com. You can also contact us through our website.