且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何重命名tSQLt测试类?

更新时间:2023-09-29 17:37:16

抱歉,这么晚了!我是从事SQL测试的开发人员.

Sorry to come into this so late! I'm a developer who's working on SQL Test.

我们刚刚在最新版本的SQL Test中添加了重命名测试类的功能.

We've just added the ability to rename test classes to the latest version of SQL Test.

http://www.red-gate.com/产品/sql-development/sql-test/

现在,只需在测试类的上下文菜单上单击鼠标右键,或按 F2 :

It's now as simple as right clicking on the context menu for a test class, or pressing F2:

请记住,此选项对于旧版本的tSQLt不会出现.要升级,请右键单击数据库以卸载该框架,然后执行添加数据库... 以重新添加它(窗口中最右边的按钮):

Please bear in mind that this option will not appear for old versions of tSQLt. To upgrade, right click on the database to uninstall the framework, then do Add database... to re-add it (the right-most button in the window):

或者,您可以在tSQLt中调用名为tSQLt.RenameClass的新过程,这就是SQL Test在后台调用的过程.

Alternatively, you could just call a new procedure in tSQLt called tSQLt.RenameClass, which is what SQL Test calls behind the scenes.

如果您对此有任何疑问,请告诉我们!

Please let us know if you have any issues with this!

大卫