SQL Test - 1.0
Working with tests - SQL Test
SQL Test runs tests depending on what is selected in the SQL Test window.
Running all tests for a database
To run all the tests for a database, ensure the database is selected in the SQL Test window, and click Run Tests:

Running a test class
To run a group of tests in a test class, ensure the test class you want to run is selected, and click Run Tests:

Running a single test
To run a single test, ensure the test you want to run is selected in the SQL Test window, and click Run Tests.
Alternatively, right-click the test, and then click Run Test:

Tip: With the database, test class, or individual test you want to run selected, you can press Alt + Shift + X to run tests.
Test status indicators
In the SQL Test window, the icon before the test name displays the status of the test:
|
There is no result for this test; either this is a new test you have created, or a test you have not run since you launched the SQL Test window. Tests are also reset to this status when you refresh the list of tests. |
|
When the test was last run, it passed |
|
When the test was last run, it failed |
If you want to reset the status of all the tests in the SQL Test window, you can refresh the list of tests by clicking
.
Editing a test
To script out a test as an ALTER PROCEDURE query, double-click the test in the SQL Test window.
Alternatively, you can right-click a test in the SQL Test window, and then click Edit Test.
For information on writing tests in T-SQL using the tSQLt framework, see: tSQLt User Guide.
Deleting a test
To delete a test from the database, right-click a test in the SQL Test window, and then click Delete Test:

Note: Tests are stored procedures, so deleting a test will drop the stored procedure from your database.
Was this article helpful?
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using SQL Test