colcon-test-result
colcon-test-result is an extension for the `colcon` build tool that provides commands to display and analyze test results generated by `colcon test`. It simplifies checking test outcomes without diving into raw XML files. The current version is 0.3.8, and it sees several releases per year, often in sync with ROS 2 development cycles.
Common errors
-
colcon: error: unrecognized arguments: test-result
cause `colcon-test-result` extension is not installed or not discoverable by your `colcon` installation.fixRun `pip install colcon-test-result` to install the extension. Ensure your Python environment (and thus `colcon`) can find the installed package. -
No test results found in 'install/test_results' for test-result type 'all'
cause The `colcon` workspace does not contain any generated test result XML files, likely because `colcon test` was not run, failed, or was run in a different directory.fixFirst, navigate to your `colcon` workspace root. Then, run `colcon test` to execute tests and generate results. After tests complete, retry `colcon test-result --all`.
Warnings
- gotcha The `colcon test-result` command will report 'No test results found' if `colcon test` has not been run previously in the workspace, or if the tests failed to produce valid XML result files in the expected location (typically `install/test_results`).
- gotcha Confusing `colcon test-result` (the command) with the `--test-result-level` argument of `colcon test`. The argument modifies the verbosity of test summary *during* the `test` phase, while the command provides a post-run summary and analysis.
- breaking Major version updates of `colcon-core` can sometimes introduce changes that might require updates to extensions like `colcon-test-result` for full compatibility or to address internal API shifts.
Install
-
pip install colcon-core colcon-test-result
Quickstart
pip install colcon-core colcon-test-result colcon test-result --help