I suggest you ...

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"

9 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Jules345Jules345 shared this idea  ·   ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Dave GreenDave 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 MarriottPeter 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.

      • Justin CaldicottAdminJustin Caldicott (Admin, SQL Test home page) commented  · 

        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

      Feedback and Knowledge Base