Test Tool

The internal Test Tool of Dynamicweb contains functionality for testing requests to and responses from an endpointin a manner reminiscent of Postman and similar tools.

To test an OData endpoint:

  1. Select an endpoint from the list of endpoints or enter a URL manually
  2. Select a suitable authentication
  3. Optionally, you can add query parameters to filter the reponse data (Link to Dynamics 365 OData filter expression documentation)
  4. Click Send request
  5. Review the response at the bottom of the screen

The test page for an OData endpoint could look like Figure 2.1 – in this case the endpoint exposes the Orders page in D365 Business Central, and the response is therefore order data formatted as JSON.

To test a Dynamicweb codeunit endpoint:

  1. Select an endpoint from the list of endpoints or enter a URL manually
  2. Select a suitable authentication
  3. Check the Connects to standard Dynamicweb codeunit service box just below the URL field
  4. Select a request example body from the dropdown menu or fill in the Dynamicweb codeunit request field
  5. Set the type (Get/Post)
  6. Click Send request
  7. Review the response at the bottom of the screen

If you have defined a custom request or edited one of the examples and wish to keep the request body for later testing purposes, you can click Save request to file. Request examples are saved in System > Integration > TestTool. Saved request examples can later be selected from the dropdown menu.

The test page for a codeunit endpoint could look like Figure 3.1 – in this case the endpoint exposes the product units Business Central codeunit, and the response is therefore product unit data formatted as XML.

 

Figure 3.1 Testing a codeunit endpoint

Any response from an endpoint in the Test Tool can be saved locally by clicking Save response to file just above the response field. Just as the request examples, response files are stored in System > Integration > TestTool. 

Having locally stored response files with test data from the ERP-system is useful for populating the database of a new solution with batch integrations.

All responses are stored as .xml, so if you wish to store JSON-formatted OData responses for any purpose, you will need to change the file format manually.