tsqlt

How do I rename a tSQLt test class?

倖福魔咒の 提交于 2019-11-30 15:18:15
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

The database owner SID recorded in the master database differs from the database owner SID

此生再无相见时 提交于 2019-11-30 10:15:57
问题 When I try to install tSQLt onto an existing database i get the following error: The database owner SID recorded in the master database differs from the database owner SID recorded in database ''. You should correct this situation by resetting the owner of database '' using the ALTER AUTHORIZATION statement. 回答1: This problem can arise when a database restored from a backup and the SID of the database owner does not match the owners SID listed in the master database. Here is a solution that

The database owner SID recorded in the master database differs from the database owner SID

一个人想着一个人 提交于 2019-11-29 20:09:37
When I try to install tSQLt onto an existing database i get the following error: The database owner SID recorded in the master database differs from the database owner SID recorded in database ''. You should correct this situation by resetting the owner of database '' using the ALTER AUTHORIZATION statement. JohnnyM This problem can arise when a database restored from a backup and the SID of the database owner does not match the owners SID listed in the master database. Here is a solution that uses the "ALTER AUTHORIZATION" statement recommended in the error message: DECLARE @Command VARCHAR

Any solutions to getting Nunit style TestCase() functionality in tSQLt?

泄露秘密 提交于 2019-11-28 12:41:40
问题 I am currently looking to write some unit tests for some SQL Server SQL code using tSQLt. After reading the docs it appears that there is no support for being able to call a test case with parameters, instead of writing separate test cases for each parameter combination. (For the sake of this question please put aside whether you think it is a good idea to pass parameters to a test case vs writing a separate one for each parameter combination) For instance in NUnit you can do something as