Andrey Kudin
Andrey Kudin

Reputation: 63

Azure DevOps API: get all testcase steps

Is there a way to get all the testcase steps data via Azure DevOps API?

screenshot

Upvotes: 2

Views: 2519

Answers (3)

Dejulia489
Dejulia489

Reputation: 1295

The Azure DevOps api has endpoints for returning test runs, results and cases. The api is wrapped in a PowerShell module called AzurePipelinesPS that has functions like

  • Get-APTestSuiteList
  • Get-APTestRunList
  • Get-APTestRun
  • Get-APTestRunStatistic
  • Get-APTestResultList
  • Get-APTestResult
  • Get-APTestPlanList

The following command will return a list of all your test cases in a suite.

Get-APTestSuiteList -Session 'youSessionName'

Be sure to setup a session locally with New-APSession when first installing the module. You can find the session documentation here.

Upvotes: 0

Andrey Kudin
Andrey Kudin

Reputation: 63

I was able to find the solution:

GET https://{host}/{collection}/{project}/_apis/testplan/Plans/{plan id}/Suites/{suite id}/TestCase/{testcase id}

Upvotes: 1

Sajeetharan
Sajeetharan

Reputation: 222522

You need to use this particular Endpoing,

POST https://dev.azure.com/{organization}/{project}/_apis/test/Runs/{runId}/results?api-version=5.0

and access TestActionResultModel

Upvotes: 0

Related Questions