The tSQLt test framework requires to set TRUSTWORTHY ON for the database, and to enable SQL CLR for the server.
Why are these required? Is it possible to achieve the same/similar functionality without a CLR object?
The tSQLt test framework requires to set TRUSTWORTHY ON for the database, and to enable SQL CLR for the server.
Why are these required? Is it possible to achieve the same/similar functionality without a CLR object?
The following features are completely implemented as CLR code and would be particularly difficult (and probably impossible) to do without CLR:
Other than that, tSQLt uses the CLR internally to produce formatted output for very large strings, such as those that can be produced by comparing two tables; and for generating new object names when renaming objects (such as for FakeTable or SpyProcedure).
It is conceivable that tSQLt could be modified to remove these features and still function with its base feature set (with some limitations of course). However, as we look ahead as to what will be in future releases of tSQLt, it is very likely that there will be more done in CLR.
TRUSTWORTHY ON is no longer required. See the release notes: http://tsqlt.org/748/tsqlt-v1-0-5873-27393-release-notes/
If you want to use tSQLt, you probably don't have any option but to enable SQL CLR.
There is a way to get around the requirement to set the database as TRUSTWORTHY ON by creating an asymmetic key - see http://msdn.microsoft.com/en-us/library/ms345106.aspx.
If this isn't acceptable, there are other database unit testing tools which don't require objects to be created in the database - for example DbFit
© 2022 - 2024 — McMap. All rights reserved.