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?