mock
| Module | Step | Summary |
|---|---|---|
| — | mock/api |
Register a mock HTTP endpoint that returns a canned response. |
| — | mock/discovery |
Register a BPN Discovery Finder mock returning configured EDC endpoints. |
| — | mock/dtr |
Register a protocol-aware AAS Digital Twin Registry mock. |
wait/dataplane |
mock/wait/dataplane/http_request |
Wait for an inbound HTTP request that arrives through the engine connector's data plane. |
wait |
mock/wait/http_request |
Wait for an inbound HTTP request on a previously-registered mock endpoint. |
mock/api
Register a mock HTTP endpoint that returns a canned response.
full_mock_url is what a test hands to the system under test as its callback address; mock is what it hands to mock/wait/http_request, which then blocks until the SUT calls it. Every mock requires an API key, so none is a public API: a call without it is refused with 401 and never reaches a mock/wait/* step. The key is the run's, minted when the run registers its first mock and shared by all of them, so one asset can front several mocks and a re-armed mock keeps it. A mock behind a connector gets it from connector/provider/create_mock_asset, which puts it in the asset's private data address: the data plane adds it, and the system under test never learns it. api_key is hidden in every record of the run unless the step's returns: says hidden: false — for a mock the system under test calls directly, whose operator needs it. public opts a mock out, for an engine step that cannot send a header.
Inputs
| Parameter | Type | Required | Default | Also accepts | Description |
|---|---|---|---|---|---|
id |
string | no | '' |
— | Identifier for the registered mock; also the variable its URL is stored under. |
path |
string | yes | — | — | URL path to register, e.g. '/companycertificate/request'. |
method |
string | no | 'POST' |
— | HTTP method the mock answers on. |
api_key_header |
string | no | 'x-api-key' |
— | Request header the run's mock API key must arrive in. |
public |
boolean | no | False |
— | Answer anyone who has the URL, without the API key. Only for a mock an engine step calls that cannot send a header, such as an OAuth2 token endpoint; every other mock requires the key. |
response_status |
integer | no | 200 |
— | Status code the mock returns. |
response_body |
any | no | {} |
— | JSON body the mock returns. References are written the usual way, '${{ ... }}', and are resolved before the step runs. |
response_headers |
object | no | {} |
— | Headers the mock returns alongside the body. |
Output — the value assertions and returns: read
The mock that now exists, and the two URLs a test needs from it.
| Field | Type | Description |
|---|---|---|
mock |
MockInstance | The registered mock, as 'mock/wait/http_request' takes it. |
base_mock_url |
string | Root URL of the testlab mock server. |
full_mock_url |
string | Address to hand the system under test — root plus the mock's path. |
api_key |
string | The key a call must carry — the run's, shared by every mock it registers; empty for a public mock. Hidden unless the step's returns say 'hidden: false'. |
mock/discovery
Register a BPN Discovery Finder mock returning configured EDC endpoints.
A consumer step can then resolve a counter-party's DSP endpoint from its BPN exactly as it would against the real service — the mock answers only for the BPNs it was asked about.
Inputs
| Parameter | Type | Required | Default | Also accepts | Description |
|---|---|---|---|---|---|
id |
string | yes | — | — | Unique identifier for the registered mock. |
mappings |
object | yes | — | — | BPN to EDC endpoint mapping, or a list of {bpn, endpoint} entries. |
Output — the value assertions and returns: read
This step produces no value — it acts, and there is nothing to read back.
Type: NoneType
mock/dtr
Register a protocol-aware AAS Digital Twin Registry mock.
Shells registered through the mock's own POST /shell-descriptors become retrievable the same way the pre-configured ones are, so a test can exercise the write path and the read path against one registry. It answers the AAS v3 API as a real registry does, which is what makes it worth testing against: GET /lookup/shells takes one assetIds value per criterion, each a base64url-encoded SpecificAssetId object, and a value holding the whole list is refused with a 400 that says so. The consumer-side steps already send it that way, so a test that uses them needs to know none of this.
Inputs
| Parameter | Type | Required | Default | Also accepts | Description |
|---|---|---|---|---|---|
id |
string | yes | — | — | Unique identifier for the registered mock. |
shells |
list of object | no | [] |
— | Shell descriptors the registry starts with, each carrying an 'id' and optionally 'specificAssetIds'. |
Output — the value assertions and returns: read
This step produces no value — it acts, and there is nothing to read back.
Type: NoneType
Nested objects
MockInstance
A registered mock, as the steps that use it later need to see it.
| Field | Type | Required | Default | Also accepts | Description |
|---|---|---|---|---|---|
endpoint_id |
string | no | '' |
— | Identifier the mock was registered under, when it was given one. |
path |
string | yes | — | — | Path the mock listens on. |
method |
string | yes | — | — | HTTP method the mock answers. |
base_mock_url |
string | yes | — | — | Root URL of the testlab mock server. |
full_mock_url |
string | yes | — | — | Address the system under test calls — root plus path. |