-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02d47e0
commit c43b481
Showing
10 changed files
with
5,969 additions
and
2 deletions.
There are no files selected for viewing
5,890 changes: 5,890 additions & 0 deletions
5,890
working_draft/API/docs/assets/unit-tests/1R_Unit_Tests.postman_collection
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
working_draft/API/docs/assets/unit-tests/Unit_Test_Setup.postman_environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"id": "c6f10eda-fcfc-49c7-bf2e-8a6d49faf20e", | ||
"name": "Unit Test Setup", | ||
"values": [ | ||
{ | ||
"key": "baseUrl", | ||
"value": "http://localhost:8080", | ||
"type": "default", | ||
"enabled": true | ||
} | ||
], | ||
"_postman_variable_scope": "environment", | ||
"_postman_exported_at": "2024-01-11T13:09:50.533Z", | ||
"_postman_exported_using": "Postman/10.21.14" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# ONE Record API Unit Test suite | ||
|
||
ONE Record is the new IATA standard for data sharing and creates a single record view of the shipment. | ||
|
||
The ONE Record standard is highly technical and there is a risk that different parties interpret the specifications differently, which would lead to data quality issues and disruption of connectivity between different network players. | ||
|
||
Due to this rationale, we construct a unit test suite with the aim of verifying that any implementation aligns with the API specifications. | ||
The unit test suite is freely available for self testing and can be run locally using Postman or any software compatible with Postman collections. | ||
|
||
## Suite structure | ||
|
||
The Unit Test suite is divided in several sections: | ||
|
||
- Server Information | ||
|
||
- Logistics Objects | ||
|
||
- Logistics Events | ||
|
||
- Subscriptions | ||
|
||
- Access Delegations | ||
|
||
- Action Requests | ||
|
||
Every section is crafted to assess a distinct segment of the ONE Record API, operating autonomously from the other sections. Within each section, calls must be carried out sequentially. For instance, within the Logistics Events section, the prerequisite folder generates all necessary logistics objects for the test. The Create folder performs tests related to the creation of Logistics Events, while the Get folder attempts to fetch the Logistics Events generated by the preceding calls. | ||
|
||
## How to run the Unit Tests suite | ||
|
||
As a prerequisite for utilizing the Unit Test suite, it is necessary to install Postman or a compatible software. | ||
Once Postman is installed, please adhere to the subsequent steps to execute the Unit Tests suite. | ||
|
||
- [Download the Postman Collection here.](../assets/unit-tests/1R_Unit_Tests.postman_collection) | ||
|
||
- [Download the Postman Environment here](../assets/unit-tests/Unit_Test_Setup.postman_environment) | ||
|
||
- Import the Unit Test Step Environment in Postman | ||
|
||
![Postman Environment](../img/unit-tests/postmanEnv.png) | ||
|
||
- Import the Collection in Postman | ||
|
||
![Postman Collection](../img/unit-tests/postmanColl.png) | ||
|
||
- Navigate to the Environments tab, choose the **Unit Test Setup** environment, and configure the baseUrl to point to the API server under test. | ||
|
||
![Environment Configuration](../img/unit-tests/envConfig.png) | ||
|
||
- Access the Collections in the right menu and open the previously imported **ONE Record API Unit Tests** collection. | ||
|
||
![Unit Test suite](../img/unit-tests/testCollection.png) | ||
|
||
- Utilize the Authorization tab to configure the authorization method implemented in your server. | ||
|
||
![Authorization setup](../img/unit-tests/authSetup.png) | ||
|
||
- Once the authorization is configured, you have the option to either execute the calls individually or employ the Collection Run feature. | ||
|
||
Each call comprises a set of tests that will be applied to both the response payload and response headers during execution. It's crucial to emphasize that the presentation of test results may vary depending on the tool being used. | ||
|
||
In case of issues with the Unit Test Suite, please contact the IATA Digital Cargo team (see [Community page](../community.md)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters