Dynamicweb Connector TestTool
The Dynamicweb Connector test tool is a small and very useful tool which allows you to submit requests and receive responses from web services – either:
- Directly to a web service exposed by a remote system plugin
- Indirectly via the web service exposed by the Dynamicweb Connector service – this is typically used to test the connection between the connector service and the remote system plugin.
To use the test tool, download it from the documentation portal – you must be logged in to access the files – and unpack it in an appropriate location, depending on your setup. In some scenarios, you want it placed on the same network as the remote system, in other cases it might make sense to place it on a perimeter network.
Run DynamicwebConnectorTestTool.exe to open the testtool interface (Figure 1.1) – to query a web service:
- Select an endpoint
- Select a code example request – this is of course optional, you can always write your own requests or modify the code example
- Click Run Test
- Examine the Response
- Save the request as a code example or the response as an XML file
If you follow the recommended project process, you will first install the TestTool on the remote environment, and use it to query the remote system for data, which you will then deliver to the Dynamicweb side of the integration. They will use this data to create import jobs and develop the solution against real data, which helps the project stay on track.
There are two types of endpoints for the test tool:
- Web services from a Dynamicweb ConnectorService instance
- Web services from a remote system plugin unit
To connect to a Dynamicweb ConnectorService instance:
- Select DynamicwebService as the endpoint
- Enter the web service URL and secret
If you have more than one connector service web service to test you can use the arrow-buttons to cycle between them (Figure 2.1).
To connect to a web service exposed by a remote system plugin unit you must open and edit the DynamicwebConnectorTestTool.exe.config file – it contains a number of config sections with settings for connecting to remote systems. It is identical to the config file for the Connector Service – read more about it here.
When the config file is ready, simply select the appropriate connector using the dropdown and run the tests as normal (Figure 2.2).
The XPATH tab allows you to filter responses by using path expressions, showing only a specific subset of data from the response. This is useful for basic debugging purposes.
To use XPATH:
- Switch to the XPath tab
- Enter an XPath – e.g. //item[column[@columnName='ProductNumber']='D0005'], which finds products by product number
- Click Run Test
The XSLT tab allows you to transform the response XML before showing it in the Transformed Response tab.
This is useful in more advanced debugging scenarios, or if you’re coding against a passive remote system which is unable to process and deliver data in the XML format required by Dynamicweb. This example will find a product by product number:
The transformed response is shown on the Transformed Response tab.
Batch Burst Mode
Batch burst mode (Figure 5.1) is a test tool mode for testing for errors in the field mappings between a given BC/NAV version and a DW solution. It is primarily useful when testing for potential upgrade issues, but may also uncover other sources of mapping errors.
To use this tool:
- Switch to the batch burst mode tab (Figure 5.2)
- In the Request field write the GetAllEcomData request with an appriopriate language and shop id – e.g. <GetAllEcomData setlanguage="LANG1" shopID="SHOP1"></GetAllEcomData>
- Click Run
- Review the response
Every time the tool is run, the response XML is saved inside the TestTool folder in a structure replicating the Files/Integration/… structure used in Dynamicweb. This folder can then be zipped and moved to the Dynamicweb solution, where you can check if the response XML conforms to your expectations.
The easiest way to test this is by asking the tool to generate a set of data integration jobs and scheduled tasks inside the /Files/Integration folder. Then, in Dynamicweb, you can run these auto-generated tasks and check if they fail (Figure 5.2).
- This is not built for production environments, it absolutely will fail for 100.000s of customers or products. It is a test tool, use it accordingly.
- This is not a shortcut for generating actual scheduled tasks for an integration – it generates simple tasks with no add-ins referencing auto-generated and auto-mapped integration jobs pointing to the generated files. It is a test tool, use it accordingly.