utPLSQL / utPLSQL-v2-v3-migration

utPLSQL v2 to utPLSQL v3 migration utilty and bridge for using utPLSQL v3 framework with utPLSQL v2 Unit Tests
Apache License 2.0
2 stars 1 forks source link
migration utplsql

build sonar

utPLSQL v2 to v3 migration utility

This project provides a migration utility to enrich utPLSQL v2 package specification with utPLSQL v3 annotations

Download

Download latest release from this location:

https://github.com/utPLSQL/utPLSQL-v2-v3-migration/releases/latest

Requirements

Content

Migration utility contains the following components:

All of above components are installed into utPLSQL v3 schema, have public synonyms created and are granted to public.

Installation

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:

Migration process

Requirements

The migration process scans utPLSQL v2 meta-data tables:

In order to be considered by migration process, Unit Test package needs to:

User executing the migration needs to:

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.

Testing migration

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;
/

Executing migration

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;
/