{"id":9611,"library":"colcon-test-result","title":"colcon-test-result","description":"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.","status":"active","version":"0.3.8","language":"en","source_language":"en","source_url":"https://github.com/colcon/colcon-test-result/","tags":["colcon","testing","build tool","CI/CD","ROS 2"],"install":[{"cmd":"pip install colcon-core colcon-test-result","lang":"bash","label":"Install core colcon and test result extension"}],"dependencies":[{"reason":"This is an extension for colcon, requiring the core colcon package to function.","package":"colcon-core","optional":false}],"imports":[],"quickstart":{"code":"pip install colcon-core colcon-test-result\ncolcon test-result --help","lang":"bash","description":"This quickstart demonstrates how to install the `colcon-test-result` extension along with `colcon-core` and verify its availability by invoking its help command. To use its full functionality, you would typically first run `colcon test` in a workspace to generate test results, and then use `colcon test-result` to view them (e.g., `colcon test-result --verbose --all`)."},"warnings":[{"fix":"Ensure `colcon test` completes successfully before attempting to view results. Check the build log for test failures or output issues. Use `colcon test --event-handlers console_direct+` for more direct test output.","message":"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`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `colcon test ... --test-result-level {none, package, aborted, failed, summary}` for inline reporting, and `colcon test-result ...` for comprehensive post-run analysis.","message":"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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install compatible versions. If encountering issues after a `colcon-core` upgrade, check the release notes for both `colcon-core` and `colcon-test-result` for known compatibility issues or required version ranges. Upgrade `colcon-test-result` to the latest version that supports your `colcon-core` version.","message":"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.","severity":"breaking","affected_versions":"Potentially across `colcon-core` major version bumps (e.g., 0.x to 1.x)"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install colcon-test-result` to install the extension. Ensure your Python environment (and thus `colcon`) can find the installed package.","cause":"`colcon-test-result` extension is not installed or not discoverable by your `colcon` installation.","error":"colcon: error: unrecognized arguments: test-result"},{"fix":"First, navigate to your `colcon` workspace root. Then, run `colcon test` to execute tests and generate results. After tests complete, retry `colcon test-result --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.","error":"No test results found in 'install/test_results' for test-result type 'all'"}]}