/* Choose a program to test and identify the test cases*/ CREATE OR REPLACE FUNCTION betwnstr ( string_in IN VARCHAR2 , start_in IN INTEGER , end_in IN INTEGER ) RETURN VARCHAR2 IS BEGIN return(substr( string_in , start_in , end_in - start_in + 1 ) ); END; / /* Build a test package*/ CREATE OR REPLACE PACKAGE ut_betwnstr IS PROCEDURE ut_setup; PROCEDURE ut_teardown; PROCEDURE ut_betwnstr; END ut_betwnstr; / CREATE OR REPLACE PACKAGE BODY ut_betwnstr IS PROCEDURE ut_setup IS BEGIN NULL; END; PROCEDURE ut_teardown IS BEGIN NULL; END; PROCEDURE ut_betwnstr IS BEGIN utassert.eq( 'Typical valid usage' , betwnstr( string_in => 'abcdefg' , start_in => 3 , end_in => 5 ) , 'cde' ); END; END ut_betwnstr; / -- Run your test exec utplsql.test ('betwnstr', recompile_in => FALSE) -- Migration 2 -> 3 -- Check für registrierte Tests (mdst. einmal ausgeführt) select * from ut_package / select * from ut_suite / select * from ut_config / -- call as sys grant create any procedure to hr / set serveroutput on begin ut_v2_migration.dry_run_all; end; / begin ut_v2_migration.run_all; end; / -- Run your test exec utplsql.test ('betwnstr', recompile_in => FALSE) BEGIN ut.run('betwnstr'); END; /