djangofan
djangofan

Reputation: 29669

List multi-stage automated test run results, on a per-stage basis, using Azure DevOps GET Api?

Is there a way to list multi-stage automated test run results, on a per stage basis, using Azure DevOps GET Api?

If you call /_apis/pipelines/{pl_def_id}/runs , you will get a list of builds from a defined pipeline.

If you get the latest build from that list, and if that build is multi-stage, the test runs do not seem to be hierarchically beneath the latest build, as you might expect.

To get the test runs, when you call /_apis/test/runs, ( https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/list ) it only can give you the list of ALL runs within your org+project. There does not seem to be an id that references the multi-staged "test runs" tasks back to the "parent pipeline" having a "build id".

I looked at timeline queries, but they don't seem to have that info either.

HOW can this be achieved with ADO GET api? Am I overlooking the answer?

Upvotes: 0

Views: 219

Answers (1)

Dou Xu-MSFT
Dou Xu-MSFT

Reputation: 3181

There is a parameter buildUri in the run list API as you mentioned the doc:Run List

You can use buildUri to get test runs from a specified build of pipeline.

However, if you want to get multi-stage automated test run results on a per stage, I’m afraid that there’s no supported API to achieve it. You may submit a feature request at website below:

feature request

Upvotes: 0

Related Questions