How do I rename a tSQLt test class?

Viewed 475

I'm developing a database using the Red Gate SQL Developer tools. SQL Test, the SSMS add-in that runs tSQLt tests, lacks a way to rename test classes.

I have a test called [BackendLayerCustomerAdministrationTests].[test uspMaintainCustomerPermissions throws error when PermissionValue is missing or empty].

The name is so long it breaks Deployment Manager.

2013-12-05 18:48:40 +00:00 ERROR The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

There are other unwieldly test names in this class, so I want to start by shortening the class name.

A more succinct class name would be CustomerTests.

sp_rename is no help here.

EXECUTE sys.sp_rename
  @objname = N'BackendLayerCustomerAdministrationTests',
  @newname = N'CustomerTests';

Msg 15225, Level 11, State 1, Procedure sp_rename, Line 374 No item by the name of 'BackendLayerCustomerAdministrationTests' could be found in the current database 'ApiServices', given that @itemtype was input as '(null)'.

How do I change it?

4 Answers
Related