Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
yodha
Helper IV
Helper IV

How to connect azure DevOps test cases data to power bi?

HI,

I am trying to create a power bi report for "executed test cases" using Azure devops as data source, like this:

 

Untitled 1.png
i understood that we can't retrive the "outcome" column using "Analytics view" of DevOps Portal.

Untitled.png

So the only option i left with is "Odata" query to retrive the testcases data to power bi.

I have found the below query in Microsoft docs, but i am not sure how to edit the query according to my requirement.

======================================================================
https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/TestPoints?
$apply=filter(
(TestSuite/TestPlanTitle eq '{testPlanTitle}')
)
/aggregate(
$count as TotalCount,
cast(LastResultOutcome eq 'Passed', Edm.Int32) with sum as Passed,
cast(LastResultOutcome eq 'Failed', Edm.Int32) with sum as Failed,
cast(LastResultOutcome eq 'Blocked', Edm.Int32) with sum as Blocked,
cast(LastResultOutcome eq 'NotApplicable', Edm.Int32) with sum as NotApplicable,
cast(LastResultOutcome eq 'None', Edm.Int32) with sum as NotExecuted,
cast(LastResultOutcome ne 'None', Edm.Int32) with sum as Executed
)
/compute(
Executed mul 100 div TotalCount as ExecPct,
iif(TotalCount gt NotExecuted, Passed mul 100 div Executed,0) as PassedPct
)

================================================================

"Organization" and "project" name i am able to give but i have problem with "testplantitile", as i don't want all the data in the test plan, I want only highlighted test suite results(refer below screenshot).

 

Untitled 2.png

can anyone help me with the query to pull the executed test cases results to power bi?

Thanks in advance!

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@yodha 

I guess you found the query in the doc:

Manual test execution trend sample Power BI report - Azure DevOps | Microsoft Docs\

 

I lack the knowledge on this odata query method. You may go to Azure Devops community:

Newest 'azure-devops' Questions - Stack Overflow

 

If you consider to use the Azure Devops connector in power bi, please refer to:

Azure DevOps Integration with Power BI | Azure DevOps Analytics to Power BI Dashboards - YouTube

 

 

Best Regards
Paul Zheng

View solution in original post

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@yodha 

I guess you found the query in the doc:

Manual test execution trend sample Power BI report - Azure DevOps | Microsoft Docs\

 

I lack the knowledge on this odata query method. You may go to Azure Devops community:

Newest 'azure-devops' Questions - Stack Overflow

 

If you consider to use the Azure Devops connector in power bi, please refer to:

Azure DevOps Integration with Power BI | Azure DevOps Analytics to Power BI Dashboards - YouTube

 

 

Best Regards
Paul Zheng

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.