SQL Test - 1.0
Installing and running the example tests - SQL Test
The following example demonstrates how to install the example database and then run the example tests.
Installing the example database
To install the example database:
- In SQL Server Management Studio, on the Tools menu, click SQL Test.
The SQL Test window is displayed:

Tip: You can also open the SQL Test window by pressing Alt + Shift + Z.
- In the SQL Test window, click + Add Database to SQL Test:

- On the Add Database to SQL Test dialog box, click Install Sample Database:

The Welcome to SQL Test dialog box is displayed:

- Select the server you want to install the sample database on, and then click OK.
The tSQLt_Example database is installed, and added to the SQL Test window.
Running the example tests
The example tests are listed in the test class AcceleratorTests. To run all the tests in this class, ensure AcceleratorTests is selected in the SQL Test window, and click Run Tests:

For more information on running tests with SQL Test, see: Working with tests.
When you have run the tests, you can see that the test ready for experimentation if 2 particles failed (indicated by
):

When a test fails or prints any messages, SQL Test automatically displays the SQL Test Messages window:

For more information on the Messages window, see: Viewing messages.
Fixing the failing example test
For more information on how can you fix the failing example test and start creating your own unit tests, see: After Running the Examples (tSQLt documentation).
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