SQL Test forum

Welcome to the SQL Test feature suggestion list. Find out more information about SQL Test at http://www.red-gate.com/products/sql-development/sql-test/.

If you have any questions, need help or have found a bug in SQL Test, please visit the forums at http://www.red-gate.com/messageboard/viewforum.php?f=161.

How can we improve SQL Test?

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. add sp_blitz to the pre-installed tests -just like it has been done for Sql Cop

    Hi - When starting a new role I like to do a quick audit by running sql cop and sp_blitz and having a look at the results. the fact sql cop comes with sql test is really good and would be amazing to have brent ozars sp blitz added as well. some of these tests are at server level rather than db level but doesnt matter as i normally create an empty database to look at those tests.

    3 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…)
    • Test Results Output to File or Table

      Output to the Test window can be fine, depending on the situation. However, an output from a full test run to a text file or to a table in a database so that you know, and can compare, one test run to another, is absolutely necessary. As you start expanding to enterprise level of testing, you need to be able to search and sift through the test results. Having them in a window that you have to copy and paste from is not automation.

      10 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…)
      • [Bug] Infinite loop of 'lock timeout exceeded' errors when a database is being created.

        If a database is currently being built on the server your trying to connect to, SQL Test ends up in an infinite loop of 'lock timeout exceeded' errors.

        1 vote
        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…)
        • Multi-Select

          All I can currently do is run a single test or run a test class. I want the ability to multi-select and run my own group. This should require no changes to the tSQLt framework, this is simple GUI functionality. When I right click and run a single test, SQL Test just calls tsql.Run. When I right click and run a test class, SQL Test just calls tsqlt.RunClass. So, give me the ability to select a range of tests, multiple tests (Ctrl + click). This should apply to both unit tests and test classes. Then all the GUI does is…

          5 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…)
          • Open as a Query Tab

            Every time I launch SQL Test, it opens with a separate pane, usually docked in a tiny area across the bottom. The results window does the same. The very first thing I do is yank the pane and dock it as a query tab. After all, I am working with TSQL, which is all done in a query tab and all of these tests are TSQL to test TSQL. I'd like this to open as a query tab.....exactly like SQL Source Control does.....and keep all of its stuff confined to that tab. So, the results window doesn't open as a…

            1 vote
            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…)
            • Add ability to edit template text.

              Basically, my OCD nature of coding means that the template text doesn't match exactly with what I'd like to see in the comments of my tests. In my case, I want tabs before the comments (not 2 spaces) and don't care about the rest of the header text (the instructions for each section). I'd like to ability to massage the template text into exactly what I want. I'm guessing this is currently generated in CLR code. Is there a way to store this information in the database somewhere so that it's editable?

              11 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…)
              • Option for actual results to be shown as INSERT statements

                It would be great if there was an option to have the actual results in the SQL Test Messages window appear as INSERT statements so that I can just copy and paste them into my test case to populate the "expected" table.

                I have a limited set of test data in my SetUp stored procedure, so I know the expected results are accurate. Right now I have to copy and paste each field's value into an appropriate insert statement in my test case, and this is very laborious. This could very easily be automated.

                3 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…)
                  1 comment  ·  Admin →
                • Need a way to easily disable tests

                  There are tests (especially SQLCop tests) that I'd like to be able to disable easily so they don't automatically get run when you execute tSQLt.RunAll.

                  I don't want to delete the test, because there's value in knowing the test exists. You may not be able to fix *all* SQLCop issues right away, but you don't want the build to fail until you have time to fix it. There may be a user story to fix the issue, and you'd like to disable the test until the issue is fixed.

                  You should be able to disable the test by either
                  *…

                  10 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…)
                  • Ctrl+Tab shortcut doesn't work in SQL Test window

                    The Ctrl+Tab shortcut key doesn't work to switch back to another tab in SSMS. It works fine in other tabs (of course) to switch TO the SQL Test tab, but not whilst IN the SQL Test tab to switch to other tabs

                    1 vote
                    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…)
                    • Tests aren't disconnected on server disconnect

                      When I connect to a SQL Server that has tests in a database, it gets added to the SQL Test window. Fine. However, if I then disconnect Object Explorer from that SQL Server, the DBs with tests remain until I quit SSMS.

                      4 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…)
                      • Request optional 'SQL Test Messages' autofocus

                        When having 'SQL Test' and 'SQL Test Messages' in same tab group the 'SQL Test Message' tab pops up and views on top of 'SQL Test' tab.

                        I would like to view the SQL Test tree until tests are complete and then review the SQL Test Message spam when I feel the need to.

                        1 vote
                        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…)
                        • Add the capability to create a "logical folder" on test hierarchy

                          It could be useful to add a capab "create folder" (like "solution folder" in Visual Studio) which allows us to logically separate tests. This can be used for the "Run Test" command.

                          23 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…)
                            1 comment  ·  Admin →
                          • Inappropriate SQLCop Tests

                            There are some issues with the SQLCop tests that are included with SQL Test 1.5.
                            -"Agent Service": This should be removed from SQL Test as it is not relevant to know if the agent service is running for unit testing a database.
                            -"Compatability Level": This test inappropriately tests all databases on the server rather than just the database under test.
                            -"Instant File Initialization": This test depends on xp_cmdshell. Strangely, it returns a failure if xp_cmdshell isn't enabled. Yet - there is another test that will fail if xp_cmdshell is enabled. This is a bit odd. Since this is more of…

                            4 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…)
                            • SET NOCOUNT ON

                              The "Procedures with SET NOCOUNT ON" SQL Cop test is incompatible with the default template for a new test in SQL Test. If you create a test using the "New Test" feature, that will make the "Procedures with SET NOCOUNT ON" start to fail. You can fix this by manually adding "SET NOCOUNT ON" to the test. But if we believe that this is really important enough to have backed by a test, then SQL Test should include SET NOCOUNT ON in its new test template.

                              1 vote
                              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…)
                              • Need SetupFixture

                                In many unit test frameworks like NUnit, it is not only possible to have a routine that runs before each test, it is possible to have a one-time routine that is run before any of the tests in a given test class. In NUnit, this attribute is called SetupFixture. When one has a series of tests that they want to run against the same setup, it would be far more efficient to do this work once than to do before each test.

                                1 vote
                                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…)
                                • Add Team Coherence to your Source Control Providors

                                  I am at a company using a legacy DB(FireBird) with Team Coherence as their source control system. We are migrating features from Firebird to a modern, supported db such as SQL2012. But there are many other legacy system that we need to connect into.

                                  3 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…)
                                  • Auto hide tab

                                    The SQL Test tab will not auto hide when the set to auto hide. Please fix this

                                    5 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…)
                                      1 comment  ·  Admin →
                                    • Statistics information query

                                      When we perform heavy DMLs on tables updating statistics information becomes necessary for improved query performance. Below is the query which return no. of updated rows along with percent change in statistics so that the user can take decision on updating it.

                                      -- To check number of rows updated and percentage of change in order to clean statistics.
                                      select schemas.name as table_schema,
                                      tbls.name as table_name,
                                      i.name as index_name,
                                      i.id as table_id,
                                      i.indid as index_id,
                                      i.rowmodctr as modifiedRows,
                                      (select max(rowcnt) from sysindexes i2 where i.id = i2.id and i2.indid < 2) as rowcnt,
                                      convert(DECIMAL(18,8), convert(DECIMAL(18,8),i.rowmodctr) / convert(DECIMAL(18,8),(select max(rowcnt) from sysindexes i2…

                                      2 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…)
                                      • Creating dummy Identity

                                        create view MyView as
                                        (
                                        select row_number() over ( order by col1) as ID, col1 from (
                                        Select col1 From Table1
                                        Union All
                                        Select col1 From Table2
                                        ) a
                                        )

                                        1 vote
                                        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…)
                                        • Parsing delimited (,) string

                                          declare
                                          v_sql VARCHAR2(2000);
                                          v_pos INTEGER;
                                          v_differentiator VARCHAR2(10);
                                          v_sql_temp VARCHAR2(1000);
                                          v_pos_temp INTEGER;
                                          begin
                                          v_pos := 1;
                                          v_sql := 'a,abc,abcde,ab,sos,sooooo,oooops,posh,';
                                          v_differentiator := ',';
                                          v_sql_temp := v_sql;
                                          while (instr (v_sql,v_differentiator,v_pos) > 0 )
                                          loop
                                          v_pos_temp := instr(v_sql,v_differentiator,v_pos );
                                          v_sql_temp := substr(v_sql,v_pos,(v_pos_temp-v_pos));
                                          v_pos := v_pos_temp +1;
                                          --dbms_output.put_line (v_sql_temp);
                                          insert into temp_comma(col1) values (v_sql_temp);
                                          end loop;
                                          end;

                                          This query will help in parsing any delimited string (in above example it is using ',' as parsing delimiter. This query can be useful in many business scenarios where in we have input data as a long string containing delimited values.

                                          1 vote
                                          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…)
                                          ← Previous 1 3 4
                                          • Don't see your idea?

                                          SQL Test forum

                                          Feedback and Knowledge Base