Add coverage reporting to integration testing framework
blakerouse opened this issue · comments
It is possible to build a golang binary with coverage reporting enabled [1]. That will allow the integration tests to run the actual elastic-agent
binary and have it report its coverage report. The coverage report should then be copied back to the developer or CI machine.
This would really help provide true coverage of the Elastic Agent repository with both unit and integration tests.
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)
I believe if these reports land in the following folder/files, SonarQube should start picking them up and reporting more accurate stats for code that gets integration-tested but not unit-tested:
elastic-agent/sonar-project.properties
Line 13 in c5e9707
Related: https://go.dev/doc/build-cover#converting-to-legacy-text-format