Hire me at Go Tripod.

Unit Testing SSRS Reports

March 12th 2008, 4:24 pm in SSRS, TDD.

A big problem we’re having on a current project is ensuring that reports generated by SSRS actually contain the right data. For example, we have some fairly complicated ranking and averaging going on in subtotal columns that can look right on first glance but will be wrong for edge cases. The other problem is that one “fix” can pretty easily result in a regression elsewhere.

My current thought is to simply use SSRS XML export on the reports and use that to run unit tests against. We could push known data to the database, export the report, and run asserts against the average and ranking values in the XML.

However, I’m not sure how happy SSRS will be with this approach; for example, how easy will it be to change the datasource on the fly for these tests? And obviously, when the reports get redesigned or changed, the unit tests could break. I think it’s worth investigating; I wonder if anyone else has experience with such testing?

Responses to “Unit Testing SSRS Reports”

Comments are closed.

  1. Funny enough, our company ran into this exact same problem.
    We developed a tool (in its beta stages) that allows you to unit test your ssrs reports.

    You can find some details here:
    http://www.innosphere.ca/Products/SSRSUnitTestingSuiteInformationRequest/tabid/107/Default.aspx

    Give me a shout if you have any comments. I’m interested in opening discussions on this topic.

    David Cummings