When this hint procedure found anywhere in the body of the stored procedure, such stored procedure will be skipped by framework and will not be considered as a Unit Test. 

Note: If you want to simply ignore unit test until conditions will be favorable to turn it back on, use DBTD_IGNORE hint instead.

Note: In cases when stored procedure containing named using legacy naming convention "UT_SuiteName_TestName" or contains reference to DBTD_UNIT_TEST hint procedure, while at the same time calls the DBTD_NOT_A_UNIT_TEST logic, marking such routine as 'Not a Unit Test' will take precedence and will signal framework to skip such procedure.

Arguments

  • v_Message –  user message, Variable Characters (4000). Optional parameter, default value 'This is not a unit test'. SQL Server version uses NVARCHAR(MAX) data type.

 

Examples

SQL Server

CREATE PROCEDURE UT_HELPERS_RunAJob
AS
BEGIN
    --this is stored procedure that looks like unit tests but in fact it is not
    EXEC DBTD_NOT_A_UNIT_TEST;

    --some logic below
END;
GO

 

See Also