This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Looking for a book/video/tutorial/etc on unit testing SQL queries. Google has failed me the last couple days. I keep getting results about testing procs/functions but I’d like to know how test that a query returns an expected set of results in a specific format.
Looking for a book/video/tutorial/etc on unit testing SQL queries. Google has failed me the last couple days. I keep getting results about testing procs/functions but I’d like to know how test that a query returns an expected set of results in a specific format.
Depends on weather you want to test the queries in a database to see if the system returns you the expected values, or if you want to test the SQL query statements as code. If you want to test queries in a database environment, DB-Unit is probably your one-stop integration testing framework (available for multiple languages). If you're seeking to run tests against the scripted SQL statements without integration, I have no clue… I haven't come across a framework that allows SQL to be "unit tested" outside of a database.