Can you provide a right click menu option for scripting out all (or individual) tests
Context menu option on all nodes in the SQL Test panel - with the following options:
a. on the db node - "Script all tests" (scripts every test, and all classes)
b. on a test class node - "Script all tests" (scripts all tests that belong to that class, and the class)
c. on an individual test - "Script test"
3 comments
-
Dave Green
commented
SQL Test tests are just stored procedures - you could always script the stored procedures directly from SSMS by right clicking on the object and scripting the procedure to a file? (If you use SQL Source Control it can script out tests for you into source control like any other stored proc.)
-
Peter Marriott
commented
I want to put all my tests into subversion.
I build a database from scratch using scripts, then apply tsqlt. Then I want to load all my tests. -
Thank you for the suggestion. Can I ask what you would need this functionality for?
For individual tests, you can select "Edit Test..." from the context menu, to script the test as ALTER.
Thanks,
Justin