Business Partner Data Management (BPDM): E2E test spec¶
A business partner a member uploads to the Gate can be read back, and the Gate refuses a caller without a token.
Repository: bpdm · Spec 1.0 · Draft · Raw spec for your AI · All specs
Note
Not run yet. BPDM is not in the workshop environment: build, validate and compile in the workshop, and run it where BPDM and its identity provider are deployed. The labs/ steps used here are marked experimental in TestLab.
1 · The product in brief¶
BPDM keeps the "golden record" of business partners: one clean, shared entry per company, site and address, each with a BPN. A member uploads its own view of a partner to the Gate. The Orchestrator and the Pool clean and merge the data, and the result comes back to the Gate's output with a BPN.
2 · The journey the test tells¶
| Side | Played by |
|---|---|
| Your side (SUT) | The BPDM Gate, called directly with a token from its identity provider |
| Partner side (engine) | The test, acting as a member's system that calls the Gate |
- The member gets a token from the identity provider.
- The member uploads one business partner to the Gate's input, under an external id of its own.
- The member reads it back from the input by that external id.
- The member asks for its sharing state and sees that it is known.
- A caller without a token is refused.
3 · The TCK you deliver¶
tck/e2e/
├── index.yaml # the manifest
├── tests/
│ ├── upload_and_read_back.yaml
│ ├── no_token_is_refused.yaml
│ └── golden_record_has_a_bpn.yaml (optional)
└── apis/
└── gate.json
.tractusx # e2eTest: tck/e2e
.github/workflows/e2e-test.yml
| Manifest field | Value |
|---|---|
kind · syntax |
tck · v1-alpha |
id |
bpdm-e2e |
metadata.license |
Apache-2.0 |
metadata.standards |
[] |
dataspace |
ecosystem: Catena-X, version: saturn |
infrastructure.engine |
nothing |
infrastructure.sut |
nothing |
Variables (env.variables)
| id | Kind | What it is | Example | In the workflow |
|---|---|---|---|---|
gate_url |
variable/type/string, source: input, scope: sut |
Base URL of the Gate API, without the version. | https://bpdm-gate.example.org |
Supplied when the TCK runs |
token_url |
variable/type/string, source: input, scope: sut |
Token endpoint of the identity provider the Gate trusts. | https://centralidp.example.org/auth/realms/CX-Central/protocol/openid-connect/token |
Supplied when the TCK runs |
client_id |
variable/type/string, source: input, scope: engine |
The technical user the test calls the Gate as. | – | Supplied when the TCK runs |
client_secret |
variable/type/string, source: input, scope: engine |
Its secret. Supplied when the TCK runs, never written into a file. | – | Supplied when the TCK runs |
API documents (env.apis)
| id | What it is | Source |
|---|---|---|
gate |
The Gate's OpenAPI document. Copy docs/api/gate.json of the BPDM release under test to tck/e2e/apis/gate.json and declare it under env.apis. Tests call its operations by operationId, so nobody has to type a path. | https://github.com/eclipse-tractusx/bpdm/blob/main/docs/api/gate.json |
Runs in the workshop: No: build, validate and compile today; run where the product is deployed. Workflow input run-in-toolbox: false. Set run-in-toolbox to false. The workflow then validates and compiles on every pull request.
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 business partner uploaded to the Gate can be read back¶
tests/upload_and_read_back.yaml · id upload-and-read-back · Journey · Positive · Contract
Proves: The Gate stores what a member uploads, under the member's own external id, in the shape its API documents.
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Mint an external id that is new in every run. | util/generate_uuid |
– |
| 2 | Get a token with the client credentials. | security/oauth2/client_credentials |
☐ An access token is returned. |
| 3 | Upload one business partner: operation upsertBusinessPartnersInput, with the external id and a legal name. | labs/http/api_request |
☐ The answer is a success (2XX) and matches the documented answer. |
| 4 | Read it back: operation getBusinessPartnersInput, with the external id. | labs/http/api_request |
☐ The answer holds exactly one business partner. ☐ Its external id and legal name are the ones uploaded. |
| 5 | Ask for its sharing state: operation getSharingStates, with the external id. | labs/http/api_request |
☐ A sharing state is returned for the external id. |
Test 2 · The Gate refuses a caller without a token¶
tests/no_token_is_refused.yaml · id no-token-is-refused · Negative
Proves: Business partner data is not open to anyone who finds the address.
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Call getBusinessPartnersInput without an Authorization header, expecting 401. | labs/http/api_request |
☐ The answer is 401. |
Test 3 · The uploaded partner comes back from the Pool with a BPN (optional)¶
tests/golden_record_has_a_bpn.yaml · id golden-record-has-a-bpn · Journey · Positive
Proves: The whole BPDM chain works, Gate, Orchestrator and Pool, not only the Gate.
execution
| # | What happens | Step | Must be true |
|---|---|---|---|
| 1 | Upload a business partner as in test 1 and set it ready to be shared with postSharingStateReady. | labs/http/api_request |
– |
| 2 | Wait until the sharing state of the partner is Success, retrying the read instead of sleeping. | flow/retry |
– |
| 3 | Read it from the output: operation getBusinessPartnersOutput, with the external id. | labs/http/api_request |
☐ The answer holds the partner with a BPNL. |
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 |
|---|---|---|
upload_and_read_back.yaml |
Read back a different, fresh external id. | The answer holds no business partner and the check fails. |
no_token_is_refused.yaml |
Send the token from test 1. | The answer is 200 and the check fails. |
6 · Watch out¶
- Use the v7 operations. The v6 ones have a _1 at the end of their operationId.
- The secret is an input supplied at run time. A secret in a file fails review.
- If the compiler refuses an empty infrastructure, ask a facilitator; do not add a connector the tests do not use.
7 · Not in this spec¶
- CSV upload, relations and statistics.
- The Pool's and the Orchestrator's own APIs.
- Deleting a business partner. The Gate has no delete for input partners, so use a new external id in every run.
8 · Give it to your assistant¶
Attach or paste the raw spec, then send:
Build the E2E test project for Business Partner Data Management (BPDM) in tck/e2e, exactly as the spec
bpdm.yaml describes it. The manifest id is bpdm-e2e; every test
file repeats it as namespace. Write the required tests first: upload_and_read_back.yaml, no_token_is_refused.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/upload_and_read_back.yamlis green. -
tests/no_token_is_refused.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