Skip to end of metadata
Go to start of metadata

SonarGo allows to import unit tests execution reports generated by the "go test" command.

  1. Prior to the SonarQube analysis, execute your unit tests:

    go test -json > report.json

    Note: -json flag is supported since go 1.10


  1. Import the report while running the SonarQube analysis by providing the paths of the unit test execution reports through the following properties. The paths may be absolute or relative to the project base directory.

    PropertyScopeDescription

    sonar.go.tests.reportPaths

    Project-widecomma-separated list of paths to unit test report files.


  • No labels