[azuredevops/test] Neither GetBuildCodeCoverage nor GetTestRunCodeCoverage returns results
Alancere opened this issue · 1 comments
Alancere commented
code:
imports (
"github.com/microsoft/azure-devops-go-api/azuredevops/v6"
"github.com/microsoft/azure-devops-go-api/azuredevops/v6/test"
)
ctx := context.Background()
organizationUrl := "myorganizationUrl"
personalAccessToken := "myPersonalAccessToken "
projectName := "myProjec"
buildId := 111111
testRunId := 222222
flag := 7 // 1,2,4 ???
conn := azuredevops.NewPatConnection(organizationUrl, personalAccessToken)
testClient, err := test.NewClient(ctx, conn)
if err != nil {
log.Fatal(err)
}
coverage, err := testClient.GetBuildCodeCoverage(ctx, test.GetBuildCodeCoverageArgs{
Project: &projectName,
BuildId: &buildId,
Flags: &flag,
})
if err != nil {
log.Fatal(err)
}
_ = coverage
runCodeCoverage, err := testClient.GetTestRunCodeCoverage(ctx, test.GetTestRunCodeCoverageArgs{
Project: &projectName,
RunId: &testRunId,
Flags: &flag,
})
if err != nil {
log.Fatal(err)
}
_ = runCodeCoverage
Neither GetBuildCodeCoverage nor GetTestRunCodeCoverage returns results.
At the same time, there is another question about the options for the value of flags.
Alancere commented
@nechvatalp Could you please check it out