How do I rename a tSQLt test class?

后端 未结 4 398
不知归路
不知归路 2021-01-03 02:20

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

4条回答
  •  攒了一身酷
    2021-01-03 02:24

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

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

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

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

    enter image description here

    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):

    enter image description here

    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!

    David

提交回复
热议问题