Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Eclipse Tractus-X SDK TestLab

Eclipse Tractus-X Test Lab

TestLab is the test authoring and execution engine for Eclipse Tractus-X dataspaces. It lets you author, compile, distribute, and execute conformity tests against dataspace connectors and industry services — without writing any Python code.

Test authors write declarative YAML tests describing the steps to execute, the values to check, and the cleanup to perform. TestLab validates them, packages them, runs them against real connectors and services, and records a full execution trace. It builds on the Tractus-X SDK for its dataspace calls.

Key Components

  • TCK — a Test Case Kit: an index.yaml manifest plus the tests it lists, written in the v1-alpha syntax
  • Compiler — validates a TCK before anything runs and seals it into a portable .tck package, optionally signed and encrypted for specific players
  • Player — executes a TCK from the testlab CLI or embedded in your own application (TestlabPlayer), and writes a CloudEvents execution trace
  • Infrastructure bindings — the connectors and registries a run drives are bound by the operator (testlab.config.yaml or TESTLAB_* variables), never named inside a test
  • Server — a FastAPI app (testlab serve) that runs TCKs, streams live execution events over SSE, and serves the callback and mock endpoints tests listen on

Documentation

The full documentation is published at eclipse-tractusx.github.io/tractusx-testlab. Its sources live in the docs directory.

How It Works

A test is a sequence of steps from a predefined catalogue — for example connector/provider/create_asset, connector/consumer/pull_data_filtered, digital-twin-registry/consumer/dataplane/lookup_shell — each declaring its inputs under with:, the outputs it publishes under returns:, and the checks on those outputs under validate:. See the Step Reference for every step and the TCK Syntax for the format.

Quick Start

This walkthrough takes about five minutes: install the CLI, write a one-test TCK, and run it. For other installation options, see INSTALL.md.

1. Install the CLI

TestLab needs Python 3.12 or newer. Install it into a virtual environment:

python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install --pre tractusx-testlab

This puts the testlab command on your path. Check it works:

testlab --help

2. Write a TCK

A TCK (Test Case Kit) is a directory holding an index.yaml manifest and the tests it lists. Create this layout:

hello-tck/
├── index.yaml
└── tests/
    └── health_check.yaml

hello-tck/index.yaml:

syntax: v1-alpha
kind: tck
id: hello-tck
metadata:
  name: Hello TCK
  version: "1.0"
  description: My first TestLab TCK

tests:
  - id: health_check.yaml
    name: Health check

hello-tck/tests/health_check.yaml:

kind: test
syntax: v1-alpha

namespace: hello-tck
id: health-check

metadata:
  name: Health check
  version: "1.0"

execution:
  - id: health_check
    uses: http/http_request          # a step from the Step Reference
    name: Call the service
    with:
      method: GET
      url: https://eclipse-tractusx.github.io/
    returns:
      status_code:
        type: integer
    validate:
      - uses: validate/assert        # checks read the values declared under returns
        with: { input: status_code, operator: equals, value: 200 }

3. Validate it

cd hello-tck
testlab validate index.yaml
OK — index.yaml is valid (no issues)

A mistake in the YAML is reported here, with the file and line, before anything runs.

4. Run it

testlab run index.yaml

TestLab executes each step, logs every call it makes, and ends with a summary:

╔==============================================================================╗
║                                TCK RUN SUMMARY                               ║
╠==============================================================================╣
║  TEST                                           RESULT      TIME             ║
║  --------------------------------------------------------------------------  ║
║  ✓ Health check                                   PASS      3.5s             ║
╠==============================================================================╣
║  RESULT: PASS  |  1 passed  0 failed  0 skipped  |  Total: 3.5s              ║
╚==============================================================================╝

The console transcript is written to ./logs and the full execution trace — every step's outputs, checks and request/response — to ./data.

5. Package and share it

Compile the TCK into a single .tck package that anyone can run:

testlab compile index.yaml -o hello.tck
testlab run hello.tck

Contributing

Please refer to the CONTRIBUTING.md file for information on how to contribute to this project.

License

Distributed under the Apache License 2.0. See LICENSE for code and LICENSE_non-code for non-code content.

NOTICE

This work is licensed under the Apache-2.0.

Metadata

Release files for tractusx-testlab 1.0.0a23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tractusx-testlab 1.0.0a23
File Size Uploaded Provenance Actions
tractusx_testlab-1.0.0a23.tar.gz 525.8 kB Without provenance Details for tractusx_testlab-1.0.0a23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tractusx-testlab 1.0.0a23
File Interpreter ABI Platform Actions
tractusx_testlab-1.0.0a23-py3-none-any.whl Python 3 none any Details for tractusx_testlab-1.0.0a23-py3-none-any.whl

Total release size: 1.5 MB

Release files / tractusx_testlab-1.0.0a23.tar.gz

Download URL tractusx_testlab-1.0.0a23.tar.gz
Size 525.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e2ceea1de6ed3acb1228ef7567fe8bd015b2ecbe15165751c6db51a428ceaa10
BLAKE2b-256 checksum
How to use checksums
357e19409e587a80ac22ba4e16a3a2bf7acc8703720c0ca973a7527d8e398a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tractusx_testlab-1.0.0a23-py3-none-any.whl

Download URL tractusx_testlab-1.0.0a23-py3-none-any.whl
Size 930.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e74111ec38714bdafb2a596da440c587d64efc33ef5e4426f25204a952e9cdc2
BLAKE2b-256 checksum
How to use checksums
076ddbadd03adb57458291b009a84539255194cb57dffd69373414f71581aa99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for tractusx-testlab 1.0.0a23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page