Skip to content

Commit fe38b3e

Browse files
Merge pull request #139 from sine-fdn/ileap-conformance
iLEAP conformance chapter
2 parents 5da2218 + 59ced6a commit fe38b3e

File tree

1 file changed

+211
-20
lines changed

1 file changed

+211
-20
lines changed

specs/index.bs

+211-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<pre class='metadata'>
2-
Title: iLEAP Technical Specifications (Version 0.2.1-20250129)
2+
Title: iLEAP Technical Specifications (Version 0.2.1-20250311)
33
Shortname: ileap-extension
44
Status: LD
55
Status Text: Draft Technical Specification
@@ -140,7 +140,6 @@ status tags are:
140140
: <dfn>Transport Service User</dfn>
141141
:: Refers to the party that purchases and or utilizes a transport service. It could be a [=shipper=] or a [=Transport Service Organizer=]. See [[!ISO14083]], Section 3.1.33.
142142

143-
144143
## Auxillary Definitions ## {#auxillary-definitions}
145144

146145
: <dfn>Access Token</dfn>
@@ -2503,8 +2502,117 @@ the links above for further details.
25032502
Any optional property that is not explicitly mentioned above MAY remain unset. All mandatory
25042503
properties that cannot be derived from `HOC` CAN be populated in a best-effort manner.
25052504

2505+
# Conformance # {#conformance}
2506+
2507+
The iLEAP Technical Specifications are designed to be incrementally adopted and
2508+
realized in [=host systems=] for different stakeholder groups. Therefore,
2509+
there are 2 kinds of <dfn>iLEAP conformance</dfn> defined:
2510+
2511+
1. [=iLEAP Emissions Data Conformance=]
2512+
1. [=iLEAP Activity Data Conformance=]
2513+
2514+
For each kind of iLEAP Conformance, a host system achieves conformity by
2515+
2516+
1. realizing the normative statements and relevant test cases referenced
2517+
in [[#ileap-conformance-matrix]] below,
2518+
2. successfully passing Bilateral Testing ([[#conformity-bilateral-testing]])
2519+
3. succesfully passing the [Automated Conformance Testing](https://act.sine.dev)
2520+
2521+
To achieve iLEAP Emissions Data Conformance, [=host systems=] are further REQUIRED to support the
2522+
following features:
2523+
1. fetching <{TAD}> from another host system and
2524+
2. using it to generate <{TOC}>, <{HOC}>, or <{ShipmentFootprint}> data.
2525+
2526+
It is RECOMMENDED for host systems to conform to both kinds of [=iLEAP conformance=].
2527+
2528+
Sections marked as non-normative, all authoring guidelines, diagrams, examples,
2529+
and notes in this specification are non-normative. Everything else in this
2530+
specification is normative.
2531+
2532+
The key words MAY, MUST, MUST NOT, OPTIONAL, RECOMMENDED, REQUIRED, SHOULD,
2533+
and SHOULD NOT in this document are to be interpreted as described in
2534+
[[!RFC2119]] [[!RFC8174]] when, and only when, they appear in all capitals,
2535+
as shown here.
2536+
2537+
Advisement: Currently, iLEAP Conformance ensures interoperability and syntactic correctness. Future
2538+
updates will extend coverage to include semantic correctness, ensuring that emissions calculations
2539+
are performed accurately in end-to-end scenarios.
2540+
2541+
## Conformance Matrix ## {#ileap-conformance-matrix}
2542+
2543+
<figure>
2544+
<table class="complex data">
2545+
<thead>
2546+
<tr>
2547+
<th style="text-align: left">Test Case
2548+
<th style="text-align: left">Conformance
2549+
<tbody >
2550+
<tr>
2551+
<td style="text-align: left">All [PACT Required Test Cases](https://wbcsd.github.io/pact-conformance-testing/checklist.html#required-tests)
2552+
<td rowspan="4"><dfn>iLEAP Emissions Data Conformance</dfn>
2553+
2554+
<tr>
2555+
<td style="text-align: left">[[#test-case-001]]
2556+
2557+
<tr>
2558+
<td style="text-align: left">[[#test-case-002]]
2559+
2560+
<tr>
2561+
<td style="text-align: left">[[#test-case-003]]
2562+
2563+
<tr>
2564+
<td style="text-align: left">[[#test-case-004]]
2565+
<td rowspan="5"><dfn>iLEAP Activity Data Conformance</dfn>
2566+
2567+
<tr>
2568+
<td style="text-align: left">[[#test-case-005]]
2569+
2570+
<tr>
2571+
<td style="text-align: left">[[#test-case-006]]
2572+
2573+
<tr>
2574+
<td style="text-align: left">[[#test-case-007]]
2575+
2576+
<tr>
2577+
<td style="text-align: left">[[#test-case-008]]
2578+
2579+
</table>
2580+
<figcaption>iLEAP Conformance Matrix</figcaption>
2581+
</figure>
2582+
2583+
2584+
## Bilateral Testing ## {#conformity-bilateral-testing}
2585+
2586+
A Bilateral Test is an interoperability test where two different [=host system=]
2587+
implementations participate to verify conformance ([[#conformance]]) and their
2588+
ability to work together.
2589+
2590+
One system acts as the [=data owner=]. It is called the <dfn>target host system</dfn> and is the system under test.
2591+
The second system acts as the testing party.
2592+
2593+
Note:
2594+
The objective of Bilateral Testing is to ensure that systems can effectively
2595+
communicate despite having independent codebases.
2596+
2597+
2598+
## Submission ## {#conformity-submission}
2599+
2600+
Note: non-normative
2601+
2602+
Once a [=host system=] achieved [=iLEAP conformance=] in 1 or all kinds of iLEAP conformance,
2603+
the implementer is requested to reach out to the authors of this Technical Specifications to
2604+
apply for additional support, materials, and marketing opportunities.
2605+
2606+
25062607
# Appendix A: Changelog # {#changelog}
25072608

2609+
## Version 0.2.1-20250311 (2025-03-11) ## {#version-20250311}
2610+
2611+
- add [[#conformance]] chapter
2612+
- improve [[#appendix-b]]'s guidance and readability
2613+
- finalize [[#test-case-004]]
2614+
- populate [[#test-case-005]], [[#test-case-006]], [[#test-case-007]], and [[#test-case-008]]
2615+
25082616
## Version 0.2.1-20250129 (2025-01-29) ## {#version-20250129}
25092617

25102618
- changes to <{TAD}> data type which are "backwards compatible" with the previous version:
@@ -2864,17 +2972,17 @@ In order to test the conformance of an iLEAP implementation, the following tests
28642972
## PACT Conformance Tests ## {#pact-conformance-tests}
28652973

28662974
Since the iLEAP Technical Specifications were conceived as an extension to the PACT Data Model and
2867-
Data Exchange Protocol, any iLEAP conformant implementation must also be PACT Conformant. For that
2868-
reason, the tests in the [PACT Conformance Testing
2869-
Checklist](https://wbcsd.github.io/pact-conformance-testing/checklist.html) must be performed.
2975+
Data Exchange Protocol, any iLEAP conformant implementation must also implement [[!PACTDX]] v2.1.0 or above. For that
2976+
reason, the required tests in the [PACT Conformance Testing
2977+
Checklist](https://wbcsd.github.io/pact-conformance-testing/checklist.html#required-tests) should also be performed.
28702978

28712979
## iLEAP Specific Conformance Tests ## {#ileap-specific-conformance-tests}
28722980

28732981
The following tests are specific to the iLEAP Technical Specifications:
28742982

28752983
### Test Case 001: Get ProductFootprint with ShipmentFootprint ### {#test-case-001}
28762984

2877-
Tests the target host system's ability to return `ProductFootprints` with `ShipmentFootprint`s as
2985+
Tests the [=target host system=]'s ability to return `ProductFootprints` with `ShipmentFootprint`s as
28782986
extensions.
28792987

28802988
#### Request #### {#test-case-001-request}
@@ -2885,7 +2993,7 @@ system with a valid access token and the syntax specified in [PACT Tech Specs V2
28852993

28862994
#### Expected Response #### {#test-case-001-response}
28872995

2888-
The test target host system must respond with 200 OK with a JSON body containing a list of
2996+
The test [=target host system=] must respond with 200 OK with a JSON body containing a list of
28892997
`ProductFootprints` (as per the [PACT Tech Specs V2.2
28902998
§api-action-list-response](https://wbcsd.github.io/data-exchange-protocol/v2/#api-action-list-response)).
28912999
Those which include `productIds` with [the format specified for ShipmentFootprints](#pcf-mapping-sf)
@@ -2894,15 +3002,18 @@ must be conformant with the Data Model specified in [[#dt-sf]]. The relevant pro
28943002

28953003
### Test Case 002: Get ProductFootprint with TOC ### {#test-case-002}
28963004

3005+
Tests the [=target host system=]'s ability to return `ProductFootprints` with `TOC`s as
3006+
extensions.
3007+
28973008
#### Request #### {#test-case-002-request}
28983009

2899-
A `ListFootprints` GET request must be sent to the `/2/footprints` endpoint of the test target host
2900-
system with a valid access token and the syntax specified in [PACT Tech Specs V2.2
3010+
A `ListFootprints` GET request must be sent to the `/2/footprints` endpoint of the test [=target host
3011+
system=] with a valid access token and the syntax specified in [PACT Tech Specs V2.2
29013012
§api-action-list-request](https://wbcsd.github.io/data-exchange-protocol/v2/#api-action-list-request).
29023013

29033014
#### Expected Response #### {#test-case-002-response}
29043015

2905-
The test target host system must respond with 200 OK with a JSON body containing a list of
3016+
The test [=target host system=] must respond with 200 OK with a JSON body containing a list of
29063017
`ProductFootprints` (as per the [PACT Tech Specs V2.2
29073018
§api-action-list-response](https://wbcsd.github.io/data-exchange-protocol/v2/#api-action-list-response)).
29083019

@@ -2916,15 +3027,17 @@ relevant properties of the `ProductFootprint` must also be confomant with the gu
29163027

29173028
### Test Case 003: Get ProductFootprint with HOC ### {#test-case-003}
29183029

3030+
Tests the [=target host system=]'s ability to return `ProductFootprints` with `HOC`s as extensions.
3031+
29193032
#### Request #### {#test-case-003-request}
29203033

2921-
A `ListFootprints` GET request must be sent to the `/2/footprints` endpoint of the test target host
2922-
system with a valid access token and the syntax specified in [PACT Tech Specs V2.2
3034+
A `ListFootprints` GET request must be sent to the `/2/footprints` endpoint of the test [=target host
3035+
system=] with a valid access token and the syntax specified in [PACT Tech Specs V2.2
29233036
§api-action-list-request](https://wbcsd.github.io/data-exchange-protocol/v2/#api-action-list-request).
29243037

29253038
#### Expected Response #### {#test-case-003-response}
29263039

2927-
The test target host system must respond with 200 OK with a JSON body containing a list of
3040+
The test [=target host system=] must respond with 200 OK with a JSON body containing a list of
29283041
`ProductFootprints` (as per the [PACT Tech Specs V2.2
29293042
§api-action-list-response](https://wbcsd.github.io/data-exchange-protocol/v2/#api-action-list-response)).
29303043

@@ -2938,33 +3051,111 @@ relevant properties of the `ProductFootprint` must also be confomant with the gu
29383051

29393052
### Test Case 004: Get All TransportActivityData ### {#test-case-004}
29403053

3054+
Tests the [=target host system=]'s ability to return all `TransportActivityData`.
3055+
29413056
#### Request #### {#test-case-004-request}
29423057

2943-
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test target
2944-
host system with a valid access token and the syntax specified in [[#action-tad-request]].
3058+
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test [=target
3059+
host system=] with a valid [=access token=] and the syntax specified in [[#action-tad-request]].
3060+
3061+
The access token must be obtained through the [PACT's Authentication Flow](https://wbcsd.github.io/tr/2023/data-exchange-protocol-20231207/#api-auth). This can be tested through PACT's Test Cases [001](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc001) and [002](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc002).
29453062

29463063
#### Expected Response #### {#test-case-004-response}
29473064

2948-
The test target host system must respond with 200 OK and a JSON body containing a list of
3065+
The test [=target host system=] must respond with 200 OK and a JSON body containing a list of
29493066
`TransportActivityData`, in conformance with [[#action-tad-response]] and following the data model
29503067
specified at [[#dt-tad]].
29513068

29523069
### Test Case 005: Get Filtered List of TransportActivityData ### {#test-case-005}
29533070

2954-
Issue: TBD
3071+
Tests the [=target host system=]'s ability to return a filtered list of `TransportActivityData`.
3072+
3073+
#### Request #### {#test-case-005-request}
3074+
3075+
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test [=target
3076+
host system=] with a valid [=access token=] and the syntax specified in [[#action-tad-request]].
3077+
3078+
The request must include a query parameter [=Filter=]. Any property can be used as a filter, but we
3079+
recomend using {{TransportMode}}, iterating over all possible values:
3080+
3081+
- `GET /2/ileap/tad?mode=Road HTTP/1.1`
3082+
- `GET /2/ileap/tad?mode=Rail HTTP/1.1`
3083+
- `GET /2/ileap/tad?mode=Air HTTP/1.1`
3084+
- `GET /2/ileap/tad?mode=Sea HTTP/1.1`
3085+
- `GET /2/ileap/tad?mode=InlandWaterway HTTP/1.1`
3086+
3087+
The access token must be obtained through the [PACT's Authentication Flow](https://wbcsd.github.io/tr/2023/data-exchange-protocol-20231207/#api-auth). This can be tested through PACT's Test Cases [001](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc001) and [002](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc002).
3088+
3089+
#### Expected Response #### {#test-case-005-response}
3090+
3091+
For at least one filter, the test [=target host system=] must respond with 200 OK and a JSON body
3092+
containing a list of `TransportActivityData` matching the filter, in conformance with
3093+
[[#action-tad-response]] and following the data model specified at [[#dt-tad]].
29553094

29563095
### Test Case 006: Get Limited List of TransportActivityData ### {#test-case-006}
29573096

2958-
Issue: TBD
3097+
Tests the [=target host system=]'s ability to return a limited list of `TransportActivityData`.
3098+
3099+
#### Request #### {#test-case-006-request}
3100+
3101+
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test
3102+
[=target host system=] with a valid [=access token=] and the syntax specified in
3103+
[[#action-tad-request]]. The request must include a query parameter [=Limit=] with value `1`.
3104+
3105+
The access token must be obtained through the [PACT's Authentication
3106+
Flow](https://wbcsd.github.io/tr/2023/data-exchange-protocol-20231207/#api-auth). This can be tested
3107+
through PACT's Test Cases
3108+
[001](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc001) and
3109+
[002](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc002).
3110+
3111+
#### Expected Response #### {#test-case-006-response}
3112+
3113+
The test [=target host system=] must respond with 200 OK and a JSON body containing one or less
3114+
`TransportActivityData`, in conformance with [[#action-tad-response]] and following the data model
3115+
specified at [[#dt-tad]].
3116+
3117+
If a [=pagination link=] is returned, it must conform to the syntax specified in
3118+
[[#action-tad-response]]. Upon calling that link, the [=target host system=] must respond wih 200 OK
3119+
and a JSON body containing one or more `TransportActivityData`.
3120+
3121+
If no [=pagination link=] is returned, a GET request sent to `/2/ileap/tad` (without query parameter
3122+
[=Limit=]) must respond with 200 OK and a JSON body containing exactly the same number of
3123+
`TransportActivityData` as that returned in the first request (including the query parameter
3124+
[=Limit=] with value `1`).
29593125

29603126
### Test Case 007: Attempt TransportActivityData with Invalid Token ### {#test-case-007}
29613127

2962-
Issue: TBD
3128+
Tests the [=target host system=]'s ability to handle a `TransportActivityData` request with an invalid
3129+
access token.
3130+
3131+
#### Request #### {#test-case-007-request}
3132+
3133+
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test [=target
3134+
host system=] with an invalid access token and the syntax specified in [[#action-tad-request]].
3135+
3136+
#### Expected Response #### {#test-case-007-response}
3137+
3138+
The test [=target host system=] must respond with a 401 Unauthorized status code.
29633139

29643140
### Test Case 008: Attempt TransportActivityData with Expired Token ### {#test-case-008}
29653141

2966-
Issue: TBD
3142+
Tests the [=target host system=]'s ability to handle a `TransportActivityData` request with an expired
3143+
access token.
3144+
3145+
#### Request #### {#test-case-008-request}
3146+
3147+
A `TransportActivityData` GET request must be sent to the `/2/ileap/tad` endpoint of the test [=target
3148+
host system=] with an expired access token and the syntax specified in [[#action-tad-request]].
3149+
3150+
The access token must have been obtained through the [PACT's Authentication
3151+
Flow](https://wbcsd.github.io/tr/2023/data-exchange-protocol-20231207/#api-auth). This can be tested
3152+
through PACT's Test Cases
3153+
[001](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc001) and
3154+
[002](https://wbcsd.github.io/pact-conformance-testing/checklist.html#tc002).
3155+
3156+
#### Expected Response #### {#test-case-008-response}
29673157

3158+
The test [=target host system=] must respond with a 401 Unauthorized status code.
29683159

29693160
<pre class=biblio>
29703161
{

0 commit comments

Comments
 (0)