Search code examples
ssasolapolap-cube

Unit Testing SQL Server OLAP Cubes Using C#


I have a SSAS cube which needs to be tested. I want to insert some values into my test database and then trigger cube to be processed on my test database and then write tests again dimensions/measures and cube itself based on the values inserted into dim tables.

The cube has a data source which should be configurable. I created a SSIS package which has a Analysis Services Processing Task to process the cube and I can execute the package in my test project but when running the ssis package directly seems to process the cube whereas executing it through the test project doesn't although it doesn't throw any exception.

Basically I need to know if there is any way to unit test the OLAP cubes either using an SSIS package or any other ways.

Thanks for your help.


Solution

  • Here is a good example of how to do this:

    http://msdn.microsoft.com/en-us/magazine/dn519927.aspx