cmimport -- import utility
cmimport converts external code coverage reports into Coco's internal .csmes format.
The following are supported sources of coverage data:
- Python:
coverage.pyJSON reports
Syntax
cmimport -o <output_csmes_file> -t <execution_title> <source_specific_options>
Options
-o<outfile> |--output=<outfile>: Output.csmesfile name. (Required.)-t<execution-title> |--title=<execution-title>: Default execution title used when none is provided. (Required.)--python-source=<dir>: Root directory of the Python source code. Source content is read from here.--python-json=<file>: JSON report generated bycoverage.py.--help: Print help message.
Example workflow (Python)
# 1) Generate coverage data
pytest --cov=.
# 2) Generate JSON report
coverage json
# 3) Import into Coco
cmimport \
-o output.csmes \
-t "default" \
--python-source=/path/to/source \
--python-json=coverage.jsonThe resulting output.csmes can be analyzed with Coco tools such as CoverageBrowser.
Coco v7.5.0 ©2025 The Qt Company Ltd.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.