microsoft / microsoft/azure-devops-go-api

[azuredevops/test] Neither GetBuildCodeCoverage nor GetTestRunCodeCoverage returns results

Open
#124 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GetBuildCodeCoverage and GetTestRunCodeCoverage entry points in the azuredevops/test client and reproduce the calls using the supplied arguments. Inspect how the flags values are defined and interpreted; done means both methods return the expected code-coverage results and the valid flag options are clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.