I'm placing my first steps in the Business Intelligence sector and I'm looking for good ways to test BI systems. I'm going to try to explain what my system consists of so that people unfamiliar with BI systems could also pitch in some advice.
For those of you who are rather unfamiliar with BI systems, here's how a BI system typically looks like on the MS stack:
- Data is in MS SQL DBs, text files, XML files, etc
- The data is put into a single MS SQL DB (the data warehouse) using (an) Sql Server Integration Services (SSIS) package(s). (ETL, Extract - Transform - Load)
A 'Cube' containing Measurements, KPIs etc is processed on the data warehouse, using Sql Server Analysis Services (SSAS)
Reporting can be built on the cube using excel, Reporting services, etc.
There are multiple things you can/should test:
- Is the data put into the data warehouse correctly
- Are the measurements and calculations done correctly
I think a test environment could be made in .NET using empty databases with the same structure as the production databases and data warehouse.
Tests could be written like this:
- Insert dummy data in the production databases of which you know that they should produce certain measurements, KPI values. For example: Insert a car with cost 100 and profit 110 sold in 2008. another car with cost 100 and profit 120 sold in 2009. markup in 2008 should be 10% and in 2009 20%.
- Run the SSIS package(s). I looked this up and its possible in .net
- Run the SSAS calculations. Still have to look up how to do it, but should be possible.
- Retrieve the KPI data from the Analysis Services database and test if it matches the expected results.
Some downsides I expect to this approach:
- Setting up test databases, security for the test script, ... will take quite some time.
- Changes to production databases and the data warehouse will have to be copied to the test environment.
- Creating the insert statements for the test data could be difficult. In my car example it is simple but for more complex calculations this could be quite time consuming
- Tests will most likely run quite slow
- The tests are error prone, either in the INSERT statements or in the part where you retrieve the KPI data. Figuring out what went wrong could be difficult.
So summarized, writing and maintaining these tests could be quite consuming.
On the other hand, you would have a nice test-driven approach where you write the test first, plus your business logic is explained and documented in the tests.
Since I have not much practical experience with BI development I'm unsure if this is the way to go and what alternatives there are. Perhaps someone more experienced could explain how BI systems are usually tested and documented?