How to install the tSQLt framework

To start creating and running tests on a database, you need to install a test framework on it.

To install the tSQLt framework

1. In Object Explorer, right-click the database you want to install a test framework on, point to Unit Test, and then click Install Test Framework.

Launch the installation of the test framework from Object Explorer or Unit Test main menu

Alternatively, go to Unit Test in the main menu and select Install Test Framework.

2. The Install tSQLt framework window opens. Choose a target database, for which the framework will be installed and click Install.

Choose a target database in the Install tSQLt Framework window

3. The window shows the installation progress. Click Minimize Application to minimize the window.

View the tSQLt Framework installation progress in the window

4. Upon successful installation, the window displays the message tSQLt framework installed successfully and the version of the tSQLt framework that was installed.

Display the message about the tSQLt successful installation

5. Click Finish.

Uninstall the tSQLt framework

1. In Object Explorer, right-click the database you want to uninstall a test framework from.

2. Click Unit Test, and then click Uninstall Test Framework.

3. In the window that opens, click Yes to confirm the intent to delete the tSQLt framework.

4. Upon successful uninstallation, the window displays the message tSQLt Framework was successfully deleted and the version of the tSQLt framework that was uninstalled.

Uninstall the tSQLt framework from the Test List Manager

1. To open the Test List Manager, right-click any database in Object Explorer, click Unit Test, and then click View Test List.

Alternatively, go to Unit Test in the main menu and select View Test List.

2. In the Test List Manager Explorer, right-click the database you want to uninstall a test framework from and select Uninstall Test Framework.

Uninstall the tSQLt framework from the Test List Manager available in the SQL unit testing tool

3. In the window that opens, click Yes to confirm the intent to delete the tSQLt framework.

4. Upon successful uninstallation, the window displays the message tSQLt framework was successfully deleted and the version of the tSQLt framework that was uninstalled.

Note

After you have uninstalled the tSQLt framework, you won’t be able to run unit tests created earlier. To run them, you will need to install the tSQLt framework again.