Home > docs > plugins v2 > Code Coverage Task
The Code Coverage plugin provides insights into how much of your Concord flow logic is covered during process execution. It saves the coverage information in the widely used LCOV format, allowing you to analyze the coverage or generate a detailed HTML report.
To be able to use the task in a Concord flow, it must be added as a dependency:
Once added, the plugin will automatically generate coverage information during the execution of your Concord process
At the end of the process execution, the plugin will produce the following files:
coverage.info
: The code coverage data in LCOV format;flows.zip
: A ZIP archive containing the flow files of the executed process.These files will be saved as part of the process attachments.
You can generate an HTML report from the coverage.info file using the genhtml
utility from the LCOV package:
Notes: Ensure you have the lcov package installed on your system to use the genhtml command.
Below is an example of the report generated for the hello_world
flow:
You can use the following Bash script to automate downloading the coverage files, extracting the flows, and generating the HTML report:
Input Parameters:
BASE_URL
, INSTANCE_ID
, and TOKEN
as arguments.Steps:
coverage.info
and flows.zip
from the specified Concord process instance.flows.zip
.genhtml
command to generate the HTML report from coverage.info
and flows.Output:
code-coverage/html
directoryThe code coverage plugin also works with Concord CLI: