Stefan
Stefan

Reputation: 1

Get default Testers for Test Suite with powershell script

trying to get the default testers that are assigned to a test suite in azure devops with a powershell script

$coreAreaId = "3b95fb80-fdda-4218-b60e-1052d070ae6b" 
$tfsBaseUrl = GetUrl -orgUrl $orgUrl -header $header -AreaId $coreAreaId
$testerUrl = "$($tfsBaseUrl)$projectname/_apis/test/Plans/$testplanid/suites/$testsuiteid" +"?" + "`$expand" + "=1&api-version=5.0"
$tester = Invoke-RestMethod -Uri $testerUrl -Method Get -ContentType "application/json" -Headers $header

Url is like this:

"https://example.com/xxx/_apis/test/Plans/12572/suites/12583?$expand=1&api-version=5.0"

In the data I get back from devops there is no item "defaultTesters ShallowReference[] Test suite default testers"

as described here:

https://learn.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/get%20test%20suite%20by%20id?view=azure-devops-server-rest-5.0

Upvotes: 0

Views: 74

Answers (1)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30353

I tried and got the same result with powershell script calling test suite by id,

BTW,I found there was not an option allowing me to set a default tester for a test suite. Do not know how you assign a default tester to a test suite?

But for specific test case, assigned tester can be retrieved by rest API.

I have submitted an issue to Microsoft document team to track this issue.

Upvotes: 0

Related Questions