Tractus-X EDC (connector): E2E test spec¶
A partner finds an offer in the catalog, negotiates a contract and gets the data, and without a token it gets nothing.
Repository: tractusx-edc · Spec 1.0 · Draft · Raw spec for your AI · All specs
Note
Tests 1 and 2 follow the template, which passes in GitHub Actions. Tests 3 and 4 have not been run yet: confirm the status code of test 3 in the first run.
1 · The product in brief¶
The connector is the door of a company to the dataspace. A provider puts data behind it as an "asset" and publishes an offer with rules (policies) on who may see it and what it may be used for. A partner's connector asks for the catalog, negotiates a contract and receives a token. With the token it calls the provider's data plane and gets the data.
2 · The journey the test tells¶
| Side | Played by |
|---|---|
| Your side (SUT) | The provider's connector, with a small echo service behind it as the data |
| Partner side (engine) | The partner's connector, where the tests run from |
- The provider creates an access policy, a usage policy and an asset that points at the echo service.
- The provider publishes a contract definition that ties the three together.
- The partner asks the provider's catalog for that asset and sees the offer.
- The partner negotiates a contract and receives a data plane URL and a token.
- The partner calls the data plane with the token and gets the echo service's answer.
- The provider removes the offer, the asset and both policies.
3 · The TCK you deliver¶
tck/e2e/
├── index.yaml # the manifest
└── tests/
├── partner_pulls_data.yaml
├── unknown_offer_is_not_found.yaml
├── no_token_no_data.yaml
└── offer_carries_the_policy.yaml (optional)
.tractusx # e2eTest: tck/e2e
.github/workflows/e2e-test.yml
| Manifest field | Value |
|---|---|
kind · syntax |
tck · v1-alpha |
id |
tractusx-edc-e2e |
metadata.license |
Apache-2.0 |
metadata.standards |
[] |
dataspace |
ecosystem: Catena-X, version: saturn |
infrastructure.engine |
connector |
infrastructure.sut |
connector |
Variables (env.variables)
| id | Kind | What it is | Example | In the workflow |
|---|---|---|---|---|
product_internal_url |
variable/type/string, source: input, scope: sut |
The data behind the asset, as the provider's connector reaches it. | http://tck-echo |
Filled from product_internal_url, a traefik/whoami echo service. |
product_asset |
config/connector/asset |
The asset: id tractusx-edc-e2e-asset, base URL product_internal_url, dct_type https://w3id.org/catenax/taxonomy#TestData, and proxy_params with proxyPath "true" so that the path of a call reaches the echo service (the worked example does the same for the registry). | – | Written in the manifest |
access_policy |
config/connector/policy |
Who may see the offer: active members. | – | Written in the manifest |
usage_policy |
config/connector/policy |
What the data may be used for: active membership, the framework agreement DataExchangeGovernance:1.0 and the usage purpose cx.core.industrycore:1. Copy it from the template. | – | Written in the manifest |
Runs in the workshop: Yes. Workflow input run-in-toolbox: true.
4 · The tests¶
Every row is one step. Every ☐ is one validate entry. The step names are TestLab's own: look each one up in the IDE's block catalog for its inputs.
Test 1 · A partner finds the offer, negotiates a contract and gets the data¶
tests/partner_pulls_data.yaml · id partner-pulls-data · Journey · Positive
Proves: The whole exchange works between two companies: catalog, negotiation, transfer and the call with the token.
setup
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Create the access policy. | connector/provider/create_policy |
– |
| 2 | Create the usage policy. | connector/provider/create_policy |
– |
| 3 | Create the asset from product_asset. | connector/provider/create_asset |
– |
| 4 | Publish the offer under both policies. | connector/provider/create_contract_definition |
– |
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | As the partner, find the offer by its asset id, negotiate and start the transfer, all in one step. | connector/consumer/pull_data_filtered |
☐ The asset id is the one created in setup. ☐ An agreement id is returned. ☐ An EDR token is returned. |
| 2 | Call GET /api on the data plane with the token. The echo service answers with the request it received, as JSON. | connector/dataplane/http_request |
☐ The answer is 200. ☐ The field method in the body is GET. |
teardown
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Delete the contract definition. | connector/provider/delete_contract_definition |
– |
| 2 | Delete the asset. | connector/provider/delete_asset |
– |
| 3 | Delete the usage policy. | connector/provider/delete_policy |
– |
| 4 | Delete the access policy. | connector/provider/delete_policy |
– |
Test 2 · An offer that was never published is not in the catalog¶
tests/unknown_offer_is_not_found.yaml · id unknown-offer-is-not-found · Negative
Proves: The catalog shows what was offered and nothing else.
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Ask the provider's catalog for an asset id that was never published. | connector/consumer/query_catalog_with_filters |
☐ The list of datasets is empty. |
Test 3 · The data plane refuses a call without a token¶
tests/no_token_no_data.yaml · id no-token-no-data · Negative
Proves: Data only flows under a contract. A caller without a token is turned away.
setup
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Create both policies, the asset and the contract definition, as in test 1. | connector/provider/create_policy |
– |
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | As the partner, negotiate as in test 1 to learn the data plane URL. | connector/consumer/pull_data_filtered |
– |
| 2 | Call the same data plane URL with an empty token. | connector/dataplane/http_request |
☐ The answer is 401 or 403, never 200. |
teardown
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Delete the contract definition, the asset and both policies, in that order. | connector/provider/delete_contract_definition |
– |
Test 4 · The offer in the catalog carries the usage policy (optional)¶
tests/offer_carries_the_policy.yaml · id offer-carries-the-policy · Contract
Proves: A partner sees the rules of an offer before it signs, exactly as the provider set them.
setup
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Create both policies, the asset and the contract definition, as in test 1. | connector/provider/create_policy |
– |
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Ask the catalog for the asset by its id. | connector/consumer/query_catalog_by_asset_id |
☐ The dataset's asset id is the one created in setup. ☐ The catalog policy is not empty. |
teardown
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Delete the contract definition, the asset and both policies, in that order. | connector/provider/delete_contract_definition |
– |
5 · Break it on purpose¶
A check that cannot fail proves nothing. Make each change once, see the test go red for this reason, and change it back.
| Test | Change | Expect |
|---|---|---|
partner_pulls_data.yaml |
Expect method POST instead of GET in the echo answer. | The field check fails and shows GET. |
unknown_offer_is_not_found.yaml |
Filter for the asset id that test 1 creates, and run it after setup of test 1. | The list is no longer empty and the check fails. |
no_token_no_data.yaml |
Pass the real token from the negotiation. | The answer is 200 and the check fails. |
6 · Watch out¶
- A status 200 alone proves little. Check a field of the answer.
- The policy and asset ids must be the same in every run, and teardown must delete them, or the second run fails with a conflict.
- participant_id is a DID, not a BPN.
7 · Not in this spec¶
- Push transfers to a partner's endpoint. A good next pull request.
- Policies that need credentials the toolbox does not issue.
8 · Give it to your assistant¶
Attach or paste the raw spec, then send:
Build the E2E test project for Tractus-X EDC (connector) in tck/e2e, exactly as the spec
tractusx-edc.yaml describes it. The manifest id is tractusx-edc-e2e; every test
file repeats it as namespace. Write the required tests first: partner_pulls_data.yaml, unknown_offer_is_not_found.yaml, no_token_no_data.yaml.
Use only the steps the spec names, and look each one up in the block catalog
before you write its inputs. Every check in the spec becomes one validate entry.
Addresses, BPNs and secrets are variables, never values in a test.
Compile after each file and fix what the compiler reports.
Done when¶
The definition of done for every product, and:
-
tests/partner_pulls_data.yamlis green. -
tests/unknown_offer_is_not_found.yamlis green. -
tests/no_token_no_data.yamlis green.
Sources¶
NOTICE¶
This work is licensed under the CC-BY-4.0.
- SPDX-License-Identifier: CC-BY-4.0
- SPDX-FileCopyrightText: 2026 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/tutorial-resources