This is an extended version of the DBTD_RUNTESTSUITE procedure, it run all unit tests for a given test suite, and allows user reload test information and run global setup and teardown for this individual suite.

Arguments

  • v_SuiteName - Suite Name, Variable character (128).
  • v_SuiteOwner - Suite Owner, Variable character (128). Required: Oracle. Optional: Netezza, QSL Server.
  • v_ReloadTestsList - Refresh list of available tests. Oracle uses Y(true) and N(false), Netezza TRUE and FALSE, SQL Server 0(false) and 1(true);
  • v_RunGlobalSetupTeardown - Run global setup and teardown for given test suite. Oracle uses Y(true) and N(false), Netezza TRUE and FALSE, SQL Server 0(false) and 1(true);
  • v_UseTransaction   - wraps each individual unit test execution in to a transaction. Default is 0. SQL Server only feature.  

 

Transaction support

  • Transactions are supported in Oracle and SQL Server versions of the framework, Netezza does not support transactions at this time. 
  • When v_UseTransaction flag is set to 1 test runner will wrap each individual Unit Test into a transaction, and will rollback any changes made by the test after execution. When v_UseTransaction flag is set to 0 (default value) runner will not use transactions. This behavior can be overwritten by DBTD_USE_TRANSACTION and DBTD_DO_NOT_USE_TRANSACTION hint procedures.
  • When transaction is used, test runner does not execute teardown functionality instead it assumes that transaction will clean up all the changes.
  • Using transaction feature can be impacted by user’s code and might interfere with transaction logic codded in your scripts. If you run in to situations like this try to test your code without transaction enforcement until you are satisfied, and then try to turn transactions on again.

 

Examples

SQL Server

      EXEC DBTD_RUNTESTSUITE_EXT 'BusinessRequiremensts', NULL, 1, 1;

Oracle

      DBTD_RUNTESTSUITE_EXT ('BusinessRequiremensts', 'developer1', 'Y', 'Y');

Netezza

      CALL DBTD_RUNTESTSUITE_EXT ('BusinessRequiremensts', 'developer1', TRUE, 'FALSE');

 

See Also