Seddryck / NBi

NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile your test suite. Just create an Xml file and let the framework interpret it and play your tests. The framework is designed as an add-on of NUnit but with the possibility to port it easily to other testing frameworks.
http://www.nbi.io
Apache License 2.0
107 stars 37 forks source link

Unit testing PowerBI.com (Power BI Service) #343

Open Safariba opened 6 years ago

Safariba commented 6 years ago

Can we write unit tests testing individual DAX queries of the PowerBI .com dataset. Can we influence the data in the dataset (to set the preconditions of the test)?

Seddryck commented 6 years ago

No, there is no solution for this (AFAIK).

johnwww commented 6 years ago

Has someone managed to connect to a PBI online dataset? If I take the connectionstring used to connect Excel it uses a ClaimsToken authorization that is not working in NBi

Seddryck commented 6 years ago

It's not supported by NBi and AFAIK, it's not possible.

mbodtke commented 4 years ago

Update on this: XMLA endpoints allow you to use a variety of third party tools against datasets that are in a powerbi workspace associated to a premium capacity. See here for more information and how to enable: https://docs.microsoft.com/en-us/power-bi/admin/service-premium-connect-tools

A few of us have been able to get NBI v1.22.0 working with XMLA endpoints by: 1) Installing latest MSOLAP (15.1.48.22 at time of writing) from here: https://docs.microsoft.com/en-us/analysis-services/client-libraries?view=asallproducts-allversions 2) Using the following connection string in the .nbits file Provider=MSOLAP.8;Data Source=powerbi://api.powerbi.com/v1.0/myorg/<workspace_name>;Initial Catalog=<dataset_name>;User ID=<user.name@domain.com>;Password=<password>

Johannes-Vink commented 2 years ago

In addition to this: XMLA endpoints are Premium only. However there is also a public preview of a read-only DAX REST API where in the REST call DAX is encapsulated: https://powerbi.microsoft.com/en-us/blog/announcing-the-public-preview-of-power-bi-rest-api-support-for-dax-queries/

And the documentation: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries