Skip to main content

colcon-tesults

A colcon event handler that reports test results after colcon test completes. Results can be written locally for CI reporting, uploaded to Tesults, or both.

Recommendation

If you are using GoogleTest (C++) or pytest (Python) we strongly recommend using tesults-gtest or pytest-tesults instead. Those integrations provide per-test reporting with descriptions, steps, custom fields, and file uploads. colcon-tesults reads JUnit XML output and provides basic pass/fail results only — no enhanced reporting.

colcon-tesults is best suited for mixed workspaces where per-package setup is not practical, or as a quick zero-config starting point.

Installation

pip install colcon-tesults

Or with Pixi/RoboStack:

pixi add --pypi colcon-tesults

Usage

Set TESULTS_TARGET to your target token and run colcon test as usual:

TESULTS_TARGET=token colcon test

colcon-tesults is enabled by default once installed. If neither TESULTS_TARGET nor TESULTS_OUTPUT_FILE is set, it silently does nothing.

GitHub Actions and local output

Set TESULTS_OUTPUT_FILE to write a Tesults-compatible JSON payload without a target token:

TESULTS_OUTPUT_FILE=/path/to/results.json colcon test

The Test Automation Reporting for GitHub Actions action sets this variable automatically. Place the action before the test step:

- name: Prepare test reporting
  uses: tesults/test-automation-reporting@v1

- name: Run ROS 2 tests
  run: colcon test

When TESULTS_TARGET and TESULTS_OUTPUT_FILE are both set, colcon-tesults writes the local report and continues uploading to Tesults. The local payload always contains an empty target so credentials are not stored in the artifact.

Config file (optional)

Keep tokens out of scripts by using a key name and pointing to a config file:

TESULTS_TARGET=my-target TESULTS_CONFIG=/path/to/tesults.cfg colcon test

tesults.cfg format:

# Tesults target tokens
my-target = eyJ0eXAiOiJ...
staging   = eyJ0eXAiOiK...

Build information (optional)

TESULTS_BUILD_NAME=1.0.0 \
TESULTS_BUILD_RESULT=pass \
TESULTS_BUILD_DESCRIPTION="Release build" \
TESULTS_BUILD_REASON="" \
colcon test

How it works

colcon-tesults hooks into the colcon event system. After each package's tests finish (JobEnded event), it reads the JUnit XML output from the package's build directory. When the colcon process exits, all collected results are written locally, uploaded to Tesults, or sent to both configured destinations.

Documentation

https://www.tesults.com/docs/colcon

Metadata

Release files for colcon-tesults 1.1.0

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

Source distribution (sdist)

Source distribution for colcon-tesults 1.1.0
File Size Uploaded
colcon_tesults-1.1.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for colcon-tesults 1.1.0
File Interpreter ABI Platform
colcon_tesults-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / colcon_tesults-1.1.0.tar.gz

Download URL colcon_tesults-1.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5027e70969f63601efb8a66b1b2fa68dcac83e0abf83f2629e209e6ec2ea7a0c
BLAKE2b-256 checksum
How to use checksums
71346d39dddb64aa08482ff001d01411024481b8d6fb0161d8de52f5f65f5602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / colcon_tesults-1.1.0-py3-none-any.whl

Download URL colcon_tesults-1.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d2fd94628135afa56a204e5d9e783849d6a143fbe91be6cb221916caaa7866a
BLAKE2b-256 checksum
How to use checksums
fc542147f15b642a8c73b83f41fbec10fe450fbd41d793440782f2548d81b045
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

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