I know there are ways to automate SQL Server “unit tests.” But my question is slightly different.
When validating requirements we write a series of SQL Scripts that basically return nothing if success.
So basically its like
- Execute Query
- Execute another Query
- Run SSIS Package
- Run Query.
And example with a little more context
Requirement #1 Description: Show SO my issue
- Query to check if target table exists and is empty
- Query to check if source table exist and has data
- Run ETL SSIS package
- Query Check that data transfered correctly
- Query to assert business rules
We have found a way to automate this process by writing a custom program to parse through execute SQL Queries, load necessary data, run SSIS packages, etc and then report if we have a result (which shows test failure).
This seems like a wheel reinventing… but I haven’t been able to find anything like it. Especially one that integrates with SSIS.
EDIT:
Someone suggested SSISunit, and there is little to no documentation on it. If we were to use SSIS unit is it more like the setup process would assert that the required conditions exist, steps 1 & 2 above? I always thought setup processes do not do validation?
After about a months worth of research there is no OTS program out there that does what this question asks about.
We were looking for a tool set that allows for you to define how to validate a requirement. In our case we needed a generic routine to execute SQL Scripts, Load Data, and Run SSIS packages and the only way to do it currently is to write your own orchestration tool.
We used .NET to orchestrate but @Sam did provide a useful way to do it with SSIS. Thanks to @JasonHorner advice we are now looking at making it look and feel more like SSISUnit but at a more organized level.