This project provides a migration utility to enrich utPLSQL v2 package specification with utPLSQL v3 annotations
Download latest release from this location:
https://github.com/utPLSQL/utPLSQL-v2-v3-migration/releases/latest
SYS
account or as SYSDBA
as utPLSQL v3 user needs to be granted execute privilege on UTL_FILE
.
This is required for installing utPLSQL v2 compatibility within utPLSQL v3.Migration utility contains the following components:
ut_v2_migration
utassert
package from utPLSQL version 2.3.1utassert2
package from utPLSQL version 2.3.1All of above components are installed into utPLSQL v3 schema, have public synonyms created and are granted to public.
Navigate to source
directory and execute install.sql
script using SQLPlus
or sqlcl
as in the example below.
cd source
sqlplus sys/oracle@xe as sysdba @install utp ut3
The install script does the following:
utassert
and utassert2
ut_v2_migration
, utassert
, utassert2
into utPLSQL v3 schemautassert
and utassert2
in utPLSQL v3 schema ut_v2_migration
, utassert
, utassert2
to PUBLICThe migration process scans utPLSQL v2 meta-data tables:
In order to be considered by migration process, Unit Test package needs to:
ut_package
table - this can be done either by manually registering a package or by executing test package using utPLSQL v2 frameworkUser executing the migration needs to:
create any procedure
system privilege The migration process is designed, so that after migration, you can invoke the unit tests using both:
Once migration packages were installed, you can either test or execute migration of utPLSQL v2 packages.
You may want to execute a dry-run of migration prior to running actual process on your database. The dry-run will output results of migration to dbms_output.
There are several ways to invoke the dry-run:
set serveroutput on
begin
ut_v2_migration.dry_run_all;
end;
/
set serveroutput on
begin
ut_v2_migration.dry_run(a_owner => 'XYZ');
end;
/
set serveroutput on
begin
ut_v2_migration.dry_run_for_suite(a_suite_name => 'XYZ');
end;
/
set serveroutput on
begin
ut_v2_migration.dry_run(a_owner => 'XYZ', a_package => 'ABC');
end;
/
set serveroutput on
begin
ut_v2_migration.run_all;
end;
/
set serveroutput on
begin
ut_v2_migration.run(a_owner => 'XYZ');
end;
/
set serveroutput on
begin
ut_v2_migration.run_for_suite(a_suite_name => 'XYZ');
end;
/
set serveroutput on
begin
ut_v2_migration.run(a_owner => 'XYZ', a_package => 'ABC');
end;
/