Skip to main content

Posts

Showing posts with the label POSTMAN

Automated testing #MSDyn365FO Odata with Postman

In the last post I did a quick run through on using Postman for testing Odata services. This post I will give some tips on how you can write automated tests using Postman. Tip 1 – Parameterise as much as you can Parameterise using the environment settings. It will make your collection portable to other projects. Below is an example where we have the environments settings parameterised. You can see how I used it here. Now I can utilise the same thing across requests. Tip 2 – Write test scripts Test scripts are very easy to work with. This is for demonstration purpose only. I will explain how you can retrieve the values in the returned json. Take the example here, where we use the “get customer” odata service. It returns a nested array with the values. You can write a simple test script to retrieve values. In the below highlighted box you can see that I am logging it to the console. I am not really testing much here. The console will return the below.  One bonus tip here. Just click ...

Testing #MSDyn365FO Odata with Postman

Last year I posted on using Postman. Things have changed since then and I need to update. http://dynamicsnavax.blogspot.com/2017/05/dynamics-365-for-operation-web-service.html There is a good article that Microsoft has written which I followed without any issues. https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/third-party-service-test#prerequisites Below are some screenshot incase you are a visual person like me. In the environment set ups. It should looks something like this. When you run it, you should get a response. Once you got the token. You are good to go with your messages. Below is the same example from the blog post. You run into any problems, click on the console icon at the bottom. Should give you a bit more information. If you get a 401 error. It is usually a typo. Make sure you got the spaces and backslashes correct. One simple character can drive you crazy.

Dynamics 365 for Operation Web Service calls with POSTMAN

UPDATE: 28 June 2018 - Follow this post for using secret key rather than asking user to log in http://dynamicsnavax.blogspot.com/2018/06/testing-msdyn365fo-odata-with-postman.html In this post I will explain using POSTMAN but it really doesn’t matter what tool you use (SOAPUI is another common tool). The main point I am trying to make is how to put the authentication piece together so you can start messaging to/from the web service. Download POSTMAN from their site https://www.getpostman.com/ In Azure AD register the application. For more info see previous post I wrote http://dynamicsnavax.blogspot.com.au/2016/09/azure-ad-in-new-portal.html For POSTMAN, you need to enter the redirect. POSTMAN would tell you this later when you try to get a token. Redirect URL: https://www.getpostman.com/oauth2/callback Open up POSTMAN and enter your URL you want to send a request to. Click on the bright orange button “Get New Access Token” This dialog will pop up. It will ask f...