This document describes the specifics of measuring the conformance of an adopter implementation with the DCSA Track and Trace (TNT) standard in the event publisher role.
Prerequisites
Read the Conformance Overview page to understand the key concepts and the approach used by DCSA to measure the conformance of adopters implementations with its standards.To create a sandbox for measuring Commercial Schedules conformance, follow the instructions in the Conformance Sandboxes page.To understand how to run conformance scenarios in general, consult the Conformance Scenarios page.
Creating the sandbox
Create a sandbox with the parameters from the screenshot below. The sandbox will contain the orchestrator and the synthetic event consumer acting as a counterpart to your event publisher application.
Configuring the sandbox
After creating the sandbox, in the "Sandbox settings" page that opens automatically, ignore the "Connecting to the sandbox" section because your application does not need to connect to its synthetic counterpart in the sandbox.In the "Update sandbox settings", set the "Sandbox counterpart URL" to the base URL where the TNT endpoint of your application is deployed, up to but not including the "/v2/events" endpoint relative path.Then set the "Sandbox counterpart authentication name / value" to the header name and value that any requests need to include in order to be correctly authenticated and authorized in your application. Provide additional header names and values if needed.
Event publisher conformance
Track and Trace scenarios are grouped by event type (shipment / transport / equipment).All but the last scenario in each group are single-request scenarios that test different types of filtering. The last scenario is a double-action one that test the implementation of pagination.Note: For each event type that your application supports, run all the scenarios from the corresponding group.Start each scenario by providing a meaningful set of parameters for which your application has the relevant data to handle a corresponding request for events correctly. Do not change the event type or the structure of the JSON input, only the remaining value as needed.Note: After clicking "Submit", wait for the sandbox to complete the operations displayed with grey text with a spinner.
After the synthetic event consumer retrieves events from your application by sending a GET to its "/v2/events" endpoint, you will see the conformance status update based on the analysis of your application's response.If any conformance errors appear, fix your application or the configuration as needed and restart the scenario.Click "Action completed" to proceed to the next action, or to end the scenario after the final action.
In the pagination scenario available for each event type, your application was expected to include a cursor in the header of the response to the first GET request from the sandbox. After you click "Action completed", the synthetic event consumer in the sandbox will use the cursor to send a second request to your application, this time using the cursor value provided by your application to retrieve the second page of events.The conformance of the second response received from your application is also displayed. If any conformance errors appear, fix your application or the configuration as needed and restart the scenario.Click "Action completed" to end the scenario after the final action.