My current project uses SSRS as the reporting engine. I have the report executing a text command with about 10 variables passed to it. I have been looking for a solution on how to unit test (acceptance or integration, whatever, just some automation) to an SSRS report project.
I thought about using this method:
- Move the SQL text command to a stored procedure
- Create a Reports.Tests project
- Create a project_tests database and point the connection string to this database
- Set up my unit test <Setup> with the data I would return in the test
- Create a test with the parameters passed and test the result set
I wanted to be sure that I wasn't missing something obvious.
How do other programmers test their reports automatically? Any suggestions on how to improve this method?
EDIT: I should clarify that I would like to only test the result set and not formatting of the report.