Installed cover tool with following command:
go get golang.org/x/tools/cmd/cover
I'm able to run unit test and update the test and coverage result in Sonar with following config and method (all test are present in project root directory) :
Run test: go test -coverprofile coverage.out -json > report.json
sonar-project.properties:
#sonar server and project prop
sonar.sources=.
sonar.exclusions=**/*_test.go
sonar.tests=.
sonar.go.coverage.reportPaths=coverage.out
sonar.go.tests.reportPaths=report.json
sonar.test.inclusions=**/*_test.go
But there are some integration test, I'm not able to include those reports, have any one tried running automated functional testing and updated those reports in sonar for go lang?
I checked previous question posted, was not helpful since it didn't talk about integration/functional test: code coverage is not happening in sonarqube for go lang