SQLTest view not showing existing tests

MCGMCG Posts: 2 New member
I previously installed SQLTest and tSQLt on a SQL Server instance and SQLTest was working fine.  Its been several months and going back to this project.  When I open SQLTest it no longer shows the list of defined tests or even SQLCop tests.  The database objects are all there and I can run them manually in SSMS and they seem to work.  What does the SQL Test product require to find and show the tests? Why might SQL Test no longer show the defined tests?

Best Answer

  • MCGMCG Posts: 2 New member
    I did a compare between source control and the database and found some 'tSQLt.TestClass' extended properties on the test class schemas were accidentally removed. I added them back and after restarting SSMS, SQLTest is showing all the tests again.  

    To list extended properties on all schemas:
    SELECT * FROM fn_listextendedproperty(default, 'schema', NULL, default, default, default, default);

    To re-add the extended property needed for SQLTest:
    EXECUTE sp_addextendedproperty @name = N'tSQLt.TestClass', @value = 1, @level0type = N'SCHEMA', @level0name = N'<name of your test class>';
Sign In or Register to comment.