SQL Test 3

Creating new tests

When you've added a database to SQL Test, you can create a new test.

A test is a stored procedure that you can use to test any aspect of your database.

To create a new test:

  1. In the SQL Test tab, click :


    The New Test dialog box opens:


  2. Specify a name a for the new test, and the database you want the test to be created on.
  3. In the Test Class box, specify a test class to create the test in.

    A test class is a schema that helps you organize your tests. You can create multiple tests within a single class.

    To create a new test class, type the name of a new class in the Test Class box. SQL Test will create the class when it creates the test.

    If you want to create a new test class and a schema with the same name already exists, SQL Test will drop the existing schema before creating the test class.

  4. Click Create Test.

    The test is created, and added to the list of tests in the SQL Test tab. If you specified a new test class, it is also created.

    When you create a new test, SQL Test opens a template ALTER PROCEDURE query for the test.

    For information about writing tests in T-SQL using the tSQLt framework, see tSQLt User Guide.


Didn't find what you were looking for?