Skip to content

Conversation

@divyajo25
Copy link

@divyajo25 divyajo25 commented Jun 13, 2024

This PR enhances the Coverage Publisher by adding branch coverage information to the generated cjson files. The Coverage Publisher now processes jacoco.xml, clover.xml, and cobertura.xml files to also include branch coverage data, which is stored as line number and the associated total branches, and covered branches to it.

Details of Changes:

FileCoverageInfo Enhancements:
Added a new dictionary to FileCoverageInfo that maps line numbers to their respective total branches and covered branches.

Report Generator Updates:
Integrated logic to retrieve branch coverage data from the branchesByLine in the code files.

Unit Test Updates:
Updated existing unit tests for FileCoverageInfo to include branch coverage status.
Added new unit tests in the ReportGeneratorToolTest to verify the branch coverage status.

After this is completed the next steps will be -
The cjson files are now equipped with branch coverage data and will be sent to storage.
Planned adjustments to the CoverageMerge job to retrieve and incorporate branch coverage information.
Changes in stored procedures and SQL tables to handle the new branch coverage data.

Output CJSON file for a cobertura.xml input

Screenshot 2024-06-13 101218

Output CJSON file for a JaCoCo.xml input

Screenshot 2024-06-13 102311

}

/// populating branch coverage status

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have these changes behind feature flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants