Metadata-Version: 2.4
Name: etos_test_runner
Version: 3.20.1
Summary: ETOS Test Runner
Author-email: Tobias Persson <tobias.persson@axis.com>
License: Apache License, Version 2.0
Project-URL: Documentation, https://etos.readthedocs.io/
Project-URL: Homepage, https://github.com/eiffel-community/etos-test-runner
Project-URL: Repository, https://github.com/eiffel-community/etos-test-runner
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Requires-Dist: etos_lib==5.6.1
Requires-Dist: cryptography<51.0.0,>=50.0.0
Requires-Dist: packageurl-python==0.9.1
Requires-Dist: jsontas<2.0.0,>=1.4.1
Requires-Dist: opentelemetry-api==1.45.1
Requires-Dist: opentelemetry-sdk==1.45.1
Requires-Dist: opentelemetry-exporter-otlp==1.45.1
Requires-Dist: opentelemetry-semantic-conventions==0.66b1
Requires-Dist: opentelemetry-instrumentation-logging==0.66b1
Requires-Dist: opentelemetry-instrumentation-system-metrics==0.66b1
Provides-Extra: testing
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Dynamic: license-file

================
ETOS Test Runner
================

.. image:: https://img.shields.io/badge/Stage-Sandbox-yellow.svg
  :target: https://github.com/eiffel-community/community/blob/master/PROJECT_LIFECYCLE.md#stage-sandbox

ETOS (Eiffel Test Orchestration System) Test Runner


Description
===========

The ETOS Test Runner is responsible for executing test suites in ETOS.
ETR should, ideally, be executed within a test runner docker container.


Installation
============

   pip install etos_test_runner


Prebuilt local container
========================

Commit the intended changes, then run ``make docker-build``. This builds only
``HEAD`` (including in a Git worktree), not staged or uncommitted files.
The default image tag is ``etos-test-runner:local-<12-character-commit>``;
override it with ``IMG=etos-test-runner:<unique-non-latest-tag>`` if needed.
``make docker-test`` validates that image locally without an ETOS service or
Kubernetes cluster. It requires Docker and Python, but no Python test dependencies.

The Dockerfile inherits the Ubuntu Noble base runner's Python 3.13 virtual
environment, etos user (UID/GID 3705), tools, artifact paths and separate test
framework virtual environment. Dependencies are installed at build time using
``requirements.lock`` as constraints. Startup runs ``etos_test_runner.etr``
directly, forwarding arguments and ignoring runtime ``DEV`` / ``ETR_VERSION``
installation overrides. The package's ``lib/executor.sh`` still executes tests.

Git archive substitutes ``.git_archival.txt`` using ``.gitattributes`` so
setuptools-scm derives the package version from the committed revision without
copying ``.git``. The full commit is also recorded in the image's
``org.opencontainers.image.revision`` label. Use ``make docker-build`` rather
than ``docker build .``; the latter deliberately fails with unsubstituted metadata.
Builds need access to the base image and Python dependency indexes; runner
startup does not install the runner package. Test commands may still need
their own dependencies and network access.

Load the image with ``kind load docker-image <image> --name <cluster>`` and
select it in each suite execution's ``environment.testRunner``. See the ETOS
local installation guide for the complete suite workflow.


Telemetry
=========

Set ``OTEL_EXPORTER_OTLP_ENDPOINT`` to enable tracing and correlated logging.
Like the suite runner, initialization uses OpenTelemetry environment and process
resource detectors with the test runner's service name and installed version. 

Suite-level lifecycle spans and bounded phase/outcome metrics are retained;
individual test executions do not emit tracing events. Metrics use the
``OTEL_EXPORTER_OTLP_ENDPOINT`` endpoint or ``OTEL_EXPORTER_OTLP_METRICS_ENDPOINT``
and expose no local scrape endpoint.

Without an endpoint, or with ``OTEL_SDK_DISABLED=true``, tracing, metrics and
logs are no-op.


Contribute
==========

- Issue Tracker: https://github.com/eiffel-community/etos/issues
- Source Code: https://github.com/eiffel-community/etos-test-runner


Support
=======

If you are having issues, please let us know.
There is a mailing list at: etos-maintainers@googlegroups.com or just write an Issue.
