SQL Test showing success for test that has failed.

sbendayansbendayan Posts: 18 Bronze 1
edited June 13, 2016 4:31AM in SQL Test
Greetings,

I just started using SQLTest and tSQLt. I have a test that fails when I run it from the SSMS Query Window, but it displays a green checkmark on the SQL Test UI.

This is the code of the assertion:
EXEC tSQLt.AssertEqualsTable
@Expected = 'TENANT_HUB_Expected',
@Actual = 'TENANT_HUB_Actual',
@FailMsg = 'test failed';

Here is the output in SSMS:
(1 row(s) affected)
Msg 50000, Level 16, State 10, Procedure Fail, Line 59
tSQLt.Failure

Why is this happening? Is it a bug, or am I doing something wrong?

Thanks,

SB

Comments

  • Hi,

    Which version of the tSQLt framework are you using? There is a known problem, with reference SQT-464, where the latest version of the tSQLt framework is causing some failed tests to display a green tick in the SQL Test GUI. A possible workaround is to use the version of the framework that comes with SQL Test, or to monitor the messages window for failing tests.

    Sorry for the inconvenience.
    Software Engineer
    Redgate Software
  • jbelinajbelina Posts: 9 Bronze 2
    When will this be fixed? I am getting the same results with tSQLt v1.0.5686.18945 and SQL Test v1.5.0.89
  • rbielawsrbielaws Posts: 7 New member
    I have the same problem - with the Redgate stock version.
    Moreover I just found that the stock version has problems with user defined data types.
    If this won't be fixed soon can I get my license fee back? I only got it 2 weeks ago and it was not part of a bundle!
    All the procedures in our new project will contain a user defined type (it's our security token so it can't be changed) meaning the whole framework can't be used unless I get the fixed version which, according to you makes the gui useless.
    Either way we can't use it unless we can get a fix that allows the UDT version to work correctly.
  • Hi rbielaws,

    I'm sorry to hear that you're having problems with SQL Test. I've raised a support ticket for you. You should receive an email shortly.
    Software Engineer
    Redgate Software
  • rbielawsrbielaws Posts: 7 New member
    After I didn't hear anything yesterday I talked to our sales person who opened a ticket (so I've got one already).
    A couple hours later I got a link to a 'private build' that 'so far' seems to work fine with the tSQLt version where the UDT problems are fixed.
    So all is well at the moment.
  • rbielaws wrote:
    After I didn't hear anything yesterday I talked to our sales person who opened a ticket (so I've got one already).
    A couple hours later I got a link to a 'private build' that 'so far' seems to work fine with the tSQLt version where the UDT problems are fixed.
    So all is well at the moment.

    That's great to hear! I've closed the ticket that I raised, but if you need any further help then don't hesitate to get in touch.
    Software Engineer
    Redgate Software
  • Was there a solution to this problem as I have the same issue?
  • This issue was fixed in the latest release of SQL Test (1.5.1). You can get the update by going to the Help menu in SQL Test and clicking on Check for Updates.
    Software Engineer
    Redgate Software
  • JohnJackJohnJack Posts: 3 New member
    Hi,

    I seem to be experiencing the same issue with SQL Test where SQL Test shows a Green tick for all tests whether they have failed or not.
    SQL Test messages will show the error and the unit test failing however it still has shows a green tick

    I have set a test up to be just the assertequels call with different numbers, or even using the sqlfail test however it doesn't show that the test has failed in the test list.

    I am going to be demo'ing this over the next week or so, it would be good for it to be working.

    I am using latest versions of both TsqlT and SQL test

    Warm Regards

    John
  • JohnJackJohnJack Posts: 3 New member
    Just in response to my early post,

    This issue has been resolved however the fix hasn't been applied to the latest downloadable release

    I assumed the latest version would have this fix in it, but it seems that it doesn't

    John
  • JohnJack wrote:
    Just in response to my early post,

    This issue has been resolved however the fix hasn't been applied to the latest downloadable release

    I assumed the latest version would have this fix in it, but it seems that it doesn't

    Hi John,

    I'm pleased to hear that things are now working for you.

    The latest version for download is 1.5.1.211, which contains the fix. I've just checked the product page on the website and the installer contains this version. Where were you downloading the installer from?
    Software Engineer
    Redgate Software
Sign In or Register to comment.