How to install a test framework

The guide describes how to install and uninstall the tSQLt framework in the database against which you want to run unit tests.

Note

You must install the tSQLt framework before you can run unit tests.

Install the tSQLt framework

1. Open the Install tSQLt Framework dialog in one of these ways:

  • In the top menu, select Database > Unit Test > Install Test Framework.
  • In Database Explorer, right-click the required database and select Unit Test > Install Test Framework.

Note

If the tSQLt framework is already installed, a notification will appear.

2. Select a target connection and a database, for which you want to install the framework, then select Install.

Install the tSQLt framework

Tip

To create or update a connection, from the Connection list, select Manage.

In the Connection Manager dialog, select New to create a connection or Edit to modify an existing one.

The dialog shows the installation progress. When the installation is complete, a message confirms that the tSQLt framework was installed successfully and displays the tSQLt framework version number.

3. Click Finish to close the dialog.

Uninstall the tSQLt framework

1. In Database Explorer, right-click the database on which you want to uninstall the test framework and select Unit Test > Uninstall Test Framework.

2. In the confirmation dialog, select Yes to confirm the deletion of the test framework from the database.

Uninstall the tSQLt framework

The Uninstall Test Framework dialog opens, displaying the progress of the deletion operation. Once done, the following message appears - tSQLt framework was successfully deleted.

3. Click Finish to close the dialog.

Warning

Uninstalling the framework removes all tSQLt stored procedures, functions, and SQL CLR objects from the database.