There are many different ways to run Unit Tests.

  • When using unit test runners, DBTestDriven framework will analyze the Unit Test code for a presence of the DBTD_IGNORE hint procedure, and addition framework runners will scan unit test suite SETUP and TEARDOWN procedures 
    • IGNORE UNIT TEST:
      if found anywhere in the body of the unit test the execution of this unit test will be ignored by a framework, the execution status will be set to IGNORED and appropriate message will be saved in the DBTD_TBL_TESTRESULT table;
    • IGNORE UNIT TEST SUITE:
      if found within suite setup or teardown procedures the execution of an entire unit test suite will be ignored by a framework, the execution status fot each unit test within the unit test suite will be set to IGNORED and appropriate message will be saved for each unit test in a suite in the DBTD_TBL_TESTRESULT table;
    • CONDITIONAL IGNORE:
      when hint procedure is not found in the unit test code nor does it found in the code of the setup and teardown procedures, framework will attempt to execute a given unit test. However if any other procedure, that were called within the unit test stack, will execute the DBTD_IGNORE hint procedure then this unit test will be ignored by a framework, the execution status will be set to IGNORED and appropriate message will be saved in the DBTD_TBL_TESTRESULT table; This functionality provides an ability to implement conditional ignoring.
  • When ignored unit test executed manually, then ignored unit test will be executed and will call DBTD_IGNORE hint procedure. The hint procedure will save an ignore message into the DBTD_TBL_LOG table, however the DBTD_TBL_TESTRESULT table will not be updated;
     

Arguments

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

 

Examples

SQL Server

      EXEC DBTD_IGNORE ‘This test is ignored because we rolled back business logic to it original implementation’;

Oracle

      DBTD_IGNORE (‘This test is ignored because we rolled back business logic to it original implementation’);

Netezza

      CALL DBTD_IGNORE (‘This test is ignored because we rolled back business logic to it original implementation’);

See Also