SQL Test showing success for test that has failed.
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
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
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.
Redgate Software
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.
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.
Redgate Software
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.
Redgate Software
Redgate Software
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
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
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?
Redgate Software