diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c54bff550..4cd72f51c 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -23,4 +23,4 @@ Add any other context or screenshots about the feature request here. > Please do not create issues for generic SQL or PL/SQL questions. There are other forums and communities to help you with those. See [ASKTom](https://asktom.oracle.com) for example. **Want to discuss** -If you want to discuss your issue, join [our SLACK chat](http://utplsql-slack-invite.herokuapp.com/). +If you want to discuss your issue, join [our SLACK chat](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA). diff --git a/.travis.yml b/.travis.yml index 018038144..cd1e8efe0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ sudo: required language: python +os: linux + +jdk: openjdk10 addons: - apt: - packages: - - unzip - # Java9+ Required for Sonar and SQLCL - - openjdk-9-jre-headless sonarcloud: organization: utplsql token: ${SONAR_TOKEN} @@ -16,16 +14,26 @@ services: env: global: - - UT3_OWNER=ut3 - - UT3_OWNER_PASSWORD=ut3 - - UT3_RELEASE_VERSION_SCHEMA=UT3_LATEST_RELEASE + - UT3_DEVELOP_SCHEMA=UT3_DEVELOP + - UT3_DEVELOP_SCHEMA_PASSWORD=ut3 + - UT3_RELEASE_VERSION_SCHEMA=UT3 + - UT3_RELEASE_VERSION_SCHEMA_PASSWORD=ut3 - UT3_USER="UT3\$USER#" - UT3_USER_PASSWORD=ut3 - - UT3_TESTER=ut3_tester + - UT3_TESTER=UT3_TESTER - UT3_TESTER_PASSWORD=ut3 - - UT3_TESTER_HELPER=ut3_tester_helper + - UT3_TESTER_HELPER=UT3_TESTER_HELPER - UT3_TESTER_HELPER_PASSWORD=ut3 - UT3_TABLESPACE=users + - BUILD_DIR=${TRAVIS_BUILD_DIR} + - JOB_ID=${TRAVIS_JOB_ID} + - JOB_NUMBER=${TRAVIS_JOB_NUMBER} + - PULL_REQUEST_NAME=${TRAVIS_PULL_REQUEST} + - PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH} + - TAG_NAME=${TRAVIS_TAG} + - REPO_SLUG=${TRAVIS_REPO_SLUG} + - PR_SLUG=${TRAVIS_PULL_REQUEST_SLUG} + - BRANCH_NAME=${TRAVIS_BRANCH} # Environment for building a release - CURRENT_BRANCH=${TRAVIS_BRANCH} - UTPLSQL_REPO="utPLSQL/utPLSQL" @@ -36,11 +44,12 @@ env: - UTPLSQL_BUILD_USER_NAME="Travis CI" - CACHE_DIR=$HOME/.cache # Database Env - - SQLCLI="$HOME/sqlcl/bin/sql" - - OJDBC_HOME="$HOME/sqlcl/lib" + - SQLCLI="${BUILD_DIR}/sqlcl/bin/sql" + - OJDBC_HOME="${BUILD_DIR}/ojdbc" - ORACLE_PWD="oracle" - - UT3_DOCKER_REPO="utplsqlv3/oracledb" - - DOCKHER_HUB_REPO="${DOCKER_BASE_TAG:-$UT3_DOCKER_REPO}" + - DOCKHER_HUB_REPO="utplsqlv3/oracledb" + - DOCKER_VOLUME="/home/oracle/host" + - DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_DEVELOP_SCHEMA -e UT3_DEVELOP_SCHEMA_PASSWORD -e UT3_RELEASE_VERSION_SCHEMA -e UT3_RELEASE_VERSION_SCHEMA_PASSWORD -e UT3_USER -e UT3_USER_PASSWORD -e UT3_TESTER -e UT3_TESTER_PASSWORD -e UT3_TESTER_HELPER -e UT3_TESTER_HELPER_PASSWORD -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR" #utPLSQL released version directory - UTPLSQL_DIR="utPLSQL_latest_release" - SELFTESTING_BRANCH=${TRAVIS_BRANCH} @@ -48,12 +57,15 @@ env: # Maven - MAVEN_HOME=/usr/local/maven - MAVEN_CFG=$HOME/.m2 - matrix: - - ORACLE_VERSION="${DOCKER_TAG_11G:-11g-r2-xe}" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g' - - ORACLE_VERSION="${DOCKER_TAG_12C:-12c-r1-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' - - ORACLE_VERSION="${DOCKER_TAG_12C2:-12c-r2-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' - - ORACLE_VERSION="${DOCKER_TAG_18:-18c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' - - ORACLE_VERSION="${DOCKER_TAG_19:-19c-se2-small}" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' + jobs: + - ORACLE_VERSION="11g-r2-xe" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_VOLUME="/mnt/host" DOCKER_OPTIONS='--shm-size=1g' +# - ORACLE_VERSION="11-full" CONNECTION_STR='127.0.0.1:1521/XE' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle --shm-size=1g' DOCKER_VOLUME="/mnt/host" + - ORACLE_VERSION="12c-r1-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' + - ORACLE_VERSION="12c-r2-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' + - ORACLE_VERSION="18-slim" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle' + - ORACLE_VERSION="18c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' + - ORACLE_VERSION="19c-se2-small" CONNECTION_STR='127.0.0.1:1521/ORCLCDB' + - ORACLE_VERSION="21-full" CONNECTION_STR='127.0.0.1:1521/XEPDB1' DOCKHER_HUB_REPO="gvenzl/oracle-xe" DOCKER_OPTIONS='-e ORACLE_PASSWORD=oracle' cache: pip: true @@ -64,6 +76,7 @@ cache: - $MAVEN_CFG before_install: + #cache to be used between stages. Based on https://github.com/travis-ci/docs-travis-ci-com/issues/1329 #delete all files in cache that are older than 5 days - mkdir -p $CACHE_DIR/stages_cache; find $CACHE_DIR/stages_cache/ -mtime +5 -exec rm {} \; @@ -72,24 +85,29 @@ before_install: #Allow for sonar to blame issues - git fetch --unshallow # download latest utPLSQL release - #- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g') - - git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR + - git clone --depth=1 --branch=${SELFTESTING_BRANCH:-main} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR # download latest utPLSQL-cli release - curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/download/v${UTPLSQL_CLI_VERSION}/utPLSQL-cli.zip install: - #- unzip utPLSQL.zip - unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli - - bash .travis/install_sqlcl.sh +# - curl -Lk -o sqlcl-latest.zip https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip +# - unzip -q sqlcl-latest.zip -d $HOME + - mkdir -p ${OJDBC_HOME} #get JDBC driver and orai18n + - curl -Lk -o ${OJDBC_HOME}/ojdbc8.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/ojdbc8.jar + - curl -Lk -o ${OJDBC_HOME}/orai18n.jar https://download.oracle.com/otn-pub/otn_software/jdbc/213/orai18n.jar + # Chmod is needed to allow for write access within from docker container volume + - chmod -R go+w ./{source,test,examples,${UTPLSQL_DIR}/source} - if [[ ! $TRAVIS_TAG ]]; then bash .travis/start_db.sh; fi + - if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install.sh; fi + - if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/install_utplsql_release.sh; fi before_script: - - if [[ ! $TRAVIS_TAG ]]; then bash .travis/install.sh; fi - - if [[ ! $TRAVIS_TAG ]]; then bash .travis/install_utplsql_release.sh; fi - - if [[ ! $TRAVIS_TAG ]]; then bash .travis/run_examples.sh; fi + - if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/.travis/run_examples.sh; fi + - if [[ ! $TRAVIS_TAG ]]; then docker exec ${ORACLE_VERSION} ${DOCKER_VOLUME}/test/install_tests.sh; fi script: - - if [[ ! $TRAVIS_TAG ]]; then bash test/install_and_run_tests.sh; fi + - if [[ ! $TRAVIS_TAG ]]; then bash test/run_tests.sh; fi - if [[ ! $TRAVIS_TAG ]]; then bash .travis/validate_report_files.sh; fi - if [[ ! $TRAVIS_TAG ]] && [[ ("${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" && "${TRAVIS_PULL_REQUEST}" == false) || ("${TRAVIS_PULL_REQUEST_SLUG}" = "${UTPLSQL_REPO}") ]]; then bash .travis/run_sonar_scanner.sh; fi - if [[ ! $TRAVIS_TAG ]]; then bash .travis/coveralls_uploader.sh; fi diff --git a/.travis/coveralls_uploader.js b/.travis/coveralls_uploader.js index ad6eeee74..182f84066 100644 --- a/.travis/coveralls_uploader.js +++ b/.travis/coveralls_uploader.js @@ -14,7 +14,7 @@ fs.readFile('../coverage.json',function (err,data) { return console.log(err); } req = JSON.parse(data); - req.service_job_id = process.env.TRAVIS_JOB_ID; + req.service_job_id = process.env.JOB_ID; req.service_name = 'travis-ci'; if (process.env.COVERALLS_REPO_TOKEN) { req.repo_token = process.env.COVERALLS_REPO_TOKEN; diff --git a/.travis/install.sh b/.travis/install.sh index 2e96ebfb2..603cb7d1e 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,7 +1,13 @@ #!/bin/bash -cd source set -ev +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd ${SCRIPT_DIR}/../source + +INSTALL_FILE="install_headless_with_trigger.sql" +if [[ ! -f "${INSTALL_FILE}" ]]; then + INSTALL_FILE="install_headless.sql" +fi #install core of utplsql time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL @@ -11,14 +17,14 @@ set verify off --alter session set plsql_warnings = 'ENABLE:ALL', 'DISABLE:(5004,5018,6000,6001,6003,6009,6010,7206)'; alter session set plsql_optimize_level=0; -@install_headless_with_trigger.sql $UT3_OWNER $UT3_OWNER_PASSWORD +@${INSTALL_FILE} $UT3_DEVELOP_SCHEMA $UT3_DEVELOP_SCHEMA_PASSWORD SQL #Run this step only on second child job (12.1 - at it's fastest) -if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then +if [[ "${JOB_NUMBER}" =~ \.2$ ]]; then #check code-style for errors - time "$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql + time "$SQLCLI" $UT3_DEVELOP_SCHEMA/$UT3_DEVELOP_SCHEMA_PASSWORD@//$CONNECTION_STR @../development/utplsql_style_check.sql #test install/uninstall process time "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL @@ -26,7 +32,7 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then set verify off whenever sqlerror exit failure rollback - @uninstall_all.sql $UT3_OWNER + @uninstall_all.sql $UT3_DEVELOP_SCHEMA whenever sqlerror exit failure rollback declare v_leftover_objects_count integer; @@ -34,10 +40,10 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then select sum(cnt) into v_leftover_objects_count from ( - select count(1) cnt from dba_objects where owner = '$UT3_OWNER' + select count(1) cnt from dba_objects where owner = '$UT3_DEVELOP_SCHEMA' where object_name not like 'PLSQL_PROFILER%' and object_name not like 'DBMSPCC_%' union all - select count(1) cnt from dba_synonyms where table_owner = '$UT3_OWNER' + select count(1) cnt from dba_synonyms where table_owner = '$UT3_DEVELOP_SCHEMA' where table_name not like 'PLSQL_PROFILER%' and table_name not like 'DBMSPCC_%' ); if v_leftover_objects_count > 0 then @@ -52,9 +58,9 @@ SQL set verify off alter session set plsql_optimize_level=0; - @install.sql $UT3_OWNER - @install_ddl_trigger.sql $UT3_OWNER - @create_synonyms_and_grants_for_public.sql $UT3_OWNER + @install.sql $UT3_DEVELOP_SCHEMA + @install_ddl_trigger.sql $UT3_DEVELOP_SCHEMA + @create_synonyms_and_grants_for_public.sql $UT3_DEVELOP_SCHEMA SQL fi @@ -65,8 +71,8 @@ set feedback off whenever sqlerror exit failure rollback -------------------------------------------------------------------------------- -PROMPT Adding back create-trigger privilege to $UT3_OWNER for testing -grant administer database trigger to $UT3_OWNER; +PROMPT Adding back create-trigger privilege to $UT3_DEVELOP_SCHEMA for testing +grant administer database trigger to $UT3_DEVELOP_SCHEMA; -------------------------------------------------------------------------------- PROMPT Creating $UT3_TESTER - Power-user for testing internal framework code @@ -76,27 +82,27 @@ grant create session, create procedure, create type, create table to $UT3_TESTER grant execute on dbms_lock to $UT3_TESTER; -PROMPT Granting $UT3_OWNER code to $UT3_TESTER +PROMPT Granting $UT3_DEVELOP_SCHEMA code to $UT3_TESTER begin for i in ( select object_name from all_objects t where t.object_type in ('PACKAGE','TYPE') - and owner = 'UT3' + and owner = '$UT3_DEVELOP_SCHEMA' and generated = 'N' and object_name not like 'SYS%') loop - execute immediate 'grant execute on ut3."'||i.object_name||'" to UT3_TESTER'; + execute immediate 'grant execute on $UT3_DEVELOP_SCHEMA."'||i.object_name||'" to $UT3_TESTER'; end loop; end; / -PROMPT Granting $UT3_OWNER tables to $UT3_TESTER +PROMPT Granting $UT3_DEVELOP_SCHEMA tables to $UT3_TESTER begin - for i in ( select table_name from all_tables t where owner = 'UT3' and nested = 'NO' and iot_name is null) + for i in ( select table_name from all_tables t where owner = '$UT3_DEVELOP_SCHEMA' and nested = 'NO' and iot_name is null) loop - execute immediate 'grant select on UT3.'||i.table_name||' to UT3_TESTER'; + execute immediate 'grant select on $UT3_DEVELOP_SCHEMA.'||i.table_name||' to $UT3_TESTER'; end loop; end; / @@ -108,6 +114,25 @@ PROMPT Creating $UT3_USER - minimal privileges user for API testing create user $UT3_USER identified by "$UT3_USER_PASSWORD" default tablespace $UT3_TABLESPACE quota unlimited on $UT3_TABLESPACE; grant create session, create procedure, create type, create table to $UT3_USER; +PROMPT Grants for starting a debugging session from $UT3_USER +grant debug connect session to $UT3_USER; +grant debug any procedure to $UT3_USER; +begin + \$if dbms_db_version.version <= 11 \$then + null; -- no addition action necessary + \$else + -- necessary on 12c or higher + dbms_network_acl_admin.append_host_ace ( + host =>'*', + ace => sys.xs\$ace_type( + privilege_list => sys.xs\$name_list('JDWP') , + principal_name => '$UT3_USER', + principal_type => sys.xs_acl.ptype_db + ) + ); + \$end +end; +/ -------------------------------------------------------------------------------- PROMPT Creating $UT3_TESTER_HELPER - provides functions to allow min grant test user setup tests. @@ -119,11 +144,11 @@ PROMPT Grants for testing distributed transactions grant create public database link to $UT3_TESTER_HELPER; grant drop public database link to $UT3_TESTER_HELPER; -PROMPT Grants for testing coverage outside of main UT3 schema. +PROMPT Grants for testing coverage outside of main $UT3_DEVELOP_SCHEMA schema. grant create any procedure, drop any procedure, execute any procedure, create any type, drop any type, execute any type, under any type, select any table, update any table, insert any table, delete any table, create any table, drop any table, alter any table, select any dictionary, create any synonym, drop any synonym, - grant any object privilege, grant any privilege + grant any object privilege, grant any privilege, create public synonym, drop public synonym, create any trigger to $UT3_TESTER_HELPER; grant create job to $UT3_TESTER_HELPER; diff --git a/.travis/install_sqlcl.sh b/.travis/install_sqlcl.sh deleted file mode 100755 index 9743ddac2..000000000 --- a/.travis/install_sqlcl.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -e - -SQLCL_FILE=sqlcl-18.3.0.259.2029.zip -cd .travis - -# Download if not present on cache dir. -if [ ! -f $CACHE_DIR/$SQLCL_FILE ]; then - npm install -g phantomjs-prebuilt casperjs - bash download.sh -p sqlcl - mv $SQLCL_FILE $CACHE_DIR -else - echo "Installing sqlcl from cache..." -fi; - -# Install sqlcl. -unzip -q $CACHE_DIR/$SQLCL_FILE -d $HOME - -# Check if it is installed correctly. -$SQLCLI -v diff --git a/.travis/install_utplsql_release.sh b/.travis/install_utplsql_release.sh index 3e608b08f..fea162f8f 100755 --- a/.travis/install_utplsql_release.sh +++ b/.travis/install_utplsql_release.sh @@ -1,8 +1,8 @@ #!/bin/bash set -ev - -cd $UTPLSQL_DIR/source +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd ${SCRIPT_DIR}/../${UTPLSQL_DIR}/source "$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <>index.md fi #If build running on a TAG - it's a new release - need to add it to documentation - if [ -n "${TRAVIS_TAG}" ]; then - sed -i '7s@.*@'" - [Latest ${TRAVIS_TAG} documentation](latest/) - Created $now"'@' index.md + if [ -n "${TAG_NAME}" ]; then + sed -i '7s@.*@'" - [Latest ${TAG_NAME} documentation](latest/) - Created $now"'@' index.md #add entry to the top of version history (line end of file - ## Released Version Doc History - sed -i '12i'" - [${TRAVIS_TAG} documentation](${UTPLSQL_VERSION}/) - Created $now" index.md + sed -i '12i'" - [${TAG_NAME} documentation](${UTPLSQL_VERSION}/) - Created $now" index.md fi #replace 4th line in log sed -i '8s@.*@'" - [Latest development version](develop/) - Created $now"'@' index.md diff --git a/.travis/push_release_version.sh b/.travis/push_release_version.sh index 082359af4..f4ca8f819 100755 --- a/.travis/push_release_version.sh +++ b/.travis/push_release_version.sh @@ -3,7 +3,7 @@ # We are updating version number only when: # - not a pull request # - branch name is = develop or branch name is like release/vX.X.X... -if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [[ "${CURRENT_BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|develop)$ ]]; then +if [ "${REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "${PULL_REQUEST_NAME}" == "false" ] && [[ "${CURRENT_BRANCH}" =~ ^(release/v[0-9]+\.[0-9]+\.[0-9]+.*|develop)$ ]]; then echo Current branch is "${CURRENT_BRANCH}" echo "Committing version & buildNo into branch (${CURRENT_BRANCH})" git add sonar-project.properties @@ -14,5 +14,5 @@ if [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == echo "Pushing to origin" git push --quiet origin HEAD:${CURRENT_BRANCH} else - echo "Publishing of version skipped for branch ${CURRENT_BRANCH}, pull request ${TRAVIS_PULL_REQUEST}" + echo "Publishing of version skipped for branch ${CURRENT_BRANCH}, pull request ${PULL_REQUEST_NAME}" fi diff --git a/.travis/run_examples.sh b/.travis/run_examples.sh index 967b621c7..8eb3d097f 100755 --- a/.travis/run_examples.sh +++ b/.travis/run_examples.sh @@ -1,14 +1,13 @@ #!/bin/bash set -ev +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd ${SCRIPT_DIR}/../examples -"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR <> sonar-project.properties - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + if [ "${PULL_REQUEST_NAME}" == "false" ]; then echo "Updating sonar properties to include branch ${BRANCH}" add_sonar_property "${BRANCH_SONAR_PROPERTY}" "${BRANCH}" add_sonar_property "${BRANCH_SONAR_TARGET_PROPERTY}" "${MAIN_DEV_BRANCH}" - elif [ "${TRAVIS_PULL_REQUEST_SLUG}" = "${TRAVIS_REPO_SLUG}" ]; then + elif [ "${PR_SLUG}" = "${REPO_SLUG}" ]; then echo "Updating sonar properties to include pull request ${BRANCH}" add_sonar_property "${PR_SONAR_TOKEN_PROPERTY}" "${GITHUB_TRAVISCI_TOKEN}" add_sonar_property "${PR_SONAR_BRANCH_PROPERTY}" "${BRANCH}" diff --git a/.travis/start_db.sh b/.travis/start_db.sh index e42656987..285f8172f 100755 --- a/.travis/start_db.sh +++ b/.travis/start_db.sh @@ -10,9 +10,6 @@ else mkdir -p $HOME/.docker && cp $CACHE_DIR/.docker/config.json $HOME/.docker/ fi -df -h time docker pull $DOCKHER_HUB_REPO:$ORACLE_VERSION -df -h -docker run -d --name $ORACLE_VERSION $DOCKER_OPTIONS -p 1521:1521 $DOCKHER_HUB_REPO:$ORACLE_VERSION +docker run -d --name $ORACLE_VERSION --mount type=bind,source=${BUILD_DIR},target=${DOCKER_VOLUME} $DOCKER_OPTIONS $DOCKER_ENV -p 1521:1521 $DOCKHER_HUB_REPO:$ORACLE_VERSION time docker logs -f $ORACLE_VERSION | grep -m 1 "DATABASE IS READY TO USE!" --line-buffered -df -h diff --git a/.travis/trigger_travis.sh b/.travis/trigger_travis.sh index 039b00bbb..10083dd89 100755 --- a/.travis/trigger_travis.sh +++ b/.travis/trigger_travis.sh @@ -15,7 +15,7 @@ echoerr() { echo "$@" 1>&2; } -TRAVIS_URL=travis-ci.org +TRAVIS_URL=travis-ci.com BRANCH=develop USER="utPLSQL" RESULT=1 diff --git a/.travis/validate_report_files.sh b/.travis/validate_report_files.sh index 621297a0b..7c7d1354d 100755 --- a/.travis/validate_report_files.sh +++ b/.travis/validate_report_files.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash GL_VALID=1 -XSD_DIR="$TRAVIS_BUILD_DIR/.travis/xsd" -XML_JAR_DIR="$TRAVIS_BUILD_DIR/.travis/lib" +XSD_DIR="$BUILD_DIR/.travis/xsd" +XML_JAR_DIR="$BUILD_DIR/.travis/lib" #XML Validator XML_VALIDATOR="$XML_JAR_DIR/xml_validator.jar" HTML_VALIDATOR_URL="https://validator.w3.org/nu/" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e4e8fe7c..a65b7b685 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,10 +43,11 @@ Your local environment can be of any flavor (Unix/Linux/Windows/Mac). At minimum you need to have Oracle database 11.2 XE accessible for the project and SYS account access to install and develop utPLSQL. We use four different database accounts (users) for development process. -* `ut3_latest_release` - holds latest released version of utPLSQL. This schema holds the testing framework used for self-testing of utPLSQL development. -* `ut3` - holds the version of utPLSQL of your current branch. This is the schema you will be working on. +* `ut3` - holds latest released version of utPLSQL. This schema holds the testing framework used for self-testing of utPLSQL development. +* `ut3_develop` - holds the version of utPLSQL of your current branch. This is the schema you will be working on. * `ut3_tester` - holds unit test packages for development of utPLSQL. * `ut3$user#` - used for testing accessibility to schema names with special characters. +* `ut3_tester_helper` - elevated privileges user, used for creating and dropping objects in other schemas during test run. @@ -89,12 +90,6 @@ export CONNECTION_STR=127.0.0.1:1521/xe # Adjust the connect string export ORACLE_PWD=oracle # Adjust your local SYS password ``` -### Download Oracle JDBC drivers - -Download `ojdbc8-xxx.jar` and `orai18n-xxx.jar` from [Oracle](https://www.oracle.com/technetwork/database/features/jdbc/jdbc-ucp-122-3110062.html). -Place them in `development` directory of the project. - - ### Download utPLSQL release sources and utplsq-cli The below script is fetching latest release version from utPLSQL repository. Latest release version is used for self-testing. @@ -112,7 +107,7 @@ development/install.sh You now have the following: - sources from `develop` branch of your fork of utPLSQL repository in `utPLSQL/ut3_latest_release` directory -- sources from `master` branch of utPLSQL/utPLSQL repository in `utPLSQL/ut3_latest_release` directory +- sources from `main` branch of utPLSQL/utPLSQL repository in `utPLSQL/ut3_latest_release` directory - binaries of `utplsql-cli` in `utPLSQL/utPLSQL-cli` directory - database users created - your current branch of utPLSQL deployed into `ut3` schema diff --git a/VERSION b/VERSION index 04c455c73..021c7c624 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.1.10 +v3.1.11 diff --git a/development/cleanup.sh b/development/cleanup.sh index 4df1e43f5..c13ddb4aa 100755 --- a/development/cleanup.sh +++ b/development/cleanup.sh @@ -10,7 +10,7 @@ set echo on begin for x in ( select * from dba_objects - where owner in ( upper('${UT3_RELEASE_VERSION_SCHEMA}'), upper('${UT3_OWNER}') ) + where owner in ( upper('${UT3_RELEASE_VERSION_SCHEMA}'), upper('${UT3_DEVELOP_SCHEMA}') ) and object_name like 'SYS_PLSQL%') loop execute immediate 'drop type '||x.owner||'.'||x.object_name||' force'; @@ -18,7 +18,7 @@ begin end; / -drop user ${UT3_OWNER} cascade; +drop user ${UT3_DEVELOP_SCHEMA} cascade; drop user ${UT3_RELEASE_VERSION_SCHEMA} cascade; drop user ${UT3_TESTER} cascade; drop user ${UT3_TESTER_HELPER} cascade; diff --git a/development/install.sh b/development/install.sh index 4104e2672..ff112392f 100755 --- a/development/install.sh +++ b/development/install.sh @@ -11,7 +11,7 @@ if ! development/cleanup.sh; then exit 1 fi if ! .travis/install.sh; then - echo -e ${header}"\nFailed to install utPLSQL from current branch into ${UT3_OWNER} schema\n"${header} + echo -e ${header}"\nFailed to install utPLSQL from current branch into ${UT3_DEVELOP_SCHEMA} schema\n"${header} exit 1 fi if ! .travis/install_utplsql_release.sh; then diff --git a/development/refresh_sources.sh b/development/refresh_sources.sh index 9474c3553..7af3aaec0 100755 --- a/development/refresh_sources.sh +++ b/development/refresh_sources.sh @@ -5,10 +5,10 @@ git rev-parse && cd "$(git rev-parse --show-cdup)" . development/env.sh -# remove sub-direcotry containing master branch shallow copy +# remove sub-direcotry containing main branch shallow copy rm -rf ${UTPLSQL_DIR:-utPLSQL_latest_release} -# clone utPLSQL master branch from upstream into utPLSQL sub-directory of your project -git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git ${UTPLSQL_DIR:-utPLSQL_latest_release} +# clone utPLSQL main branch from upstream into utPLSQL sub-directory of your project +git clone --depth=1 --branch=${SELFTESTING_BRANCH:-main} https://github.com/utPLSQL/utPLSQL.git ${UTPLSQL_DIR:-utPLSQL_latest_release} rm -rf utPLSQL-cli/* # download latest release version of utPLSQL-cli @@ -16,4 +16,3 @@ curl -Lk -o utPLSQL-cli.zip https://github.com/utPLSQL/utPLSQL-cli/releases/down # unzip utPLSQL-cli and remove the zip file unzip utPLSQL-cli.zip && chmod u+x utPLSQL-cli/bin/utplsql && rm utPLSQL-cli.zip -cp development/*.jar utPLSQL-cli/lib/ diff --git a/development/refresh_ut3.sh b/development/refresh_ut3.sh index 542f5a01c..570d3c86a 100755 --- a/development/refresh_ut3.sh +++ b/development/refresh_ut3.sh @@ -8,7 +8,7 @@ git rev-parse && cd "$(git rev-parse --show-cdup)" cd source "${SQLCLI}" sys/${ORACLE_PWD}@//${CONNECTION_STR} AS SYSDBA <<-SQL -@uninstall ${UT3_OWNER} -@install ${UT3_OWNER} +@uninstall ${UT3_DEVELOP_SCHEMA} +@install ${UT3_DEVELOP_SCHEMA} exit SQL diff --git a/development/releasing.md b/development/releasing.md index 93634018d..f85e18c3c 100644 --- a/development/releasing.md +++ b/development/releasing.md @@ -8,19 +8,19 @@ This step is performed, to confirm that the update of versions works properly. - create release branch from development branch and make sure to name the release branch: `release/vX.Y.Z` - update, commit and push at least one file change in the release branch, to kickoff a Travis build - wait for th build to complete successfully - - merge the release branch to master and wait for master build to complete successfully (do not use Squash/rebase for merge operation) - - create a Github release from the master branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests since previous release. + - merge the release branch to main and wait for main build to complete successfully (do not use Squash/rebase for merge operation) + - create a Github release from the main branch using [github releases page](https://github.com/utPLSQL/utPLSQL/releases) and populate release description using information found on the issues and pull requests since previous release. To find issues closed after certain date use [advanced filters](https://help.github.com/articles/searching-issues-and-pull-requests/#search-by-open-or-closed-state). Example: [`is:issue closed:>2018-07-22`](https://github.com/utPLSQL/utPLSQL/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%3E2018-07-22+) - - After A build was completed on a TAG (github release) was successful, merge master branch back into develop branch. - - At this point, master branch and release tag should be at the same commit version and artifacts should be uploaded into Github release. + - After A build was completed on a TAG (github release) was successful, merge main branch back into develop branch. + - At this point, main branch and release tag should be at the same commit version and artifacts should be uploaded into Github release. - After develop branch was built, update version number in `VERSION` file to represent next planned release version. - Clone `utplsql.githug.io` project and add a new announcement about next version being released in `_posts`. Use previous announcements as a template. Make sure to set date, time and post title properly. The following will happen: - build executed on branch `release/vX.Y.Z-[something]` updates files `sonar-project.properties`, `VERSION` with project version derived from the release branch name - changes to those two files are committed and pushed back to release branch by Travis - - builds on master branch are **not getting executed** + - builds on main branch are **not getting executed** - when a Github release is created, a new tag is added in on the repository and a tag build is executed - the documentation for new release is published on `utplsql.github.io` and installation archives are added to the tag. diff --git a/development/template.env.sh b/development/template.env.sh index ab4f4efa2..521d9343d 100755 --- a/development/template.env.sh +++ b/development/template.env.sh @@ -2,19 +2,21 @@ export SQLCLI=sql # For sqlcl client #export SQLCLI=sqlplus # For sqlplus client -export CONNECTION_STR=127.0.0.1:1521/xe # Adjust the connect string +export CONNECTION_STR=127.0.0.1:1521/xe ORACLE_VERSION=11g-r2-xe# Adjust the connect string export ORACLE_PWD=oracle # Adjust your local SYS password export UTPLSQL_CLI_VERSION="3.1.6" export SELFTESTING_BRANCH=develop export UTPLSQL_DIR="utPLSQL_latest_release" -export UT3_OWNER=ut3 -export UT3_OWNER_PASSWORD=ut3 -export UT3_RELEASE_VERSION_SCHEMA=ut3_latest_release -export UT3_TESTER=ut3_tester +export UT3_DEVELOP_SCHEMA=UT3_DEVELOP +export UT3_DEVELOP_SCHEMA_PASSWORD=ut3 +export UT3_RELEASE_VERSION_SCHEMA=UT3 +export UT3_RELEASE_VERSION_SCHEMA_PASSWORD=ut3 +export UT3_TESTER=UT3_TESTER export UT3_TESTER_PASSWORD=ut3 -export UT3_TESTER_HELPER=ut3_tester_helper +export UT3_TESTER_HELPER=UT3_TESTER_HELPER export UT3_TESTER_HELPER_PASSWORD=ut3 export UT3_TABLESPACE=users export UT3_USER="UT3\$USER#" export UT3_USER_PASSWORD=ut3 +export DOCKER_ENV="-e SQLCLI=sqlplus -e UT3_DEVELOP_SCHEMA -e UT3_DEVELOP_SCHEMA_PASSWORD -e UT3_RELEASE_VERSION_SCHEMA -e UT3_RELEASE_VERSION_SCHEMA_PASSWORD -e UT3_USER -e UT3_USER_PASSWORD -e UT3_TESTER -e UT3_TESTER_PASSWORD -e UT3_TESTER_HELPER -e UT3_TESTER_HELPER_PASSWORD -e UT3_TABLESPACE -e ORACLE_PWD -e CONNECTION_STR -e UTPLSQL_DIR" diff --git a/docs/about/authors.md b/docs/about/authors.md index 3ed66a43f..d03e93575 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 31072519e..41f07a7a7 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 10ce84eb1..63db76bbb 100644 --- a/docs/about/project-details.md +++ b/docs/about/project-details.md @@ -1,10 +1,10 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # utPLSQL Project Details [![chat](http://img.shields.io/badge/GitHub_Project-Active-blue.svg)](https://github.com/utPLSQL/utPLSQL) [![license](http://img.shields.io/badge/license-apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) -[![chat](http://img.shields.io/badge/chat-slack-blue.svg)](http://utplsql-slack-invite.herokuapp.com/) +[![chat](http://img.shields.io/badge/chat-slack-blue.svg)](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA) [![twitter](https://img.shields.io/twitter/follow/utPLSQL.svg?style=social&label=Follow)](https://twitter.com/utPLSQL) diff --git a/docs/about/support.md b/docs/about/support.md index 2c9fcb98d..1e07adab3 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,6 +1,6 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # How to get support - Feel free to post questions, bugs or issues in the [issues area of GitHub](https://github.com/utPLSQL/utPLSQL/issues) -- Join developers at the [utPLSQL team](http://utplsql-slack-invite.herokuapp.com) on [Slack](https://slack.com/) +- [Join](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA) developers team on utPLSQL [Slack](https://utplsql.slack.com/) diff --git a/docs/index.md b/docs/index.md index 3d48c47e6..6940d4b94 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Introduction to utPLSQL @@ -57,7 +57,7 @@ Amongst many benefits they provide ability to: * use many reporting formats simultaneously and save reports to files (publish) * map your project source files and test files into database objects -Just download the [latest client](https://github.com/utPLSQL/utPLSQL-cli/releases/latest), download Oracle jdbc driver you are good to go. +Download the [latest client](https://github.com/utPLSQL/utPLSQL-cli/releases/latest) and you are good to go. See [project readme](https://github.com/utPLSQL/utPLSQL-cli/blob/develop/README.md) for details. # Coverage diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index feb521f69..a9dec00dd 100644 --- a/docs/userguide/advanced_data_comparison.md +++ b/docs/userguide/advanced_data_comparison.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index bb56ab4ef..ee3033da8 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Annotations @@ -1029,7 +1029,7 @@ If `--%aftertest` raises an unhandled exception the following will happen: - the `--%afterall` procedures **will be executed** - test execution will continue uninterrupted for rest of the suite -When multiple `--%aftertest` procedures are defined for a test, all of them will be executed before invoking the test. +When multiple `--%aftertest` procedures are defined for a test, all of them will be executed after invoking the test. The order of execution for `--%aftertest` procedures is defined by: - position of procedure on the list within single annotation @@ -2064,9 +2064,15 @@ When processing the test suite `test_employee_pkg` defined in [Example of annota ## sys_context -It is possible to access information about currently running suite, test and befire/after procedure form within PLSQL procedure using SYS_CONTEXT. - +It is possible to access information about currently running suite. The information is available by calling `sys_context( 'UT3_INFO', attribute )`. +It can be accessed from any procecure invoked as part of utPLSQL test execution. + +**Note:** +> Context name is derived from schema name where utPLSQL is installed. +> The context name in below examples represents the default install schema -> `UT3` +> If you install utPLSQL into another schema the context name will be different. +> For example if utPLSQL is installed into `HR` schema, the context name will be `HR_INFO` Following attributes are populated: - Always: diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 89aa004ac..b75ef1413 100644 --- a/docs/userguide/best-practices.md +++ b/docs/userguide/best-practices.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 115678802..e0935b2ea 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,7 +1,7 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Coverage -utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. +utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting uses DBMS_PROFILER package provided with Oracle database. Code coverage is gathered for the following source types: * package bodies * type bodies @@ -11,9 +11,9 @@ Code coverage is gathered for the following source types: **Note** -> The package and type specifications are explicitly excluded from code coverage analysis. This limitation is introduced to avoid false-negatives. Typically package specifications contain no executable code. The only exception is initialization of global constants and variables in package specification. Since most package specifications are not executable at all, there is no information available on the number of lines covered and those would be reported as 0% covered, which is not desirable. +> The package and type specifications are excluded from code coverage analysis. This limitation is introduced to avoid false-negatives. Typically package specifications contain no executable code. The only exception is initialization of global constants and variables in package specification. Since most package specifications are not executable at all, there is no information available on the number of lines covered and those would be reported as 0% covered, which is not desirable. -To obtain information about code coverage of your unit tests, all you need to do is run your unit tests with one of built-in code coverage reporters. +To obtain information about code coverage for unit tests, run utPLSQL with one of built-in code coverage reporters. The following code coverage reporters are supplied with utPLSQL: * `ut_coverage_html_reporter` - generates a HTML coverage report providing summary and detailed information on code coverage. The HTML reporter is based on the open-source [simplecov-html](https://github.com/colszowka/simplecov-html) reporter for Ruby. It includes source code of the code that was covered (if possible) * `ut_coveralls_reporter` - generates a [Coveralls compatible JSON](https://coveralls.zendesk.com/hc/en-us/articles/201774865-API-Introduction) coverage report providing detailed information on code coverage with line numbers. This coverage report is designed to be consumed by cloud services like [Coveralls](https://coveralls.io) @@ -33,8 +33,8 @@ If you have `execute` privilege only on the unit tests, but do not have `execute If the code that is being tested is complied as NATIVE, the code coverage will not be reported as well. ## Running unit tests with coverage -Using the code coverage functionality is as easy as using any other [reporter](reporters.md) for the utPLSQL project. You just run your tests from your preferred SQL tool and save the reporter results to a file. -All you need to do is pass the constructor of the reporter to your `ut.run` +Using the code coverage functionality is as easy as using any other [reporter](reporters.md) for the utPLSQL test-run. You just run your tests from your preferred SQL tool and save the reporter results to a file. +All you need to do is pass the constructor of the reporter to the `ut.run` procedure call. Example: ```sql @@ -43,10 +43,10 @@ begin end; / ``` -Executes all unit tests in the current schema, gathers information about code coverage and outputs the HTML text into DBMS_OUTPUT. +The above command executes all unit tests in the **current schema**, gathers information about code coverage and outputs the HTML report as text into DBMS_OUTPUT. The `ut_coverage_html_reporter` will produce an interactive HTML report. You can see a sample of code coverage for the utPLSQL project [here](https://utplsql.github.io/utPLSQL-coverage-html/) -The report provides summary information with a list of source code that was expected to be covered. +The report provides summary information with a list of source code that should be covered. ![Coverage Summary page](../images/coverage_html_summary.png) @@ -57,8 +57,8 @@ The report allow you to navigate to each source file and inspect line by line co #### Oracle 12.2 extended coverage with profiler and block coverage Using data collected from profiler and block coverage running parallel we are able to enrich information about coverage. -For every line recorded by profiler if we have a partially covered same line in block coverage we will display that information -presenting line as partially covered, displaying number of block and how many blocks been covered in that line.The feature will be automatically enabled in the Oracle database version 12.2 and higher, for older versions current profiler will be used. +For every line recorded by the profiler if we have a partially covered same line in block coverage we will display that information +presenting line as partially covered, displaying number of block and how many blocks have been covered in that line.The feature will be automatically enabled in the Oracle database version 12.2 and higher, for older versions current profiler will be used. utPLSQL installation automatically creates tables needed by `dbms_plsql_code_coverage` on databases in versions above 12c Release 1. Due to security model of `dbms_plsql_code_coverage` package, utPLSQL grants access to those tables and creates synonyms for those tables. @@ -92,7 +92,8 @@ The default behavior of coverage reporting can be altered using invocation param ### Schema based Coverage -To simply gather coverage for all objects in your current schema execute tests with coverage reporting. +To gather coverage for all objects in the **current schema** execute tests with coverage report as argument. +This is the default reporting option and therefore additional coverage options don't need to be provided. ```sql exec ut.run(ut_coverage_html_reporter()); @@ -109,7 +110,7 @@ exec ut.run(ut_coverage_html_reporter()); #### Setting coverage schema(s) By default, coverage is gathered on the schema(s) derived from suite paths provided to execute tests. -This is correct as long as your test packages and tested code share the same schema. +This is a valid approach as long as your test packages and tested code share the same schema. So when you run: ```sql @@ -243,7 +244,7 @@ By default, utPLSQL will convert file paths into database objects using the foll > This is done to simplify the syntax of regular expressions. Regular expression will always use '/' as a directory separator on a file path regardless of whether you're on a Windows or Unix system. **Note** -> Below examples assume that you have downloaded latest version of [utPLSQL-cli](https://github.com/utPLSQL/utPLSQL-cli/releases), extracted it into your projects root directory (my_project) and placed ojdbc8.jar and orai18n.jar files in utPLSQL-cli\lib directory. +> Below examples assume that you have downloaded latest version of [utPLSQL-cli](https://github.com/utPLSQL/utPLSQL-cli/releases) and extracted it into your projects root directory (my_project). > The examples assume that you run the utPLSQL-cli from `my_project` directory. Windows: @@ -531,8 +532,8 @@ Unit test code is mapped to files in `test_results.xml` In order to allow deterministic and accurate mapping of database source-code into project files, the project directory and file structure needs to meet certain criteria. - Source code is kept separate from test code (separate directories) -- Each database (source-code) object is stored in individual file. Package/type specification is kept separate from it's body. -- File name (file path) contains name of database object +- Each database (source-code) object is stored in an individual file. Package/type specification is kept separate from its body. +- File name (file path) contains the name of database object - Each file-path clearly identifies object type (by file extension) - Each file contains representation of database object "as is". No extra commands (like `set echo off` `ALTER SESSION SET PLSQL_CCFLAGS = 'debug:TRUE';`) or blank lines are present before `CREATE TYPE`,`CREATE TYPE` etc. - When project is spanning across multiple database schemes, each file-path clearly and uniformly identifies object owner @@ -659,3 +660,119 @@ begin end; ``` +## Reporting coverage outside of utPLSQL + +utPSLQL allows fo standalone reporting code coverage across multiple database sessions. This functionality enables coverage reporting for external testing tools. + +Following API calls enable the standalone coverage reporting. + +- `ut_runner.coverage_start( coverage_run_id );` - initiates code coverage within a session +- `ut_runner.coverage_stop();` - stops gathering of code coverage within a session +- `.get_report( ... )` - coverage reporters function producing coverage report as pipelined data-set (to be used in SQL query) +- `.get_report_cursor( ... )` - coverage reporters function producing coverage report as ref-cursor + +Example: +```sql +--SESSION 1 +-- gather coverage on code using specific coverage_run_id value +declare + l_coverage_run_id raw(32); +begin + l_coverage_run_id := 'A6AA5B7361251CE6E053020011ACA055'; +-- l_coverage_run_id := sys_guid; + ut_runner.coverage_start(l_coverage_run_id); + + --The code to gather coverage on goes here + + ut_runner.coverage_stop(); +end; +/ +``` + +```sql +--SESSION 2 +-- alternative approach +-- gather coverage on code using specific coverage_run_id value +exec ut_runner.coverage_start('A6AA5B7361251CE6E053020011ACA055'); + +--The code to gather coverage on goes here + +exec ut_runner.coverage_stop(); +``` + + +```sql +--SESSION 1 or SESSION2 2 or SESSION 3 +-- run after calls in SESSION 1 & 2 are finshed +-- retrieve coverage report in HTML format coverage_run_id value +select * + from table( + ut_coverage_html_reporter().get_report( + a_coverage_options => ut_coverage_options( + coverage_run_id => 'A6AA5B7361251CE6E053020011ACA055' + ) + ) + ); +``` + +```sql +--SESSION 1 or SESSION2 2 or SESSION 3 +-- run after calls in SESSION 1 & 2 are finshed +declare + l_results_cursor sys_refcursor; +begin + l_results_cursor := ut_coverage_html_reporter().get_report_cursor( + a_coverage_options => ut_coverage_options( + coverage_run_id => 'A6AA5B7361251CE6E053020011ACA055' + ) + ); + --fetch and process the cursor results + close l_results_cursor; +end; +/ +``` + +Specification of parameters for `get_report` and `get_report_cursor` +```sql +function get_report( + a_coverage_options ut_coverage_options, + a_client_character_set varchar2 := null +) return ut_varchar2_rows pipelined +``` + +```sql +function get_report_cursor( + a_coverage_options ut_coverage_options, + a_client_character_set varchar2 := null +) return sys_refcursor +``` +```sql +ut_coverage_options( + coverage_run_id raw, + schema_names ut_varchar2_rows := null, + exclude_objects ut_varchar2_rows := null, + include_objects ut_varchar2_rows := null, + file_mappings ut_file_mappings := null +); +``` + +The `a_client_character_set` is used to provide character set to the report. Coverage reports in XML and HTML format include this information to assure that HMTL/XML encoding tag is aligned with encoding of the report produced. +Use this parameter to provide encoding of your client application. + +The `a_coverage_options` parameter is used to control the scope and formatting of data returned by report. + +`ut_coverage_options` object accepts the following arguments + +- `coverage_run_id` - identifier of coverage run to generate report for - data-type `RAW(32)` +- `schema_names` - optional - list of schema names to include in coverage report - data-type `UT_VARCHAR2_ROWS` +- `exclude_objects` - optional - list of object names to exclude from report - data-type `UT_VARCHAR2_ROWS` +- `include_objects` - optional - list of object names to gather coverage on - data-type `UT_VARCHAR2_ROWS` +- `file_mappings` - optional - list of schema names to gather coverage on - data-type `UT_FILE_MAPPINGS` + +`coverage_run_id` parameter identifies a common coverage run. The valid value type for that parameter is RAW(32). +It is recommended to use `sys_guid()` to generate a common, unique identifier for a specific coverage run. +If the identifier is not unique, previous runs of coverage that used the same `coverage_run_id` will be aggregated to the resulting coverage report. + +For details on the meaning of `schema_names`, `exclude_objects`, `include_objects`, `file_mappings` see sections above. +Note that data-types of include/exclude/schema lists are different when calling `ut.run` vs. calling `get_report/get_report_cursor`. + diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 14cded7c6..ce2264fcf 100644 --- a/docs/userguide/exception-reporting.md +++ b/docs/userguide/exception-reporting.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 7876c7a79..4fcb47322 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 290419986..f2acf0e02 100644 --- a/docs/userguide/getting-started.md +++ b/docs/userguide/getting-started.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 520533cae..743858b2f 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,10 +1,63 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) + +# Supported database versions + +utPLSQL is continuously tested against following versions of Oracle databases +* 11g R2 +* 12c +* 12c R2 +* 18c +* 19c + +We do our best to assure full compatibility with supported versions of Oracle databases [See](http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf#page=6) + +# Requirements + +utPLSQL will run on any Oracle Database version 11g relase 2 or above. + +## Licensed features required + +utPLSQL doesn't require any extra licensed features of Oracle database. It can be installed on any Standard Edition Oracle Database. + +In fact, it even supports Oracle 11g XE which is a free Oracle Database version with minimal features and storage limits. + +## Storage requirements + +utPLSQL will use tablespace for the following: +- storage of annotation cache +- storage of suite cache +- storage of profiler results +- storage for staging utPLSQL reports outputs -# Downloading latest version of utPLSQL -To download latest version of utPLSQL from github on both Unix/Linux as well as Windows machines use the below snippets. +utPLSQL purges the staging storage for reports while fetching reports to screen / saving reports to files. -## Unix/Linux +Suite and annotation cache storage requirements are minimal and unless you have hundreds of thousands of tests, you'll probably not even notice the space used. + +Profiler results may require regular purging to assure low space consumption. +utPLSQl does not purge profiler tables as those tables can can be shared with other tools. + + +# Downloading utPLSQL + +## Manual download + +- Go to GitHub releases page for utPLSQL [`https://github.com/utPLSQL/utPLSQL/releases`](https://github.com/utPLSQL/utPLSQL/releases) +- Choose the version to download - latest is always greatest +- Download one of files + - utPLSQL.tar.gz + - utPLSQL.zip + +The files have identical content but use different compression (tar / zip ) so choose whichever you prefer depending on your platform (Win/Mac/Unix/Linux). + + +## Scripted download of latest utPLSQL version + +The below snippets can be used to download latest version of utPLSQL from github releases. + +After downloading follow the installation instructions in next sections of this document. + +### Unix/Linux ```bash #!/bin/bash @@ -22,7 +75,7 @@ You may download with a one-liner if that is more convenient. curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip\"" | sed 's/"//g') ``` -## Windows +### Windows To run the script on windows you will need [PowerShell 3.0](https://blogs.technet.microsoft.com/heyscriptingguy/2013/06/02/weekend-scripter-install-powershell-3-0-on-windows-7/) or above. You will also need .NET 4.0 Framework or above. @@ -51,29 +104,6 @@ foreach ($i in $urlList) { } ``` -# Checking environment and utPLSQL version - -To check the framework version execute the following query: -```sql -select substr(ut.version(),1,60) as ut_version from dual; -``` - -Additionally you may retrieve more information about your environment by executing the following query: -```sql -select - xmlserialize( content xmltype(ut_run_info()) as clob indent size = 2 ) - from dual; -``` - -# Supported database versions - -The utPLSQL may be installed on any supported version of Oracle Database [see](http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf#page=6) -* 11g R2 -* 12c -* 12c R2 -* 18c -* 19c - # Headless installation utPLSQL can be installed with DDL trigger, to enable tracking of DDL changes to your unit test packages. @@ -140,7 +170,7 @@ sqlplus sys/sys_pass@db as sysdba @install_headless_with_trigger.sql utp3 my_ver # Recommended Schema It is highly recommended to install utPLSQL in it's own schema. You are free to choose any name for this schema. -Installing uPLSQL into shared schema is really not recommended as you loose isolation of framework. +Installing uPLSQL into a shared schema is really not recommended as you loose isolation of framework. If the installing user and utPLSQL owner is one and the same, the user must have the following Oracle system permissions before you can proceed with the installation. @@ -225,7 +255,7 @@ To grant utPLSQL to an individual user, execute scripts `source/create_user_gran Example invocation: ```bash cd source -sqlplus ut3_user/ut3_password@database @create_user_grants.sql ut3 hr +sqlplus ut3_owner_schema/ut3_password@database @create_user_grants.sql ut3 hr sqlplus user/user_password@database @create_user_synonyms.sql ut3 hr ``` @@ -235,6 +265,20 @@ The following tools that support the SQL*Plus commands can be used to run the in - [SQLcl](http://www.oracle.com/technetwork/developer-tools/sqlcl/overview/index.html) - [Oracle SQL Developer](http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html) +# Checking environment and utPLSQL version + +To check the framework version execute the following query: +```sql +select substr(ut.version(),1,60) as ut_version from dual; +``` + +Additionally you may retrieve more information about your environment by executing the following query: +```sql +select + xmlserialize( content xmltype(ut_run_info()) as clob indent size = 2 ) + from dual; +``` + # Additional requirements In order to use the Code Coverage functionality of utPLSQL, users executing the tests must have the CREATE privilege on the PLSQL code that the coverage is gathered on. diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index d07c4836c..8ab8efc4d 100644 --- a/docs/userguide/querying_suites.md +++ b/docs/userguide/querying_suites.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 8b3033539..2c41bd54b 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 4d7882852..acda0fea7 100644 --- a/docs/userguide/running-unit-tests.md +++ b/docs/userguide/running-unit-tests.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Running tests @@ -31,7 +31,6 @@ curl -Lk "${DOWNLOAD_URL}" -o utplsql-cli.zip unzip -q utplsql-cli.zip ``` -Keep in mind that you will need to download/provide Oracle JDBC driver separately, as it is not part of utPLSQL-cli due to licensing restrictions. # ut.run diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 924e80d17..af5e2d585 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.10.3347-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.11.3557-blue.svg) # Upgrading from version 2 diff --git a/examples/RunAllExamples.sql b/examples/RunAllExamples.sql index 75ac59a9d..faa3388cf 100644 --- a/examples/RunAllExamples.sql +++ b/examples/RunAllExamples.sql @@ -1,6 +1,6 @@ PROMPT Run all examples -set echo off -set feedback off +set echo on +set feedback on set linesize 1000 declare diff --git a/examples/RunAllExamplesAsTests.sql b/examples/RunAllExamplesAsTests.sql index 458f11091..d089ba447 100644 --- a/examples/RunAllExamplesAsTests.sql +++ b/examples/RunAllExamplesAsTests.sql @@ -3,3 +3,7 @@ whenever oserror exit failure rollback @@RunAllExamples.sql +prompt ******************************************************************************* +prompt All examples completed successfully +prompt ******************************************************************************* +prompt diff --git a/examples/RunCustomReportersExamples.sql b/examples/RunCustomReportersExamples.sql new file mode 100644 index 000000000..730946662 --- /dev/null +++ b/examples/RunCustomReportersExamples.sql @@ -0,0 +1,10 @@ +prompt ******************************************************************************* +prompt Running custom reporters examples +prompt ******************************************************************************* +Clear Screen +set echo off +set feedback on +set linesize 1000 + +@@custom_reporters/run_ut_custom_reporter.sql +@@custom_reporters/run_ut_expectations_reporter.sql diff --git a/examples/RunDeveloperExamples.sql b/examples/RunDeveloperExamples.sql index d34914b58..2f4ca13e3 100644 --- a/examples/RunDeveloperExamples.sql +++ b/examples/RunDeveloperExamples.sql @@ -1,13 +1,11 @@ PROMPT Run developer examples Clear Screen -set echo off -set feedback off +set echo on +set feedback on set linesize 1000 exec ut_ansiconsole_helper.color_enabled(true); --developer examples -prompt RunExampleTestSuiteWithCustomReporter -@@developer_examples/RunExampleTestSuiteWithCustomReporter.sql prompt RunExampleTestAnnotationsParsingTimeHugePackage @@developer_examples/RunExampleTestAnnotationsParsingTimeHugePackage.sql prompt RunExampleTestSuite diff --git a/examples/RunExpectations.sql b/examples/RunExpectations.sql index aeb5c40bc..eed123e72 100644 --- a/examples/RunExpectations.sql +++ b/examples/RunExpectations.sql @@ -11,7 +11,7 @@ set echo off @@demo_expectations.pck begin - ut_coverage.coverage_start(); + ut_coverage.coverage_start(sys_guid()); ut_coverage.set_develop_mode(true); ut.run(); ut_coverage.set_develop_mode(false); diff --git a/examples/RunUserExamples.sql b/examples/RunUserExamples.sql index 5323a07aa..702ccbce8 100644 --- a/examples/RunUserExamples.sql +++ b/examples/RunUserExamples.sql @@ -1,6 +1,6 @@ PROMPT Run user examples -set echo off -set feedback off +set echo on +set feedback on set linesize 1000 prompt Common examples from web diff --git a/examples/between_string/run_betwnstr_test.sql b/examples/between_string/run_betwnstr_test.sql index 120645410..31edc52cf 100644 --- a/examples/between_string/run_betwnstr_test.sql +++ b/examples/between_string/run_betwnstr_test.sql @@ -1,5 +1,6 @@ @@betwnstr.sql -@@test_betwnstr.pkg +@@test_betwnstr.pks +@@test_betwnstr.pkb set serveroutput on size unlimited format truncated diff --git a/examples/between_string/run_betwnstr_test_coverage.sql b/examples/between_string/run_betwnstr_test_coverage.sql index efbbb20fe..098445cae 100644 --- a/examples/between_string/run_betwnstr_test_coverage.sql +++ b/examples/between_string/run_betwnstr_test_coverage.sql @@ -4,14 +4,15 @@ set pagesize 0 set long 200000000 set longchunksize 1000000 @@betwnstr.sql -@@test_betwnstr.pkg +@@test_betwnstr.pks +@@test_betwnstr.pkb set serveroutput on size unlimited format truncated set feedback off set termout off spool coverage.html -exec ut.run(user, ut_coverage_html_reporter(a_project_name=>'Demo of between string function tests', a_include_object_list=>ut_varchar2_list('ut3.betwnstr'))); +exec ut.run(user, ut_coverage_html_reporter(a_project_name=>'Demo of between string function tests', a_include_object_list=>ut_varchar2_list('betwnstr'))); spool off diff --git a/examples/between_string/test_betwnstr.pkg b/examples/between_string/test_betwnstr.pkb similarity index 52% rename from examples/between_string/test_betwnstr.pkg rename to examples/between_string/test_betwnstr.pkb index 84f153ecc..f872f6447 100644 --- a/examples/between_string/test_betwnstr.pkg +++ b/examples/between_string/test_betwnstr.pkb @@ -1,25 +1,3 @@ -create or replace package test_betwnstr as - - -- %suite(Between string function) - - -- %test(Returns substring from start position to end position) - procedure normal_case; - - -- %test(Returns substring when start position is zero) - procedure zero_start_position; - - -- %test(Returns string until end if end position is greater than string length) - procedure big_end_position; - - -- %test(Returns null for null input string value) - procedure null_string; - - -- %test(Demo of a disabled test) - -- %disabled - procedure disabled_test; - -end; -/ create or replace package body test_betwnstr as procedure normal_case is diff --git a/examples/between_string/test_betwnstr.pks b/examples/between_string/test_betwnstr.pks new file mode 100644 index 000000000..7b98d0005 --- /dev/null +++ b/examples/between_string/test_betwnstr.pks @@ -0,0 +1,22 @@ +create or replace package test_betwnstr as + + -- %suite(Between string function) + + -- %test(Returns substring from start position to end position) + procedure normal_case; + + -- %test(Returns substring when start position is zero) + procedure zero_start_position; + + -- %test(Returns string until end if end position is greater than string length) + procedure big_end_position; + + -- %test(Returns null for null input string value) + procedure null_string; + + -- %test(Demo of a disabled test) + -- %disabled + procedure disabled_test; + +end; +/ diff --git a/examples/custom_reporters/run_ut_custom_reporter.sql b/examples/custom_reporters/run_ut_custom_reporter.sql new file mode 100644 index 000000000..dbb142ce1 --- /dev/null +++ b/examples/custom_reporters/run_ut_custom_reporter.sql @@ -0,0 +1,16 @@ +prompt ******************************************************************************* +prompt Runnign tests with UT_CUSTOM_REPORTER on top of UT_DOCUMENTATION_REPROTER +prompt ******************************************************************************* + +set echo off +--install the example unit test packages +@demo_of_expectations/demo_equal_matcher.sql +@@ut_custom_reporter.tps +@@ut_custom_reporter.tpb + +set serveroutput on size unlimited format truncated + +exec ut.run('demo_equal_matcher', ut_custom_reporter()); + +@demo_of_expectations/drop_demo_equal_matcher.sql +drop type ut_custom_reporter; diff --git a/examples/custom_reporters/run_ut_expectations_reporter.sql b/examples/custom_reporters/run_ut_expectations_reporter.sql new file mode 100644 index 000000000..90b1ff9ff --- /dev/null +++ b/examples/custom_reporters/run_ut_expectations_reporter.sql @@ -0,0 +1,16 @@ +prompt ******************************************************************************* +prompt Runnign tests with UT_CUSTOM_REPORTER on top of UT_DOCUMENTATION_REPROTER +prompt ******************************************************************************* + +set echo off +--install the example unit test packages +@demo_of_expectations/demo_equal_matcher.sql +@@ut_expectations_reporter.tps +@@ut_expectations_reporter.tpb + +set serveroutput on size unlimited format truncated + +exec ut.run('demo_equal_matcher', ut_expectations_reporter()); + +@demo_of_expectations/drop_demo_equal_matcher.sql +drop type ut_expectations_reporter; diff --git a/examples/developer_examples/ut_custom_reporter.tpb b/examples/custom_reporters/ut_custom_reporter.tpb similarity index 100% rename from examples/developer_examples/ut_custom_reporter.tpb rename to examples/custom_reporters/ut_custom_reporter.tpb diff --git a/examples/developer_examples/ut_custom_reporter.tps b/examples/custom_reporters/ut_custom_reporter.tps similarity index 69% rename from examples/developer_examples/ut_custom_reporter.tps rename to examples/custom_reporters/ut_custom_reporter.tps index cc7de666e..0cc3d67ed 100644 --- a/examples/developer_examples/ut_custom_reporter.tps +++ b/examples/custom_reporters/ut_custom_reporter.tps @@ -4,6 +4,12 @@ create or replace type ut_custom_reporter under ut_documentation_reporter -- Member functions and procedures constructor function ut_custom_reporter(a_tab_size integer default 4) return self as result, + + /* The reporter is using base functions of parent type ( UT_DOCUMENTATION_REPORTER ) + It is altering the behavior of the base functions by change of the indentation. + So the custom reporter is same as documentation reporter except that the tab size is bigger. + Additionally, the reporter constructor accepts parameter to indicate the indentation size + */ overriding member function tab(self in ut_custom_reporter) return varchar2, overriding member procedure print_text(a_text varchar2, a_item_type varchar2 := null), overriding member procedure before_calling_suite(self in out nocopy ut_custom_reporter, a_suite ut_logical_suite), diff --git a/examples/custom_reporters/ut_expectations_reporter.tpb b/examples/custom_reporters/ut_expectations_reporter.tpb new file mode 100644 index 000000000..af9cceb28 --- /dev/null +++ b/examples/custom_reporters/ut_expectations_reporter.tpb @@ -0,0 +1,149 @@ +create or replace type body ut_expectations_reporter is + /* + utPLSQL - Version 3 + Copyright 2016 - 2020 utPLSQL Project + + Licensed under the Apache License, Version 2.0 (the "License"): + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + constructor function ut_expectations_reporter(a_report_all_expectations varchar2 := 'Y')return self as result is + begin + self.init($$plsql_unit); + self.lvl := 0; + self.report_all_expectations := substr(a_report_all_expectations,1,1); + self.failed_test_running_count := 0; + return; + end; + + /* The reporter procedure after_calling_test from ut_documentation_reporter is overriden here so that: + - the test name is printed + - the test staus is printed + - test duration is printed + - all expectation results from the test are printed (default) or only the failing ones + - error stack trace is printed + - dbms_output from test run is always printed + */ + overriding member procedure after_calling_test(a_test ut_test) as + l_message varchar2(4000); + + procedure print_expectation(a_expectation ut_expectation_result) is + l_lines ut_varchar2_list; + l_failed boolean := a_expectation.status > ut_utils.gc_success; + begin + if l_failed or self.report_all_expectations = 'Y' then + l_lines := a_expectation.get_result_lines(); + for i in 1 .. l_lines.count loop + if l_failed then + self.print_red_text(l_lines(i)); + else + self.print_green_text(l_lines(i)); + end if; + end loop; + self.print_cyan_text(a_expectation.caller_info); + self.print_text(' '); + end if; + end; + + procedure print_results_for_test(a_test ut_test) is + begin + self.lvl := self.lvl + 3; + self.print_red_text(ut_utils.table_to_clob( a_test.get_error_stack_traces() )); + for j in 1 .. a_test.all_expectations.count loop + print_expectation(a_test.all_expectations(j)); + end loop; + self.lvl := self.lvl - 3; + end; + begin + l_message := coalesce(a_test.description, a_test.name)||' ['||round(a_test.execution_time,3)||' sec]'; + --if test failed, then add it to the failures list, print failure with number + if a_test.result = ut_utils.gc_disabled then + self.print_yellow_text(l_message || ' (DISABLED)'); + elsif a_test.result = ut_utils.gc_success then + self.print_green_text(l_message); + elsif a_test.result > ut_utils.gc_success then + self.failed_test_running_count := self.failed_test_running_count + 1; + self.print_red_text(l_message || ' (FAILED - ' || failed_test_running_count || ')'); + end if; + + print_results_for_test(a_test); + -- reproduce the output from before/after procedures and the test + self.print_clob(a_test.get_serveroutputs); + end; + + overriding member procedure after_calling_run(a_run in ut_run) as + l_summary_text varchar2(4000); + l_warning_index pls_integer := 0; + -- make all warning indexes uniformly indented + c_warnings_lpad constant integer := length(to_char(a_run.results_count.warnings_count)); + + procedure print_item_warnings(a_item in ut_suite_item) is + l_items ut_suite_items; + begin + if a_item is of (ut_logical_suite) then + l_items := treat(a_item as ut_logical_suite).items; + for i in 1 .. l_items.count loop + print_item_warnings(l_items(i)); + end loop; + end if; + + if a_item.warnings is not null and a_item.warnings.count > 0 then + for i in 1 .. a_item.warnings.count loop + l_warning_index := l_warning_index + 1; + self.print_text(' ' || lpad(l_warning_index, c_warnings_lpad) || ') ' || a_item.path); + self.lvl := self.lvl + 3; + self.print_red_text(a_item.warnings(i)); + self.lvl := self.lvl - 3; + end loop; + self.print_text(' '); + end if; + end; + + procedure print_warnings(a_run in ut_run) is + begin + if a_run.results_count.warnings_count > 0 then + self.print_text(' '); + self.print_text('Warnings:'); + self.print_text(' '); + for i in 1 .. a_run.items.count loop + print_item_warnings(treat(a_run.items(i) as ut_suite_item)); + end loop; + end if; + end; + + begin + print_warnings(a_run); + self.print_text('Finished in ' || a_run.execution_time || ' seconds'); + + l_summary_text := + a_run.results_count.total_count || ' tests, ' + || a_run.results_count.failure_count || ' failed, ' || a_run.results_count.errored_count || ' errored, ' + || a_run.results_count.disabled_count ||' disabled, ' || a_run.results_count.warnings_count || ' warning(s)'; + if a_run.results_count.failure_count + a_run.results_count.errored_count + a_run.results_count.warnings_count > 0 then + self.print_red_text(l_summary_text); + else + self.print_green_text(l_summary_text); + end if; + if a_run.random_test_order_seed is not null then + self.print_text('Tests were executed with random order seed '''||a_run.random_test_order_seed||'''.'); + end if; + self.print_text(' '); + (self as ut_reporter_base).after_calling_run(a_run); + end; + + overriding member function get_description return varchar2 as + begin + return 'A custom reporter for pretty-printing all expectation results directly under the test'; + end; + +end; +/ diff --git a/examples/custom_reporters/ut_expectations_reporter.tps b/examples/custom_reporters/ut_expectations_reporter.tps new file mode 100644 index 000000000..a4238c302 --- /dev/null +++ b/examples/custom_reporters/ut_expectations_reporter.tps @@ -0,0 +1,30 @@ +create or replace type ut_expectations_reporter under ut_documentation_reporter( + /* + utPLSQL - Version 3 + Copyright 2016 - 2020 utPLSQL Project + + Licensed under the Apache License, Version 2.0 (the "License"): + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + report_all_expectations varchar2(1), + + + constructor function ut_expectations_reporter(a_report_all_expectations varchar2 := 'Y') return self as result, + + overriding member procedure after_calling_test(a_test ut_test), + overriding member procedure after_calling_run(a_run in ut_run), + + overriding member function get_description return varchar2 + +) +not final +/ diff --git a/examples/demo_of_expectations/demo_equal_matcher.sql b/examples/demo_of_expectations/demo_equal_matcher.sql index 0836eeb52..f7b20581f 100644 --- a/examples/demo_of_expectations/demo_equal_matcher.sql +++ b/examples/demo_of_expectations/demo_equal_matcher.sql @@ -18,7 +18,7 @@ create or replace package demo_equal_matcher as -- %suitepath(org.utplsql.v3.demo.matchers) -- TODO this should go into context(compare_objects, Comparing objects) - -- %context(compare_objects, Comparing objects) + -- %context(Comparing objects) -- %test -- %displayname(Gives success when comparing identical objects containing identical data) @@ -48,7 +48,7 @@ create or replace package demo_equal_matcher as -- %displayname(Gives failure when comparing different objects containing identical data) procedure object_compare_different_type; - -- %end_context + -- %endcontext end; / diff --git a/examples/demo_of_expectations/drop_demo_equal_matcher.sql b/examples/demo_of_expectations/drop_demo_equal_matcher.sql new file mode 100644 index 000000000..8ec8cfa83 --- /dev/null +++ b/examples/demo_of_expectations/drop_demo_equal_matcher.sql @@ -0,0 +1,5 @@ +drop package demo_equal_matcher; +drop type demo_departments; +drop type demo_department_new; +drop type demo_department; + diff --git a/examples/demo_of_expectations/run.sql b/examples/demo_of_expectations/run.sql index a5f93a05f..42a43400c 100644 --- a/examples/demo_of_expectations/run.sql +++ b/examples/demo_of_expectations/run.sql @@ -4,8 +4,5 @@ set serveroutput on size unlimited format truncated exec ut.run(user||'.demo_equal_matcher'); -drop package demo_equal_matcher; -drop type demo_departments; -drop type demo_department_new; -drop type demo_department; +@@drop_demo_equal_matcher.sql diff --git a/examples/developer_examples/RunExampleTestSuiteWithCustomReporter.sql b/examples/developer_examples/RunExampleTestSuiteWithCustomReporter.sql deleted file mode 100644 index 285cbf9a1..000000000 --- a/examples/developer_examples/RunExampleTestSuiteWithCustomReporter.sql +++ /dev/null @@ -1,56 +0,0 @@ ---Shows how to create a test suite with the default reporter which is dbms_output ---No tables are used for this. ---Suite Management packages are when developed will make this easier. ---Clear Screen ---http://stackoverflow.com/questions/2584492/how-to-prevent-dbms-output-put-line-from-trimming-leading-whitespace -Set Serveroutput On Size Unlimited format truncated -set echo off ---install the example unit test packages -@@ut_exampletest.pks -@@ut_exampletest.pkb -@@ut_exampletest2.pks -@@ut_exampletest2.pkb -@@ut_custom_reporter.tps -@@ut_custom_reporter.tpb - -declare - l_suite ut_logical_suite; - l_test ut_test; - l_reporter ut_output_reporter_base; - l_run ut_run; -begin - ut_event_manager.initialize(); - -- Install ut_custom_reporter first from example folder - - l_suite := ut_suite(user, 'ut_exampletest',a_line_no=>1); - - l_test := ut_test(user, 'ut_exampletest','ut_exAmpletest',a_line_no=>3); - l_test.description := 'Example test1'; - l_test.before_test_list := ut_executables(ut_executable(user, 'ut_exampletest','Setup',ut_utils.gc_before_test)); - l_test.after_test_list := ut_executables(ut_executable(user, 'ut_exampletest','tEardown',ut_utils.gc_after_test)); - l_suite.items.extend; - l_suite.items(l_suite.items.last) := l_test; - - l_test := ut_test(user, 'UT_EXAMPLETEST2','ut_exAmpletest',a_line_no=>6); - l_test.description := 'Another example test'; - l_test.before_test_list := ut_executables(ut_executable(user, 'ut_exampletest','SETUP',ut_utils.gc_before_test)); - l_test.after_test_list := ut_executables(ut_executable(user, 'ut_exampletest','TEARDOWN',ut_utils.gc_after_test)); - l_suite.items.extend; - l_suite.items(l_suite.items.last) := l_test; - - -- provide a reporter to process results tabbing each hierarcy level by tab_size - l_reporter := ut_custom_reporter(a_tab_size => 2); - ut_event_manager.add_listener(l_reporter); - l_run := ut_run(ut_suite_items(l_suite)); - l_run.do_execute(); - ut_event_manager.trigger_event(ut_event_manager.gc_finalize, l_run); - l_reporter.lines_to_dbms_output(0,0); -end; -/ - - ---FIXME this drop is causing issues when executing script several times within single session -drop type ut_custom_reporter; -drop package ut_exampletest; -drop package ut_exampletest2; -exec dbms_session.reset_package; diff --git a/readme.md b/readme.md index 0d66152d0..e56aba1d4 100644 --- a/readme.md +++ b/readme.md @@ -5,11 +5,10 @@ [![license](https://img.shields.io/github/license/utPLSQL/utPLSQL.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL.svg)](https://github.com/utPLSQL/utPLSQL/releases) [![Download statistics](https://img.shields.io/github/downloads/utPLSQL/utPLSQL/total.svg)](http://gra.caldis.me/?url=https://github.com/utPLSQL/utPLSQL) -[![chat](http://img.shields.io/badge/slack-team--chat-blue.svg)](http://utplsql-slack-invite.herokuapp.com/) +[![chat](http://img.shields.io/badge/slack-team--chat-blue.svg)](https://join.slack.com/t/utplsql/shared_invite/zt-xwm68udy-4cF_3PNEyczYEbWr38W5ww) [![twitter](https://img.shields.io/twitter/follow/utPLSQL.svg?style=social&label=Follow)](https://twitter.com/utPLSQL) -[![build](https://img.shields.io/travis/utPLSQL/utPLSQL/master.svg?label=master%20branch)](https://travis-ci.org/utPLSQL/utPLSQL) -[![build](https://img.shields.io/travis/utPLSQL/utPLSQL/develop.svg?label=develop%20branch)](https://travis-ci.org/utPLSQL/utPLSQL) +[![build](https://travis-ci.com/utPLSQL/utPLSQL.svg?branch=develop)](https://travis-ci.com/utPLSQL/utPLSQL) [![sonar](https://sonarcloud.io/api/project_badges/measure?project=utPLSQL&metric=sqale_rating)](https://sonarcloud.io/dashboard/index?id=utPLSQL) [![Coveralls coverage](https://coveralls.io/repos/github/utPLSQL/utPLSQL/badge.svg?branch=develop)](https://coveralls.io/github/utPLSQL/utPLSQL?branch=develop) @@ -85,7 +84,7 @@ Amongst many benefits it provides ability to: * use many reporting formats simultaneously and save reports to files (publish) * map your project source files and test files into database objects -Just download the [latest client](https://github.com/utPLSQL/utPLSQL-cli/releases/latest), download Oracle jdbc driver you are good to go. +Download the [latest client](https://github.com/utPLSQL/utPLSQL-cli/releases/latest) and are good to go. See [project readme](https://github.com/utPLSQL/utPLSQL-cli/blob/develop/README.md) for details. @@ -163,7 +162,7 @@ We welcome new developers to join our community and contribute to the utPLSQL pr If you are interested in helping please read our [guide to contributing](CONTRIBUTING.md) The best place to start is to read the documentation and get familiar with the existing code base. A [slack chat](https://utplsql.slack.com/) is the place to go if you want to talk with team members. -To sign up to the chat use [this link](http://utplsql-slack-invite.herokuapp.com/) +To sign up to the chat use [this link](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA). ---------- @@ -183,7 +182,7 @@ __Project Directories__ ---------- -If you have a great feature in mind, that you would like to see in utPLSQL v3 please create an [issue on GitHub](https://github.com/utPLSQL/utPLSQL/issues) or discuss it with us in the [Slack chat rooms](http://utplsql-slack-invite.herokuapp.com/). +If you have a great feature in mind, that you would like to see in utPLSQL v3 please create an [issue on GitHub](https://github.com/utPLSQL/utPLSQL/issues) or discuss it with us in the [slack chat rooms](https://utplsql.slack.com/). Use [invite link](https://join.slack.com/t/utplsql/shared_invite/zt-d6zor80g-WWqAhbLWioJZUtLYeXetzA) to join the chat. # Version 2 to Version 3 Comparison diff --git a/sonar-project.properties b/sonar-project.properties index 7ab61df28..6220e0b90 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=utPLSQL # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=utPLSQL -sonar.projectVersion=v3.1.10 +sonar.projectVersion=v3.1.11 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # Since SonarQube 4.2, this property is optional if sonar.modules is set. diff --git a/source/api/ut.pkb b/source/api/ut.pkb index 3b94a2bf7..9e3defe16 100644 --- a/source/api/ut.pkb +++ b/source/api/ut.pkb @@ -2,7 +2,7 @@ create or replace package body ut is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -674,7 +674,7 @@ create or replace package body ut is procedure set_nls is begin if g_nls_date_format is null then - select nsp.value + select /*+ no_parallel */ nsp.value into g_nls_date_format from nls_session_parameters nsp where parameter = 'NLS_DATE_FORMAT'; diff --git a/source/api/ut.pks b/source/api/ut.pks index ff75179b0..2cce4e183 100644 --- a/source/api/ut.pks +++ b/source/api/ut.pks @@ -2,7 +2,7 @@ create or replace package ut authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/api/ut_runner.pkb b/source/api/ut_runner.pkb index 2f523e1dd..d2bd74b91 100644 --- a/source/api/ut_runner.pkb +++ b/source/api/ut_runner.pkb @@ -2,7 +2,7 @@ create or replace package body ut_runner is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -20,27 +20,6 @@ create or replace package body ut_runner is /** * Private functions */ - function to_ut_object_list(a_names ut_varchar2_list, a_schema_names ut_varchar2_rows) return ut_object_names is - l_result ut_object_names; - l_object_name ut_object_name; - begin - if a_names is not empty then - l_result := ut_object_names(); - for i in 1 .. a_names.count loop - l_object_name := ut_object_name(a_names(i)); - if l_object_name.owner is null then - for i in 1 .. cardinality(a_schema_names) loop - l_result.extend; - l_result(l_result.last) := ut_object_name(a_schema_names(i)||'.'||l_object_name.name); - end loop; - else - l_result.extend; - l_result(l_result.last) := l_object_name; - end if; - end loop; - end if; - return l_result; - end; procedure finish_run(a_run ut_run, a_force_manual_rollback boolean) is begin @@ -51,7 +30,6 @@ create or replace package body ut_runner is ut_compound_data_helper.cleanup_diff(); if not a_force_manual_rollback then rollback; - ut_utils.cleanup_session_temp_tables; end if; end; @@ -95,9 +73,7 @@ create or replace package body ut_runner is ) is l_run ut_run; l_coverage_schema_names ut_varchar2_rows; - l_exclude_object_names ut_object_names := ut_object_names(); - l_include_object_names ut_object_names; - l_paths ut_varchar2_list := ut_varchar2_list(); + l_paths ut_varchar2_list; l_random_test_order_seed positive; l_tags ut_varchar2_rows := ut_varchar2_rows(); begin @@ -113,18 +89,17 @@ create or replace package body ut_runner is ut_event_manager.trigger_event(ut_event_manager.gc_initialize); ut_event_manager.trigger_event(ut_event_manager.gc_debug, ut_run_info()); + if a_random_test_order_seed is not null then l_random_test_order_seed := a_random_test_order_seed; elsif a_random_test_order then dbms_random.seed( to_char(systimestamp,'yyyyddmmhh24missffff') ); l_random_test_order_seed := trunc(dbms_random.value(1, 1000000000)); end if; - if a_paths is null or a_paths is empty or a_paths.count = 1 and a_paths(1) is null then + + l_paths := ut_utils.filter_list(ut_utils.string_table_to_table(a_paths,','), '.+'); + if l_paths is null or l_paths is empty then l_paths := ut_varchar2_list(sys_context('userenv', 'current_schema')); - else - for i in 1..a_paths.count loop - l_paths := l_paths multiset union ut_utils.string_to_table(a_string => a_paths(i),a_delimiter => ','); - end loop; end if; begin @@ -132,36 +107,33 @@ create or replace package body ut_runner is ut_utils.save_dbms_output_to_cache(); ut_console_reporter_base.set_color_enabled(a_color_console); + if a_coverage_schemes is not empty then l_coverage_schema_names := ut_utils.convert_collection(a_coverage_schemes); else l_coverage_schema_names := ut_suite_manager.get_schema_names(l_paths); end if; - if a_exclude_objects is not empty then - l_exclude_object_names := to_ut_object_list(a_exclude_objects, l_coverage_schema_names); - end if; - + if a_tags is not null then - l_tags := l_tags multiset union distinct ut_utils.convert_collection( + l_tags := l_tags multiset union distinct ut_utils.convert_collection( ut_utils.trim_list_elements(ut_utils.filter_list(ut_utils.string_to_table(a_tags,','),ut_utils.gc_word_no_space)) ); end if; - l_exclude_object_names := l_exclude_object_names multiset union all ut_suite_manager.get_schema_ut_packages(l_coverage_schema_names); - - l_include_object_names := to_ut_object_list(a_include_objects, l_coverage_schema_names); l_run := ut_run( - null, - l_paths, - l_coverage_schema_names, - l_exclude_object_names, - l_include_object_names, - set(a_source_file_mappings), - set(a_test_file_mappings), - a_client_character_set, - l_random_test_order_seed, - l_tags + a_run_paths => l_paths, + a_coverage_options => ut_coverage_options( + coverage_run_id => sys_guid(), + schema_names => l_coverage_schema_names, + exclude_objects => ut_utils.convert_collection(a_exclude_objects), + include_objects => ut_utils.convert_collection(a_include_objects), + file_mappings => set(a_source_file_mappings) + ), + a_test_file_mappings => set(a_test_file_mappings), + a_client_character_set => a_client_character_set, + a_random_test_order_seed => l_random_test_order_seed, + a_run_tags => l_tags ); ut_suite_manager.configure_execution_by_path(l_paths, l_run.items, l_random_test_order_seed, l_tags); @@ -296,5 +268,15 @@ create or replace package body ut_runner is return l_result; end; + procedure coverage_start(a_coverage_run_id raw) is + begin + ut_coverage.coverage_start(a_coverage_run_id); + end; + + procedure coverage_stop is + begin + ut_coverage.coverage_stop; + end; + end ut_runner; / diff --git a/source/api/ut_runner.pks b/source/api/ut_runner.pks index 38167ac57..75aa12f8f 100644 --- a/source/api/ut_runner.pks +++ b/source/api/ut_runner.pks @@ -2,7 +2,7 @@ create or replace package ut_runner authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -145,5 +145,9 @@ create or replace package ut_runner authid current_user is */ function hash_suite_path(a_path varchar2, a_random_seed positiven) return varchar2; + procedure coverage_start(a_coverage_run_id raw); + + procedure coverage_stop; + end ut_runner; / diff --git a/source/api/ut_suite_item_info.tpb b/source/api/ut_suite_item_info.tpb index 9b142acb0..97d931c59 100644 --- a/source/api/ut_suite_item_info.tpb +++ b/source/api/ut_suite_item_info.tpb @@ -1,7 +1,7 @@ create or replace type body ut_suite_item_info is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/api/ut_suite_item_info.tps b/source/api/ut_suite_item_info.tps index 807635d1b..2c0f16198 100644 --- a/source/api/ut_suite_item_info.tps +++ b/source/api/ut_suite_item_info.tps @@ -1,7 +1,7 @@ create or replace type ut_suite_item_info as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/api/ut_suite_items_info.tps b/source/api/ut_suite_items_info.tps index 7c9ac33c3..208098f9d 100644 --- a/source/api/ut_suite_items_info.tps +++ b/source/api/ut_suite_items_info.tps @@ -1,7 +1,7 @@ create or replace type ut_suite_items_info as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/check_object_grants.sql b/source/check_object_grants.sql index d499ced9c..5f560e6b1 100644 --- a/source/check_object_grants.sql +++ b/source/check_object_grants.sql @@ -24,7 +24,7 @@ begin l_target_table := get_view('dba_tab_privs'); l_owner_column := case when l_target_table like 'dba%' then 'owner' else 'table_schema' end; execute immediate q'[ - select listagg(' - '||object_name,CHR(10)) within group(order by object_name) + select /*+ no_parallel */ listagg(' - '||object_name,CHR(10)) within group(order by object_name) from ( select column_value as object_name from table(:l_expected_grants) diff --git a/source/check_sys_grants.sql b/source/check_sys_grants.sql index 7b1644952..79b657328 100644 --- a/source/check_sys_grants.sql +++ b/source/check_sys_grants.sql @@ -12,18 +12,29 @@ begin end if; end loop; end if; + + with + x as ( + select '' as remove from dual + union all + select ' ANY' as remove from dual + ) select listagg(' - '||privilege,CHR(10)) within group(order by privilege) - into l_missing_grants - from ( - select column_value as privilege - from table(l_expected_grants) - minus - (select privilege - from user_sys_privs - union all - select replace(privilege,' ANY') privilege - from user_sys_privs) - ); + into l_missing_grants + from ( + select column_value as privilege + from table(l_expected_grants) + minus ( + select replace(p.privilege, x.remove) as privilege + from role_sys_privs p + join session_roles r using (role) + cross join x + union all + select replace(p.privilege, x.remove) as privilege + from user_sys_privs p + cross join x + ) + ); if l_missing_grants is not null then raise_application_error( -20000 diff --git a/source/core/annotations/ut_annotated_object.tps b/source/core/annotations/ut_annotated_object.tps index 06a0f4a36..3fda363fe 100644 --- a/source/core/annotations/ut_annotated_object.tps +++ b/source/core/annotations/ut_annotated_object.tps @@ -1,7 +1,7 @@ create type ut_annotated_object as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotated_objects.tps b/source/core/annotations/ut_annotated_objects.tps index c7b142a32..c67c1bd53 100644 --- a/source/core/annotations/ut_annotated_objects.tps +++ b/source/core/annotations/ut_annotated_objects.tps @@ -1,7 +1,7 @@ create type ut_annotated_objects as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation.tps b/source/core/annotations/ut_annotation.tps index 982c0348c..3d0311571 100644 --- a/source/core/annotations/ut_annotation.tps +++ b/source/core/annotations/ut_annotation.tps @@ -1,7 +1,7 @@ create type ut_annotation as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation_cache.sql b/source/core/annotations/ut_annotation_cache.sql index 8baa6e75c..67149ce60 100644 --- a/source/core/annotations/ut_annotation_cache.sql +++ b/source/core/annotations/ut_annotation_cache.sql @@ -1,7 +1,7 @@ create table ut_annotation_cache ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/annotations/ut_annotation_cache_info.sql b/source/core/annotations/ut_annotation_cache_info.sql index 7bbf99e00..167973a04 100644 --- a/source/core/annotations/ut_annotation_cache_info.sql +++ b/source/core/annotations/ut_annotation_cache_info.sql @@ -1,7 +1,7 @@ create table ut_annotation_cache_info ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/annotations/ut_annotation_cache_manager.pkb b/source/core/annotations/ut_annotation_cache_manager.pkb index 4882108fc..17129c316 100644 --- a/source/core/annotations/ut_annotation_cache_manager.pkb +++ b/source/core/annotations/ut_annotation_cache_manager.pkb @@ -1,7 +1,7 @@ create or replace package body ut_annotation_cache_manager as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -21,12 +21,12 @@ create or replace package body ut_annotation_cache_manager as l_timestamp timestamp := systimestamp; pragma autonomous_transaction; begin - update ut_annotation_cache_schema s + update /*+ no_parallel */ ut_annotation_cache_schema s set s.max_parse_time = l_timestamp where s.object_type = a_object.object_type and s.object_owner = a_object.object_owner; if sql%rowcount = 0 then - insert into ut_annotation_cache_schema s + insert /*+ no_parallel */ into ut_annotation_cache_schema s (object_owner, object_type, max_parse_time) values (a_object.object_owner, a_object.object_type, l_timestamp); end if; @@ -34,7 +34,7 @@ create or replace package body ut_annotation_cache_manager as -- if not in trigger, or object has annotations if ora_sysevent is null or a_object.annotations is not null and a_object.annotations.count > 0 then - update ut_annotation_cache_info i + update /*+ no_parallel */ ut_annotation_cache_info i set i.parse_time = l_timestamp where (i.object_owner, i.object_name, i.object_type) in ((a_object.object_owner, a_object.object_name, a_object.object_type)) @@ -42,7 +42,7 @@ create or replace package body ut_annotation_cache_manager as if sql%rowcount = 0 then - insert into ut_annotation_cache_info + insert /*+ no_parallel */ into ut_annotation_cache_info (cache_id, object_owner, object_name, object_type, parse_time) values (ut_annotation_cache_seq.nextval, a_object.object_owner, a_object.object_name, a_object.object_type, l_timestamp) returning cache_id into l_cache_id; @@ -50,12 +50,12 @@ create or replace package body ut_annotation_cache_manager as end if; - delete from ut_annotation_cache c where cache_id = l_cache_id; + delete /*+ no_parallel */ from ut_annotation_cache c where cache_id = l_cache_id; if a_object.annotations is not null and a_object.annotations.count > 0 then - insert into ut_annotation_cache + insert /*+ no_parallel */ into ut_annotation_cache (cache_id, annotation_position, annotation_name, annotation_text, subobject_name) - select l_cache_id, a.position, a.name, a.text, a.subobject_name + select /*+ no_parallel */ l_cache_id, a.position, a.name, a.text, a.subobject_name from table(a_object.annotations) a; end if; commit; @@ -67,9 +67,9 @@ create or replace package body ut_annotation_cache_manager as pragma autonomous_transaction; begin - delete from ut_annotation_cache c + delete /*+ no_parallel */ from ut_annotation_cache c where c.cache_id - in (select i.cache_id + in (select /*+ no_parallel */ i.cache_id from ut_annotation_cache_info i join table (a_objects) o on o.object_name = i.object_name @@ -78,25 +78,26 @@ create or replace package body ut_annotation_cache_manager as and o.needs_refresh = 'Y' ); - update ut_annotation_cache_schema s + update /*+ no_parallel */ ut_annotation_cache_schema s set s.max_parse_time = l_timestamp where (s.object_owner, s.object_type) in ( - select o.object_owner, o.object_type + select /*+ no_parallel */ o.object_owner, o.object_type from table(a_objects) o where o.needs_refresh = 'Y' ); if sql%rowcount = 0 then - insert into ut_annotation_cache_schema s + insert /*+ no_parallel */ into ut_annotation_cache_schema s (object_owner, object_type, max_parse_time) - select distinct o.object_owner, o.object_type, l_timestamp + select /*+ no_parallel */ distinct o.object_owner, o.object_type, l_timestamp from table(a_objects) o where o.needs_refresh = 'Y'; end if; - merge into ut_annotation_cache_info i - using (select o.object_name, o.object_type, o.object_owner + merge /*+ no_parallel */ + into ut_annotation_cache_info i + using (select /*+ no_parallel */ o.object_name, o.object_type, o.object_owner from table(a_objects) o where o.needs_refresh = 'Y' ) o @@ -116,7 +117,7 @@ create or replace package body ut_annotation_cache_manager as function get_cached_objects_list(a_object_owner varchar2, a_object_type varchar2, a_parsed_after timestamp := null) return ut_annotation_objs_cache_info is l_result ut_annotation_objs_cache_info; begin - select ut_annotation_obj_cache_info( + select /*+ no_parallel */ ut_annotation_obj_cache_info( object_owner => i.object_owner, object_name => i.object_name, object_type => i.object_type, @@ -135,7 +136,7 @@ create or replace package body ut_annotation_cache_manager as l_result t_cache_schema_info; begin begin - select * + select /*+ no_parallel */ * into l_result from ut_annotation_cache_schema s where s.object_type = a_object_type and s.object_owner = a_object_owner; @@ -149,7 +150,7 @@ create or replace package body ut_annotation_cache_manager as procedure set_fully_refreshed(a_object_owner varchar2, a_object_type varchar2) is pragma autonomous_transaction; begin - update ut_annotation_cache_schema s + update /*+ no_parallel */ ut_annotation_cache_schema s set s.full_refresh_time = s.max_parse_time where s.object_owner = a_object_owner and s.object_type = a_object_type; @@ -160,9 +161,9 @@ create or replace package body ut_annotation_cache_manager as pragma autonomous_transaction; begin - delete from ut_annotation_cache_info i + delete /*+ no_parallel */ from ut_annotation_cache_info i where exists ( - select 1 from table (a_objects) o + select /*+ no_parallel */ 1 from table (a_objects) o where o.object_name = i.object_name and o.object_type = i.object_type and o.object_owner = i.object_owner @@ -175,7 +176,7 @@ create or replace package body ut_annotation_cache_manager as l_results sys_refcursor; begin open l_results for - select ut_annotated_object( + select /*+ no_parallel */ ut_annotated_object( i.object_owner, i.object_name, i.object_type, i.parse_time, cast( collect( @@ -204,15 +205,15 @@ create or replace package body ut_annotation_cache_manager as else l_filter := case when a_object_owner is null then ':a_object_owner is null' else 'object_owner = :a_object_owner' end; l_filter := l_filter || ' and ' || case when a_object_type is null then ':a_object_type is null' else 'object_type = :a_object_type' end; - l_cache_filter := ' c.cache_id in (select i.cache_id from ut_annotation_cache_info i where ' || l_filter || ' )'; + l_cache_filter := ' c.cache_id in (select /*+ no_parallel */ i.cache_id from ut_annotation_cache_info i where ' || l_filter || ' )'; end if; - execute immediate 'delete from ut_annotation_cache c where ' || l_cache_filter + execute immediate 'delete /*+ no_parallel */ from ut_annotation_cache c where ' || l_cache_filter using a_object_owner, a_object_type; - execute immediate ' delete from ut_annotation_cache_info i where ' || l_filter + execute immediate ' delete /*+ no_parallel */ from ut_annotation_cache_info i where ' || l_filter using a_object_owner, a_object_type; - execute immediate ' delete from ut_annotation_cache_schema s where ' || l_filter + execute immediate ' delete /*+ no_parallel */ from ut_annotation_cache_schema s where ' || l_filter using a_object_owner, a_object_type; commit; diff --git a/source/core/annotations/ut_annotation_cache_manager.pks b/source/core/annotations/ut_annotation_cache_manager.pks index e4ba6dd7a..1e9734934 100644 --- a/source/core/annotations/ut_annotation_cache_manager.pks +++ b/source/core/annotations/ut_annotation_cache_manager.pks @@ -1,7 +1,7 @@ create or replace package ut_annotation_cache_manager authid definer as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation_cache_schema.sql b/source/core/annotations/ut_annotation_cache_schema.sql index b8f908e84..8889b9abf 100644 --- a/source/core/annotations/ut_annotation_cache_schema.sql +++ b/source/core/annotations/ut_annotation_cache_schema.sql @@ -1,7 +1,7 @@ create table ut_annotation_cache_schema ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/annotations/ut_annotation_cache_seq.sql b/source/core/annotations/ut_annotation_cache_seq.sql index 0a898e98e..b371b382b 100644 --- a/source/core/annotations/ut_annotation_cache_seq.sql +++ b/source/core/annotations/ut_annotation_cache_seq.sql @@ -1,7 +1,7 @@ create sequence ut_annotation_cache_seq /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/annotations/ut_annotation_manager.pkb b/source/core/annotations/ut_annotation_manager.pkb index a37391d37..95d944843 100644 --- a/source/core/annotations/ut_annotation_manager.pkb +++ b/source/core/annotations/ut_annotation_manager.pkb @@ -1,7 +1,7 @@ create or replace package body ut_annotation_manager as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ create or replace package body ut_annotation_manager as function user_can_see_whole_schema( a_schema_name varchar2 ) return boolean is begin - return sys_context('userenv','current_schema') = a_schema_name + return sys_context('userenv','current_user') = a_schema_name or ut_metadata.user_has_execute_any_proc() or ut_metadata.is_object_visible('dba_objects'); end; @@ -34,7 +34,7 @@ create or replace package body ut_annotation_manager as l_cached_objects := ut_annotation_cache_manager.get_cached_objects_list( a_object_owner, a_object_type ); if l_cached_objects is not empty then - execute immediate 'select /*+ cardinality(i '||ut_utils.scale_cardinality(cardinality(l_cached_objects))||') */ + execute immediate 'select /*+ no_parallel cardinality(i '||ut_utils.scale_cardinality(cardinality(l_cached_objects))||') */ value(i) from table( :l_data ) i where @@ -71,7 +71,7 @@ create or replace package body ut_annotation_manager as --limit the list to objects that exist and are visible to the invoking user --enrich the list by info about cache validity execute immediate - 'select /*+ cardinality(i '||ut_utils.scale_cardinality(cardinality(l_cached_objects))||') */ + 'select /*+ no_parallel cardinality(i '||ut_utils.scale_cardinality(cardinality(l_cached_objects))||') */ '||l_ut_owner||q'[.ut_annotation_obj_cache_info( object_owner => o.owner, object_name => o.object_name, @@ -108,7 +108,7 @@ create or replace package body ut_annotation_manager as begin l_card := ut_utils.scale_cardinality(cardinality(a_objects_to_refresh)); open l_result for - q'[select x.name, x.text + q'[select /*+ no_parallel */ x.name, x.text from (select /*+ cardinality( r ]'||l_card||q'[ )*/ s.name, s.text, s.line, max(case when s.text like '%--%\%%' escape '\' @@ -246,10 +246,13 @@ create or replace package body ut_annotation_manager as -- remove the "create [or replace] [[non]editionable] " so that we have only "type|package" for parsing -- needed for dbms_preprocessor l_sql_clob := regexp_replace(l_sql_clob, '^(.*?\s*create(\s+or\s+replace)?(\s+(editionable|noneditionable))?\s+?)((package|type).*)', '\5', 1, 1, 'ni'); + -- remove "OWNER." from create or replace statement. + -- Owner is not supported along with AUTHID - see issue https://github.com/utPLSQL/utPLSQL/issues/1088 + l_sql_clob := regexp_replace(l_sql_clob, '^(package|type)\s+("?[a-zA-Z][a-zA-Z0-9#_$]*"?\.)(.*)', '\1 \3', 1, 1, 'ni'); l_sql_lines := ut_utils.convert_collection( ut_utils.clob_to_table(l_sql_clob) ); end if; open l_result for - select a_object_name as name, column_value||chr(10) as text from table(l_sql_lines); + select /*+ no_parallel */ a_object_name as name, column_value||chr(10) as text from table(l_sql_lines); return l_result; end; @@ -258,7 +261,7 @@ create or replace package body ut_annotation_manager as l_sources_view varchar2(200) := ut_metadata.get_source_view_name(); begin open l_result for - q'[select :a_object_name, s.text + q'[select /*+ no_parallel */ :a_object_name, s.text from ]'||l_sources_view||q'[ s where s.type = :a_object_type and s.owner = :a_object_owner @@ -276,7 +279,7 @@ create or replace package body ut_annotation_manager as 'GSMCATUSER','GSMUSER','ORACLE_OCM','OUTLN','REMOTE_SCHEDULER_AGENT','SYS','SYS$UMF', 'SYSBACKUP','SYSDG','SYSKM','SYSRAC','SYSTEM','WMSYS','XDB','XS$NULL'); $else - select username bulk collect into l_restricted_users + select /*+ no_parallel */ username bulk collect into l_restricted_users from all_users where oracle_maintained = 'Y'; $end if ora_dict_obj_owner member of l_restricted_users then diff --git a/source/core/annotations/ut_annotation_manager.pks b/source/core/annotations/ut_annotation_manager.pks index 70257afac..20fcd810f 100644 --- a/source/core/annotations/ut_annotation_manager.pks +++ b/source/core/annotations/ut_annotation_manager.pks @@ -1,7 +1,7 @@ create or replace package ut_annotation_manager authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation_obj_cache_info.tps b/source/core/annotations/ut_annotation_obj_cache_info.tps index 4b8178a9d..1db3fd190 100644 --- a/source/core/annotations/ut_annotation_obj_cache_info.tps +++ b/source/core/annotations/ut_annotation_obj_cache_info.tps @@ -1,7 +1,7 @@ create type ut_annotation_obj_cache_info as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation_objs_cache_info.tps b/source/core/annotations/ut_annotation_objs_cache_info.tps index bab33a9d3..fc96e7d25 100644 --- a/source/core/annotations/ut_annotation_objs_cache_info.tps +++ b/source/core/annotations/ut_annotation_objs_cache_info.tps @@ -1,7 +1,7 @@ create type ut_annotation_objs_cache_info as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotation_parser.pkb b/source/core/annotations/ut_annotation_parser.pkb index 6248f36b9..f0271c957 100644 --- a/source/core/annotations/ut_annotation_parser.pkb +++ b/source/core/annotations/ut_annotation_parser.pkb @@ -1,7 +1,7 @@ create or replace package body ut_annotation_parser as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -210,7 +210,7 @@ create or replace package body ut_annotation_parser as dbms_lob.freetemporary(l_source); - select value(x) bulk collect into l_result from table(l_annotations) x order by x.position; + select /*+ no_parallel */ value(x) bulk collect into l_result from table(l_annotations) x order by x.position; return l_result; end parse_object_annotations; diff --git a/source/core/annotations/ut_annotation_parser.pks b/source/core/annotations/ut_annotation_parser.pks index 0368811db..2f474c883 100644 --- a/source/core/annotations/ut_annotation_parser.pks +++ b/source/core/annotations/ut_annotation_parser.pks @@ -1,7 +1,7 @@ create or replace package ut_annotation_parser authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_annotations.tps b/source/core/annotations/ut_annotations.tps index 85be05e72..a6579d236 100644 --- a/source/core/annotations/ut_annotations.tps +++ b/source/core/annotations/ut_annotations.tps @@ -1,7 +1,7 @@ create type ut_annotations /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_trigger_check.pkb b/source/core/annotations/ut_trigger_check.pkb index 76d3aa11c..34e43ba46 100644 --- a/source/core/annotations/ut_trigger_check.pkb +++ b/source/core/annotations/ut_trigger_check.pkb @@ -1,7 +1,7 @@ create or replace package body ut_trigger_check is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/annotations/ut_trigger_check.pks b/source/core/annotations/ut_trigger_check.pks index c4c27c596..cee0b06fd 100644 --- a/source/core/annotations/ut_trigger_check.pks +++ b/source/core/annotations/ut_trigger_check.pks @@ -1,7 +1,7 @@ create or replace package ut_trigger_check authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/coverage/dbms_plssqlcode.sql b/source/core/coverage/dbms_plssqlcode.sql index 4bba7780c..1ae287207 100644 --- a/source/core/coverage/dbms_plssqlcode.sql +++ b/source/core/coverage/dbms_plssqlcode.sql @@ -7,7 +7,7 @@ begin select synonym_name from all_synonyms where synonym_name = 'DBMSPCC_BLOCKS' and owner = sys_context('USERENV','CURRENT_SCHEMA')); if l_tab_exist = 0 then execute immediate q'[ - create global temporary table dbmspcc_blocks ( + create table dbmspcc_blocks ( run_id number(38, 0), object_id number(38, 0), block number(38, 0), @@ -21,7 +21,7 @@ begin constraint dbmspcc_blocks_covered_ck check ( covered in ( 0, 1 ) ) enable, constraint dbmspcc_blocks_not_feasible_ck check ( not_feasible in ( 0, 1 ) ) enable, constraint dbmspcc_blocks_pk primary key ( run_id, object_id, block ) using index - ) on commit preserve rows]'; + )]'; end if; end; / @@ -34,13 +34,13 @@ begin select synonym_name from all_synonyms where synonym_name = 'DBMSPCC_RUNS' and owner = sys_context('USERENV','CURRENT_SCHEMA')); if l_tab_exist = 0 then execute immediate q'[ - create global temporary table dbmspcc_runs ( + create table dbmspcc_runs ( run_id number(38, 0), run_comment varchar2(4000 byte), run_owner varchar2(128 byte) constraint dbmspcc_runs_run_owner_nn not null enable, run_timestamp date constraint dbmspcc_runs_run_timestamp_nn not null enable, constraint dbmspcc_runs_pk primary key ( run_id ) using index enable - ) on commit preserve rows]'; + )]'; end if; end; / @@ -53,7 +53,7 @@ begin select synonym_name from all_synonyms where synonym_name = 'DBMSPCC_UNITS' and owner = sys_context('USERENV','CURRENT_SCHEMA')); if l_tab_exist = 0 then execute immediate q'[ - create global temporary table dbmspcc_units ( + create table dbmspcc_units ( run_id number(38, 0), object_id number(38, 0), owner varchar2(128 byte) constraint dbmspcc_units_owner_nn not null enable, @@ -61,7 +61,7 @@ begin type varchar2(12 byte) constraint dbmspcc_units_type_nn not null enable, last_ddl_time date constraint dbmspcc_units_last_ddl_time_nn not null enable, constraint dbmspcc_units_pk primary key ( run_id, object_id ) using index enable - ) on commit preserve rows]'; + )]'; end if; end; / diff --git a/source/core/coverage/ut_coverage.pkb b/source/core/coverage/ut_coverage.pkb index caa75ae51..ddcdeaf2e 100644 --- a/source/core/coverage/ut_coverage.pkb +++ b/source/core/coverage/ut_coverage.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,26 +16,20 @@ create or replace package body ut_coverage is limitations under the License. */ - g_coverage_id tt_coverage_id_arr; - g_develop_mode boolean not null := false; - g_is_started boolean not null := false; + g_develop_mode boolean not null := false; + g_is_started boolean not null := false; procedure set_develop_mode(a_develop_mode in boolean) is - begin - g_develop_mode := a_develop_mode; - end; - - function get_coverage_id(a_coverage_type in varchar2) return integer is - begin - return g_coverage_id(a_coverage_type); - end; + begin + g_develop_mode := a_develop_mode; + end; function is_develop_mode return boolean is - begin - return g_develop_mode; - end; + begin + return g_develop_mode; + end; - function get_cov_sources_sql(a_coverage_options ut_coverage_options, a_skip_objects ut_object_names) return varchar2 is + function get_cov_sources_sql(a_coverage_options ut_coverage_options, a_skip_objects ut_object_names) return varchar2 is l_result varchar2(32767); l_full_name varchar2(32767); l_join_mappings varchar2(32767); @@ -54,7 +48,7 @@ create or replace package body ut_coverage is ), sources as ( select /*+ cardinality(f {mappings_cardinality}) */ - {l_full_name} as full_name, s.owner, s.name, + {l_full_name} as full_name, s.owner, s.name, s.type, s.line - case when s.type = 'TRIGGER' then o.offset else 0 end as line, s.text from {sources_view} s {join_file_mappings} @@ -64,7 +58,7 @@ create or replace package body ut_coverage is {filters} ), coverage_sources as ( - select full_name, owner, name, line, text, + select full_name, owner, name, type, line, text, case when -- to avoid execution of regexp_like on every line @@ -83,7 +77,7 @@ create or replace package body ut_coverage is end as to_be_skipped from sources s ) - select full_name, owner, name, line, to_be_skipped, text + select /*+ no_parallel */ full_name, owner, name, type, line, to_be_skipped, text from coverage_sources s -- Exclude calls to utPLSQL framework, Unit Test packages and objects from a_exclude_list parameter of coverage reporter where (s.owner, s.name) not in ( select /*+ cardinality(el {skipped_objects_cardinality})*/el.owner, el.name from table(:l_skipped_objects) el ) @@ -99,7 +93,7 @@ create or replace package body ut_coverage is and s.type = f.object_type and s.owner = f.object_owner'; else - l_full_name := q'[lower(s.owner||'.'||s.name)]'; + l_full_name := q'[lower(s.type||' '||s.owner||'.'||s.name)]'; l_filters := case when a_coverage_options.include_objects is not empty then ' and (s.owner, s.name) in ( @@ -177,14 +171,16 @@ create or replace package body ut_coverage is /** * Public functions */ - procedure coverage_start(a_coverage_options ut_coverage_options default null) is + procedure coverage_start(a_coverage_run_id t_coverage_run_id) is l_run_comment varchar2(200) := 'utPLSQL Code coverage run '||ut_utils.to_string(systimestamp); + l_line_coverage_id integer; + l_block_coverage_id integer; begin if not is_develop_mode() and not g_is_started then - ut_coverage_helper_block.coverage_start( l_run_comment, g_coverage_id(gc_block_coverage) ); - ut_coverage_helper_profiler.coverage_start( l_run_comment, g_coverage_id(gc_proftab_coverage) ); - coverage_pause(); + l_line_coverage_id := ut_coverage_helper_profiler.coverage_start( l_run_comment ); + l_block_coverage_id := ut_coverage_helper_block.coverage_start( l_run_comment ); g_is_started := true; + ut_coverage_helper.set_coverage_run_ids(a_coverage_run_id, l_line_coverage_id, l_block_coverage_id); end if; end; @@ -200,20 +196,6 @@ create or replace package body ut_coverage is ut_coverage_helper_profiler.coverage_resume(); end; - procedure mock_coverage_id(a_coverage_id integer,a_coverage_type in varchar2) is - begin - g_develop_mode := true; - g_is_started := true; - g_coverage_id(a_coverage_type) := a_coverage_id; - end; - - procedure mock_coverage_id(a_coverage_id tt_coverage_id_arr) is - begin - g_develop_mode := true; - g_is_started := true; - g_coverage_id := a_coverage_id; - end; - procedure coverage_stop is begin if not is_develop_mode() then @@ -227,22 +209,23 @@ create or replace package body ut_coverage is function get_coverage_data(a_coverage_options ut_coverage_options) return t_coverage is l_result_block ut_coverage.t_coverage; l_result_profiler_enrich ut_coverage.t_coverage; - l_object ut_coverage.t_full_name; + l_object ut_coverage.t_object_name; l_line_no binary_integer; + l_coverage_options ut_coverage_options := a_coverage_options; begin --prepare global temp table with sources ut_event_manager.trigger_event('about to populate coverage temp table'); - populate_tmp_table(a_coverage_options); + populate_tmp_table(l_coverage_options); ut_event_manager.trigger_event('coverage temp table populated'); -- Get raw data for both reporters, order is important as tmp table will skip headers and dont populate -- tmp table for block again. - l_result_profiler_enrich:= ut_coverage_profiler.get_coverage_data( a_coverage_options, get_coverage_id(gc_proftab_coverage) ); + l_result_profiler_enrich := ut_coverage_profiler.get_coverage_data( l_coverage_options ); ut_event_manager.trigger_event('profiler coverage data retrieved'); -- If block coverage available we will use it. $if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then - l_result_block := ut_coverage_block.get_coverage_data( a_coverage_options, get_coverage_id(gc_block_coverage) ); + l_result_block := ut_coverage_block.get_coverage_data( l_coverage_options ); ut_event_manager.trigger_event('block coverage data retrieved'); -- Enrich profiler results with some of the block results diff --git a/source/core/coverage/ut_coverage.pks b/source/core/coverage/ut_coverage.pks index 1d87d50c9..210cb13f6 100644 --- a/source/core/coverage/ut_coverage.pks +++ b/source/core/coverage/ut_coverage.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,25 +16,21 @@ create or replace package ut_coverage authid current_user is limitations under the License. */ - gc_proftab_coverage constant varchar2(32) := 'proftab'; - gc_block_coverage constant varchar2(32) := 'block'; - - type tt_coverage_id_arr is table of integer index by varchar2(30); + subtype t_coverage_run_id is raw(32) not null; -- total run coverage information - subtype t_full_name is varchar2(4000); - subtype t_object_name is varchar2(250); - - --subtype t_line_executions is binary_integer; + subtype t_object_name is varchar2(257); + subtype t_line_no is binary_integer; type t_line_executions is record( - executions binary_integer - ,partcove binary_integer - ,no_blocks binary_integer + executions binary_integer + ,partcove binary_integer + ,no_blocks binary_integer ,covered_blocks binary_integer); + -- line coverage information indexed by line no. - --type tt_lines is table of t_line_executions index by binary_integer; - type tt_lines is table of t_line_executions index by binary_integer; + type tt_lines is table of t_line_executions index by t_line_no; + --unit coverage information record type t_unit_coverage is record( owner varchar2(128) @@ -50,7 +46,7 @@ create or replace package ut_coverage authid current_user is ,lines tt_lines); -- coverage information indexed by full object name (schema.object) - type tt_program_units is table of t_unit_coverage index by t_full_name; + type tt_program_units is table of t_unit_coverage index by t_object_name; -- total run coverage information type t_coverage is record( @@ -64,21 +60,11 @@ create or replace package ut_coverage authid current_user is ,executions number(38, 0) := 0 ,objects tt_program_units); - function get_coverage_id(a_coverage_type in varchar2) return integer; - procedure set_develop_mode(a_develop_mode in boolean); function is_develop_mode return boolean; - /*** - * Allows overwriting of private global variable g_coverage_id - * Used internally, only for unit testing of the framework only - */ - procedure mock_coverage_id(a_coverage_id integer, a_coverage_type in varchar2); - - procedure mock_coverage_id(a_coverage_id tt_coverage_id_arr); - - procedure coverage_start(a_coverage_options ut_coverage_options default null); + procedure coverage_start(a_coverage_run_id t_coverage_run_id); procedure coverage_stop; diff --git a/source/core/coverage/ut_coverage_block.pkb b/source/core/coverage/ut_coverage_block.pkb index c6d0f409d..a906b81a3 100644 --- a/source/core/coverage/ut_coverage_block.pkb +++ b/source/core/coverage/ut_coverage_block.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_block is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ create or replace package body ut_coverage_block is * Public functions */ - function get_coverage_data(a_coverage_options ut_coverage_options, a_coverage_id integer) return ut_coverage.t_coverage is + function get_coverage_data(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage is l_line_calls ut_coverage_helper.t_unit_line_calls; l_result ut_coverage.t_coverage; l_new_unit ut_coverage.t_unit_coverage; @@ -40,7 +40,7 @@ create or replace package body ut_coverage_block is exit when l_source_objects_crsr%notfound; --get coverage data - l_line_calls := ut_coverage_helper_block.get_raw_coverage_data(l_source_object.owner, l_source_object.name, a_coverage_id); + l_line_calls := ut_coverage_helper_block.get_raw_coverage_data(l_source_object, a_coverage_options.coverage_run_id); --if there is coverage, we need to filter out the garbage (badly indicated data) if l_line_calls.count > 0 then --remove lines that should not be indicted as meaningful diff --git a/source/core/coverage/ut_coverage_block.pks b/source/core/coverage/ut_coverage_block.pks index 26c79317e..01caca035 100644 --- a/source/core/coverage/ut_coverage_block.pks +++ b/source/core/coverage/ut_coverage_block.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_block authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ create or replace package ut_coverage_block authid current_user is limitations under the License. */ - function get_coverage_data(a_coverage_options ut_coverage_options, a_coverage_id integer) return ut_coverage.t_coverage; + function get_coverage_data(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage; end; / diff --git a/source/core/coverage/ut_coverage_helper.pkb b/source/core/coverage/ut_coverage_helper.pkb index 12ee9e1f7..e249b3381 100644 --- a/source/core/coverage/ut_coverage_helper.pkb +++ b/source/core/coverage/ut_coverage_helper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_helper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -35,9 +35,9 @@ create or replace package body ut_coverage_helper is procedure insert_into_tmp_table(a_data t_coverage_sources_tmp_rows) is begin forall i in 1 .. a_data.count - insert into ut_coverage_sources_tmp - (full_name,owner,name,line,text, to_be_skipped) - values(a_data(i).full_name,a_data(i).owner,a_data(i).name,a_data(i).line,a_data(i).text,a_data(i).to_be_skipped); + insert /*+ no_parallel */ into ut_coverage_sources_tmp + (full_name,owner,name,type,line,text,to_be_skipped) + values(a_data(i).full_name,a_data(i).owner,a_data(i).name,a_data(i).type,a_data(i).line,a_data(i).text,a_data(i).to_be_skipped); end; procedure cleanup_tmp_table is @@ -49,7 +49,7 @@ create or replace package body ut_coverage_helper is function is_tmp_table_populated return boolean is l_result integer; begin - select 1 into l_result from ut_coverage_sources_tmp where rownum = 1; + select /*+ no_parallel */ 1 into l_result from ut_coverage_sources_tmp where rownum = 1; return (l_result = 1); exception when no_data_found then @@ -60,12 +60,12 @@ create or replace package body ut_coverage_helper is l_result t_tmp_table_objects_crsr; begin open l_result for - select o.owner, o.name, o.full_name, max(o.line) lines_count, + select /*+ no_parallel */ o.owner, o.name, o.type, o.full_name, max(o.line) as lines_count, cast( collect(decode(to_be_skipped, 'Y', to_char(line))) as ut_varchar2_list - ) to_be_skipped_list + ) as to_be_skipped_list from ut_coverage_sources_tmp o - group by o.owner, o.name, o.full_name; + group by o.owner, o.name, o.type, o.full_name; return l_result; end; @@ -73,7 +73,7 @@ create or replace package body ut_coverage_helper is function get_tmp_table_object_lines(a_owner varchar2, a_object_name varchar2) return ut_varchar2_list is l_result ut_varchar2_list; begin - select rtrim(s.text,chr(10)) text + select /*+ no_parallel */ rtrim(s.text,chr(10)) as text bulk collect into l_result from ut_coverage_sources_tmp s where s.owner = a_owner @@ -83,5 +83,15 @@ create or replace package body ut_coverage_helper is return l_result; end; + procedure set_coverage_run_ids( a_coverage_run_id raw, a_line_coverage_id integer, a_block_coverage_id integer ) is + pragma autonomous_transaction; + begin + insert /*+ no_parallel */ into ut_coverage_runs + ( coverage_run_id, line_coverage_id, block_coverage_id ) + values + ( a_coverage_run_id, a_line_coverage_id, a_block_coverage_id ); + commit; + end; + end; / diff --git a/source/core/coverage/ut_coverage_helper.pks b/source/core/coverage/ut_coverage_helper.pks index 85a54a7ca..cd6ed9ec7 100644 --- a/source/core/coverage/ut_coverage_helper.pks +++ b/source/core/coverage/ut_coverage_helper.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_helper authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ create or replace package ut_coverage_helper authid definer is full_name ut_coverage_sources_tmp.full_name%type, owner ut_coverage_sources_tmp.owner%type, name ut_coverage_sources_tmp.name%type, + type ut_coverage_sources_tmp.type%type, line ut_coverage_sources_tmp.line%type, to_be_skipped ut_coverage_sources_tmp.to_be_skipped%type, text ut_coverage_sources_tmp.text%type @@ -42,6 +43,7 @@ create or replace package ut_coverage_helper authid definer is type t_tmp_table_object is record( owner ut_coverage_sources_tmp.owner%type, name ut_coverage_sources_tmp.name%type, + type ut_coverage_sources_tmp.type%type, full_name ut_coverage_sources_tmp.full_name%type, lines_count integer, to_be_skipped_list ut_varchar2_list @@ -59,5 +61,7 @@ create or replace package ut_coverage_helper authid definer is function get_tmp_table_object_lines(a_owner varchar2, a_object_name varchar2) return ut_varchar2_list; + procedure set_coverage_run_ids( a_coverage_run_id raw, a_line_coverage_id integer, a_block_coverage_id integer ); + end; / diff --git a/source/core/coverage/ut_coverage_helper_block.pkb b/source/core/coverage/ut_coverage_helper_block.pkb index fc64c507f..25cb00f90 100644 --- a/source/core/coverage/ut_coverage_helper_block.pkb +++ b/source/core/coverage/ut_coverage_helper_block.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_helper_block is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,13 +16,6 @@ create or replace package body ut_coverage_helper_block is limitations under the License. */ - type t_proftab_row is record ( - line binary_integer, - calls number(38,0) - ); - - type t_proftab_rows is table of t_proftab_row; - type t_block_row is record( line binary_integer ,blocks binary_integer @@ -30,12 +23,12 @@ create or replace package body ut_coverage_helper_block is type t_block_rows is table of t_block_row; - procedure coverage_start(a_run_comment varchar2, a_coverage_id out integer) is + function coverage_start(a_run_comment varchar2) return integer is begin $if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then - a_coverage_id := dbms_plsql_code_coverage.start_coverage(run_comment => a_run_comment); + return dbms_plsql_code_coverage.start_coverage(run_comment => a_run_comment); $else - null; + return null; $end end; @@ -48,45 +41,59 @@ create or replace package body ut_coverage_helper_block is $end end; - function block_results(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return t_block_rows is + function block_results(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return t_block_rows is l_coverage_rows t_block_rows; + l_ut_owner varchar2(250) := ut_utils.ut_owner; begin - - select ccb.line as line, - count(ccb.block) as blocks, - sum(ccb.covered) as covered_blocks - bulk collect into l_coverage_rows - from dbmspcc_units ccu - left outer join dbmspcc_blocks ccb - on ccu.run_id = ccb.run_id - and ccu.object_id = ccb.object_id - where ccu.run_id = a_coverage_id - and ccu.owner = a_object_owner - and ccu.name = a_object_name - group by ccb.line - order by 1; - - return l_coverage_rows; + execute immediate q'[ + select /*+ no_parallel */ + line as line, + count(block) as blocks, + sum(covered) as covered_blocks + from (select line, + block, + max(covered) as covered + from dbmspcc_units ccu + join ]'||l_ut_owner||q'[.ut_coverage_runs r + on r.block_coverage_id = ccu.run_id + left join dbmspcc_blocks ccb + on ccu.run_id = ccb.run_id + and ccu.object_id = ccb.object_id + where r.coverage_run_id = :a_coverage_run_id + and ccu.owner = :a_object_owner + and ccu.name = :a_object_name + and ccu.type = :a_object_type + group by ccb.line, ccb.block + ) + group by line + having count(block) > 1 + order by line]' + bulk collect into l_coverage_rows + using + a_coverage_run_id, a_object.owner, + a_object.name, a_object.type; + + return l_coverage_rows; end; - function get_raw_coverage_data(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return ut_coverage_helper.t_unit_line_calls is + function get_raw_coverage_data(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return ut_coverage_helper.t_unit_line_calls is l_tmp_data t_block_rows; l_results ut_coverage_helper.t_unit_line_calls; begin $if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then - l_tmp_data := block_results(a_object_owner, a_object_name, a_coverage_id); + l_tmp_data := block_results(a_object, a_coverage_run_id); for i in 1 .. l_tmp_data.count loop l_results(l_tmp_data(i).line).blocks := l_tmp_data(i).blocks; l_results(l_tmp_data(i).line).covered_blocks := l_tmp_data(i).covered_blocks; - l_results(l_tmp_data(i).line).partcovered := case - when (l_tmp_data(i).covered_blocks > 0) and - (l_tmp_data(i).blocks > l_tmp_data(i).covered_blocks) then - 1 - else - 0 - end; + l_results(l_tmp_data(i).line).partcovered := + case + when (l_tmp_data(i).covered_blocks > 0) + and (l_tmp_data(i).blocks > l_tmp_data(i).covered_blocks) + then 1 + else 0 + end; end loop; $end return l_results; diff --git a/source/core/coverage/ut_coverage_helper_block.pks b/source/core/coverage/ut_coverage_helper_block.pks index 0afa3ab15..a147d9f4f 100644 --- a/source/core/coverage/ut_coverage_helper_block.pks +++ b/source/core/coverage/ut_coverage_helper_block.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_helper_block authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ create or replace package ut_coverage_helper_block authid current_user is limitations under the License. */ - procedure coverage_start(a_run_comment in varchar2,a_coverage_id out integer); + function coverage_start(a_run_comment in varchar2) return integer; procedure coverage_stop; - function get_raw_coverage_data(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return ut_coverage_helper.t_unit_line_calls; + function get_raw_coverage_data(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return ut_coverage_helper.t_unit_line_calls; end; / diff --git a/source/core/coverage/ut_coverage_helper_profiler.pkb b/source/core/coverage/ut_coverage_helper_profiler.pkb index c90a5b36a..f29291efb 100644 --- a/source/core/coverage/ut_coverage_helper_profiler.pkb +++ b/source/core/coverage/ut_coverage_helper_profiler.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_helper_profiler is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -31,9 +31,11 @@ create or replace package body ut_coverage_helper_profiler is type t_block_rows is table of t_block_row; - procedure coverage_start(a_run_comment varchar2,a_coverage_id out integer) is + function coverage_start(a_run_comment varchar2) return integer is + l_coverage_id integer; begin - dbms_profiler.start_profiler(run_comment => a_run_comment, run_number => a_coverage_id); + dbms_profiler.start_profiler(run_comment => a_run_comment, run_number => l_coverage_id); + return l_coverage_id; end; procedure coverage_pause is @@ -53,10 +55,10 @@ create or replace package body ut_coverage_helper_profiler is dbms_profiler.stop_profiler(); end; - function proftab_results(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return t_proftab_rows is + function proftab_results(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return t_proftab_rows is l_coverage_rows t_proftab_rows; begin - select + select /*+ no_parallel */ d.line#, case when sum(d.total_occur) = 0 and sum(d.total_time) > 0 then 1 else sum(d.total_occur) end total_occur bulk collect into l_coverage_rows @@ -64,20 +66,22 @@ create or replace package body ut_coverage_helper_profiler is join plsql_profiler_data d on u.runid = d.runid and u.unit_number = d.unit_number - where u.runid = a_coverage_id - and u.unit_owner = a_object_owner - and u.unit_name = a_object_name - and u.unit_type in ('PACKAGE BODY', 'TYPE BODY', 'PROCEDURE', 'FUNCTION', 'TRIGGER') + join ut_coverage_runs r + on r.line_coverage_id = u.runid + where r.coverage_run_id = a_coverage_run_id + and u.unit_owner = a_object.owner + and u.unit_name = a_object.name + and u.unit_type = a_object.type group by d.line#; - + return l_coverage_rows; end; - function get_raw_coverage_data(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return ut_coverage_helper.t_unit_line_calls is + function get_raw_coverage_data(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return ut_coverage_helper.t_unit_line_calls is l_tmp_data t_proftab_rows; l_results ut_coverage_helper.t_unit_line_calls; begin - l_tmp_data := proftab_results(a_object_owner, a_object_name, a_coverage_id); + l_tmp_data := proftab_results(a_object, a_coverage_run_id); for i in 1 .. l_tmp_data.count loop l_results(l_tmp_data(i).line).calls := l_tmp_data(i).calls; diff --git a/source/core/coverage/ut_coverage_helper_profiler.pks b/source/core/coverage/ut_coverage_helper_profiler.pks index 9345f4b88..0c54a83bf 100644 --- a/source/core/coverage/ut_coverage_helper_profiler.pks +++ b/source/core/coverage/ut_coverage_helper_profiler.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_helper_profiler authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ create or replace package ut_coverage_helper_profiler authid definer is limitations under the License. */ - procedure coverage_start(a_run_comment in varchar2,a_coverage_id out integer); + function coverage_start(a_run_comment in varchar2) return integer; procedure coverage_stop; @@ -24,7 +24,7 @@ create or replace package ut_coverage_helper_profiler authid definer is procedure coverage_resume; - function get_raw_coverage_data(a_object_owner varchar2, a_object_name varchar2, a_coverage_id integer) return ut_coverage_helper.t_unit_line_calls; + function get_raw_coverage_data(a_object ut_coverage_helper.t_tmp_table_object, a_coverage_run_id raw) return ut_coverage_helper.t_unit_line_calls; end; / diff --git a/source/core/coverage/ut_coverage_profiler.pkb b/source/core/coverage/ut_coverage_profiler.pkb index 160e2dd41..663ceab7f 100644 --- a/source/core/coverage/ut_coverage_profiler.pkb +++ b/source/core/coverage/ut_coverage_profiler.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_profiler is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ create or replace package body ut_coverage_profiler is /** * Public functions */ - function get_coverage_data(a_coverage_options ut_coverage_options, a_coverage_id integer) return ut_coverage.t_coverage is + function get_coverage_data(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage is l_line_calls ut_coverage_helper.t_unit_line_calls; l_result ut_coverage.t_coverage; l_new_unit ut_coverage.t_unit_coverage; @@ -34,7 +34,7 @@ create or replace package body ut_coverage_profiler is exit when l_source_objects_crsr%notfound; --get coverage data - l_line_calls := ut_coverage_helper_profiler.get_raw_coverage_data( l_source_object.owner, l_source_object.name, a_coverage_id); + l_line_calls := ut_coverage_helper_profiler.get_raw_coverage_data( l_source_object, a_coverage_options.coverage_run_id); --if there is coverage, we need to filter out the garbage (badly indicated data from dbms_profiler) if l_line_calls.count > 0 then diff --git a/source/core/coverage/ut_coverage_profiler.pks b/source/core/coverage/ut_coverage_profiler.pks index 8e671f899..9ce9a27f0 100644 --- a/source/core/coverage/ut_coverage_profiler.pks +++ b/source/core/coverage/ut_coverage_profiler.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_profiler authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ create or replace package ut_coverage_profiler authid current_user is limitations under the License. */ - function get_coverage_data(a_coverage_options ut_coverage_options, a_coverage_id integer) return ut_coverage.t_coverage; + function get_coverage_data(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage; end; / diff --git a/source/core/coverage/ut_coverage_reporter_base.tpb b/source/core/coverage/ut_coverage_reporter_base.tpb index 5067f9221..aff4e6560 100644 --- a/source/core/coverage/ut_coverage_reporter_base.tpb +++ b/source/core/coverage/ut_coverage_reporter_base.tpb @@ -1,7 +1,7 @@ create or replace type body ut_coverage_reporter_base is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -19,7 +19,8 @@ create or replace type body ut_coverage_reporter_base is overriding final member procedure before_calling_run(self in out nocopy ut_coverage_reporter_base, a_run ut_run) as begin (self as ut_output_reporter_base).before_calling_run(a_run); - ut_coverage.coverage_start(a_coverage_options => a_run.coverage_options); + ut_coverage.coverage_start(a_coverage_run_id => a_run.coverage_options.coverage_run_id); + ut_coverage.coverage_pause(); end; overriding final member procedure before_calling_before_all(self in out nocopy ut_coverage_reporter_base, a_executable in ut_executable) is @@ -85,5 +86,30 @@ create or replace type body ut_coverage_reporter_base is ut_coverage.coverage_pause(); end; + final member function get_report( a_coverage_options ut_coverage_options, a_client_character_set varchar2 := null ) return ut_varchar2_rows pipelined is + l_reporter ut_coverage_reporter_base := self; + begin + ut_coverage_helper.cleanup_tmp_table(); + (l_reporter as ut_output_reporter_base).before_calling_run(null); + l_reporter.after_calling_run( ut_run( a_coverage_options => a_coverage_options, a_client_character_set => a_client_character_set ) ); + l_reporter.on_finalize(null); + for i in (select /*+ no_parallel */ x.text from table(l_reporter.get_lines(1, 1)) x ) loop + pipe row (i.text); + end loop; + return; + end; + + final member function get_report_cursor( a_coverage_options ut_coverage_options, a_client_character_set varchar2 := null ) return sys_refcursor is + l_reporter ut_coverage_reporter_base := self; + l_result sys_refcursor; + begin + ut_coverage_helper.cleanup_tmp_table(); + (l_reporter as ut_output_reporter_base).before_calling_run(null); + l_reporter.after_calling_run( ut_run( a_coverage_options => a_coverage_options, a_client_character_set => a_client_character_set ) ); + l_reporter.on_finalize(null); + open l_result for select /*+ no_parallel */ x.text from table(l_reporter.get_lines(1, 1)) x; + return l_result; + end; + end; / diff --git a/source/core/coverage/ut_coverage_reporter_base.tps b/source/core/coverage/ut_coverage_reporter_base.tps index 2b9d1c625..305c5d757 100644 --- a/source/core/coverage/ut_coverage_reporter_base.tps +++ b/source/core/coverage/ut_coverage_reporter_base.tps @@ -1,7 +1,7 @@ create or replace type ut_coverage_reporter_base under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -36,8 +36,9 @@ create or replace type ut_coverage_reporter_base under ut_output_reporter_base( overriding final member procedure after_calling_after_each (self in out nocopy ut_coverage_reporter_base, a_executable in ut_executable), overriding final member procedure before_calling_after_all(self in out nocopy ut_coverage_reporter_base, a_executable in ut_executable), - overriding final member procedure after_calling_after_all (self in out nocopy ut_coverage_reporter_base, a_executable in ut_executable) - + overriding final member procedure after_calling_after_all (self in out nocopy ut_coverage_reporter_base, a_executable in ut_executable), + final member function get_report( a_coverage_options ut_coverage_options, a_client_character_set varchar2 := null ) return ut_varchar2_rows pipelined, + final member function get_report_cursor( a_coverage_options ut_coverage_options, a_client_character_set varchar2 := null ) return sys_refcursor ) not final not instantiable / diff --git a/source/core/coverage/ut_coverage_runs.sql b/source/core/coverage/ut_coverage_runs.sql new file mode 100644 index 000000000..78230240d --- /dev/null +++ b/source/core/coverage/ut_coverage_runs.sql @@ -0,0 +1,20 @@ +declare + l_tab_exist number; +begin + select count(*) into l_tab_exist + from all_tables + where table_name = 'UT_COVERAGE_RUNS' and owner = sys_context('USERENV','CURRENT_SCHEMA'); + if l_tab_exist = 0 then + execute immediate q'[create table ut_coverage_runs + ( + coverage_run_id raw(32) not null, + line_coverage_id number(38,0) unique not null, + block_coverage_id number(38,0) unique, + constraint ut_coverage_runs primary key (coverage_run_id, line_coverage_id) + ) organization index ]'; + execute immediate q'[comment on table ut_coverage_runs is + 'Map of block and line coverage runs for a test-run']'; + dbms_output.put_line('UT_COVERAGE_RUNS table created'); + end if; +end; +/ diff --git a/source/core/coverage/ut_coverage_sources_tmp.sql b/source/core/coverage/ut_coverage_sources_tmp.sql index f53283dcd..c091d5955 100644 --- a/source/core/coverage/ut_coverage_sources_tmp.sql +++ b/source/core/coverage/ut_coverage_sources_tmp.sql @@ -1,7 +1,7 @@ create global temporary table ut_coverage_sources_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -15,10 +15,11 @@ create global temporary table ut_coverage_sources_tmp( full_name varchar2(4000), owner varchar2(250), name varchar2(250), + type varchar2(250), line number(38,0), to_be_skipped varchar2(1), text varchar2(4000), - constraint ut_coverage_sources_tmp_pk primary key (owner,name,line) + constraint ut_coverage_sources_tmp_pk primary key (owner,name,type,line) ) on commit preserve rows; --is this needed? diff --git a/source/core/events/ut_event_item.tps b/source/core/events/ut_event_item.tps index efec940f5..c0ea653ea 100644 --- a/source/core/events/ut_event_item.tps +++ b/source/core/events/ut_event_item.tps @@ -1,7 +1,7 @@ create or replace type ut_event_item authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/events/ut_event_listener.tps b/source/core/events/ut_event_listener.tps index 71ee16a0f..bbcdbf218 100644 --- a/source/core/events/ut_event_listener.tps +++ b/source/core/events/ut_event_listener.tps @@ -1,7 +1,7 @@ create or replace type ut_event_listener authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/events/ut_event_manager.pkb b/source/core/events/ut_event_manager.pkb index 039eb43a0..f51019421 100644 --- a/source/core/events/ut_event_manager.pkb +++ b/source/core/events/ut_event_manager.pkb @@ -1,7 +1,7 @@ create or replace package body ut_event_manager as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/events/ut_event_manager.pks b/source/core/events/ut_event_manager.pks index f67bd0f4d..03b18b728 100644 --- a/source/core/events/ut_event_manager.pks +++ b/source/core/events/ut_event_manager.pks @@ -1,7 +1,7 @@ create or replace package ut_event_manager authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/output_buffers/ut_output_buffer_base.tpb b/source/core/output_buffers/ut_output_buffer_base.tpb index 018250e4b..6d7964150 100644 --- a/source/core/output_buffers/ut_output_buffer_base.tpb +++ b/source/core/output_buffers/ut_output_buffer_base.tpb @@ -1,7 +1,7 @@ create or replace type body ut_output_buffer_base is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -25,11 +25,11 @@ create or replace type body ut_output_buffer_base is self.output_id := coalesce(a_output_id, self.output_id, sys_guid()); self.start_date := coalesce(self.start_date, sysdate); self.last_message_id := 0; - select count(*) into l_exists from ut_output_buffer_info_tmp where output_id = self.output_id; + select /*+ no_parallel */ count(*) into l_exists from ut_output_buffer_info_tmp where output_id = self.output_id; if ( l_exists > 0 ) then - update ut_output_buffer_info_tmp set start_date = self.start_date where output_id = self.output_id; + update /*+ no_parallel */ ut_output_buffer_info_tmp set start_date = self.start_date where output_id = self.output_id; else - insert into ut_output_buffer_info_tmp(output_id, start_date) values (self.output_id, self.start_date); + insert /*+ no_parallel */ into ut_output_buffer_info_tmp(output_id, start_date) values (self.output_id, self.start_date); end if; commit; self.is_closed := 0; @@ -39,12 +39,12 @@ create or replace type body ut_output_buffer_base is l_lines sys_refcursor; begin open l_lines for - select text, item_type + select /*+ no_parallel */ text, item_type from table(self.get_lines(a_initial_timeout, a_timeout_sec)); return l_lines; end; - member procedure lines_to_dbms_output(self in ut_output_buffer_base, a_initial_timeout natural := null, a_timeout_sec natural := null) is + member procedure lines_to_dbms_output(self in ut_output_buffer_base, a_initial_timeout natural := null, a_timeout_sec natural := null) is l_data sys_refcursor; l_clob clob; l_item_type varchar2(32767); diff --git a/source/core/output_buffers/ut_output_buffer_base.tps b/source/core/output_buffers/ut_output_buffer_base.tps index 745692f38..98a6847cd 100644 --- a/source/core/output_buffers/ut_output_buffer_base.tps +++ b/source/core/output_buffers/ut_output_buffer_base.tps @@ -1,7 +1,7 @@ create or replace type ut_output_buffer_base force authid definer as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/output_buffers/ut_output_buffer_info_tmp.sql b/source/core/output_buffers/ut_output_buffer_info_tmp.sql index ec09619d2..af730d394 100644 --- a/source/core/output_buffers/ut_output_buffer_info_tmp.sql +++ b/source/core/output_buffers/ut_output_buffer_info_tmp.sql @@ -1,7 +1,7 @@ create table ut_output_buffer_info_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/output_buffers/ut_output_buffer_tmp.sql b/source/core/output_buffers/ut_output_buffer_tmp.sql index 49fefa24d..57027817e 100644 --- a/source/core/output_buffers/ut_output_buffer_tmp.sql +++ b/source/core/output_buffers/ut_output_buffer_tmp.sql @@ -1,7 +1,7 @@ create table ut_output_buffer_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/output_buffers/ut_output_clob_buffer_tmp.sql b/source/core/output_buffers/ut_output_clob_buffer_tmp.sql index 48cfe6fde..40dda121f 100644 --- a/source/core/output_buffers/ut_output_clob_buffer_tmp.sql +++ b/source/core/output_buffers/ut_output_clob_buffer_tmp.sql @@ -6,7 +6,7 @@ begin v_table_sql := 'create table ut_output_clob_buffer_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/output_buffers/ut_output_clob_table_buffer.tpb b/source/core/output_buffers/ut_output_clob_table_buffer.tpb index 8c2825151..66ff71c62 100644 --- a/source/core/output_buffers/ut_output_clob_table_buffer.tpb +++ b/source/core/output_buffers/ut_output_clob_table_buffer.tpb @@ -1,7 +1,7 @@ create or replace type body ut_output_clob_table_buffer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ create or replace type body ut_output_clob_table_buffer is pragma autonomous_transaction; begin self.last_message_id := self.last_message_id + 1; - insert into ut_output_clob_buffer_tmp(output_id, message_id, is_finished) + insert /*+ no_parallel */ into ut_output_clob_buffer_tmp(output_id, message_id, is_finished) values (self.output_id, self.last_message_id, 1); commit; self.is_closed := 1; @@ -37,7 +37,7 @@ create or replace type body ut_output_clob_table_buffer is begin if a_text is not null or a_item_type is not null then self.last_message_id := self.last_message_id + 1; - insert into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) + insert /*+ no_parallel */ into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) values (self.output_id, self.last_message_id, a_text, a_item_type); end if; commit; @@ -46,8 +46,8 @@ create or replace type body ut_output_clob_table_buffer is overriding member procedure send_lines(self in out nocopy ut_output_clob_table_buffer, a_text_list ut_varchar2_rows, a_item_type varchar2 := null) is pragma autonomous_transaction; begin - insert into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) - select self.output_id, self.last_message_id + rownum, t.column_value, a_item_type + insert /*+ no_parallel */ into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) + select /*+ no_parallel */ self.output_id, self.last_message_id + rownum, t.column_value, a_item_type from table(a_text_list) t where t.column_value is not null or a_item_type is not null; self.last_message_id := self.last_message_id + SQL%rowcount; @@ -59,7 +59,7 @@ create or replace type body ut_output_clob_table_buffer is begin if a_text is not null and a_text != empty_clob() or a_item_type is not null then self.last_message_id := self.last_message_id + 1; - insert into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) + insert /*+ no_parallel */ into ut_output_clob_buffer_tmp(output_id, message_id, text, item_type) values (self.output_id, self.last_message_id, a_text, a_item_type); end if; commit; @@ -102,13 +102,13 @@ create or replace type body ut_output_clob_table_buffer is begin while not l_finished loop with ordered_buffer as ( - select /*+ index(a) */ a.rowid, ut_output_data_row(a.text, a.item_type), is_finished + select /*+ no_parallel index(a) */ a.rowid, ut_output_data_row(a.text, a.item_type), is_finished from ut_output_clob_buffer_tmp a where a.output_id = self.output_id and a.message_id <= l_max_message_id order by a.message_id ) - select b.* + select /*+ no_parallel */ b.* bulk collect into l_message_rowids, l_buffer_data, l_finished_flags from ordered_buffer b; diff --git a/source/core/output_buffers/ut_output_clob_table_buffer.tps b/source/core/output_buffers/ut_output_clob_table_buffer.tps index 2eb3640b0..7b98efaba 100644 --- a/source/core/output_buffers/ut_output_clob_table_buffer.tps +++ b/source/core/output_buffers/ut_output_clob_table_buffer.tps @@ -1,7 +1,7 @@ create or replace type ut_output_clob_table_buffer under ut_output_buffer_base ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/output_buffers/ut_output_data_row.tps b/source/core/output_buffers/ut_output_data_row.tps index b0f5efe91..c5dd95e98 100644 --- a/source/core/output_buffers/ut_output_data_row.tps +++ b/source/core/output_buffers/ut_output_data_row.tps @@ -1,7 +1,7 @@ create or replace type ut_output_data_row as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/output_buffers/ut_output_data_rows.tps b/source/core/output_buffers/ut_output_data_rows.tps index 1918f0c81..097e9beff 100644 --- a/source/core/output_buffers/ut_output_data_rows.tps +++ b/source/core/output_buffers/ut_output_data_rows.tps @@ -1,7 +1,7 @@ create or replace type ut_output_data_rows as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/output_buffers/ut_output_table_buffer.tpb b/source/core/output_buffers/ut_output_table_buffer.tpb index e3f869b22..1809a49d5 100644 --- a/source/core/output_buffers/ut_output_table_buffer.tpb +++ b/source/core/output_buffers/ut_output_table_buffer.tpb @@ -1,7 +1,7 @@ create or replace type body ut_output_table_buffer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ create or replace type body ut_output_table_buffer is pragma autonomous_transaction; begin self.last_message_id := self.last_message_id + 1; - insert into ut_output_buffer_tmp(output_id, message_id, is_finished) + insert /*+ no_parallel */ into ut_output_buffer_tmp(output_id, message_id, is_finished) values (self.output_id, self.last_message_id, 1); commit; self.is_closed := 1; @@ -45,7 +45,7 @@ create or replace type body ut_output_table_buffer is ); else self.last_message_id := self.last_message_id + 1; - insert into ut_output_buffer_tmp(output_id, message_id, text, item_type) + insert /*+ no_parallel */ into ut_output_buffer_tmp(output_id, message_id, text, item_type) values (self.output_id, self.last_message_id, a_text, a_item_type); end if; commit; @@ -55,8 +55,8 @@ create or replace type body ut_output_table_buffer is overriding member procedure send_lines(self in out nocopy ut_output_table_buffer, a_text_list ut_varchar2_rows, a_item_type varchar2 := null) is pragma autonomous_transaction; begin - insert into ut_output_buffer_tmp(output_id, message_id, text, item_type) - select self.output_id, self.last_message_id + rownum, t.column_value, a_item_type + insert /*+ no_parallel */ into ut_output_buffer_tmp(output_id, message_id, text, item_type) + select /*+ no_parallel */ self.output_id, self.last_message_id + rownum, t.column_value, a_item_type from table(a_text_list) t where t.column_value is not null or a_item_type is not null; self.last_message_id := self.last_message_id + SQL%rowcount; @@ -76,7 +76,7 @@ create or replace type body ut_output_table_buffer is ); else self.last_message_id := self.last_message_id + 1; - insert into ut_output_buffer_tmp(output_id, message_id, text, item_type) + insert /*+ no_parallel */ into ut_output_buffer_tmp(output_id, message_id, text, item_type) values (self.output_id, self.last_message_id, a_text, a_item_type); end if; commit; @@ -107,8 +107,8 @@ create or replace type body ut_output_table_buffer is ) is pragma autonomous_transaction; begin - delete from ( - select * + delete /*+ no_parallel */ from ( + select /*+ no_parallel */ * from ut_output_buffer_tmp o where o.output_id = self.output_id and o.message_id <= a_max_message_id diff --git a/source/core/output_buffers/ut_output_table_buffer.tps b/source/core/output_buffers/ut_output_table_buffer.tps index 3e395304a..726b692f8 100644 --- a/source/core/output_buffers/ut_output_table_buffer.tps +++ b/source/core/output_buffers/ut_output_table_buffer.tps @@ -1,7 +1,7 @@ create or replace type ut_output_table_buffer under ut_output_buffer_base ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/session_context/ut_session_context.pkb b/source/core/session_context/ut_session_context.pkb index 427d722da..a97505e9c 100644 --- a/source/core/session_context/ut_session_context.pkb +++ b/source/core/session_context/ut_session_context.pkb @@ -1,7 +1,7 @@ create or replace package body ut_session_context as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -15,11 +15,7 @@ create or replace package body ut_session_context as See the License for the specific language governing permissions and limitations under the License. */ - $IF $$SELF_TESTING_INSTALL $THEN gc_context_name constant varchar2(30) := ut_utils.ut_owner()||'_INFO'; - $ELSE - gc_context_name constant varchar2(30) := 'UT3_INFO'; - $END procedure set_context(a_name varchar2, a_value varchar2) is begin diff --git a/source/core/session_context/ut_session_context.pks b/source/core/session_context/ut_session_context.pks index bbe256db4..63da3399e 100644 --- a/source/core/session_context/ut_session_context.pks +++ b/source/core/session_context/ut_session_context.pks @@ -1,7 +1,7 @@ create or replace package ut_session_context as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/session_context/ut_session_info.tpb b/source/core/session_context/ut_session_info.tpb index 2d3fdbed9..c7fe7dc5f 100644 --- a/source/core/session_context/ut_session_info.tpb +++ b/source/core/session_context/ut_session_info.tpb @@ -1,7 +1,7 @@ create or replace type body ut_session_info as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/session_context/ut_session_info.tps b/source/core/session_context/ut_session_info.tps index 863b0dc3e..17e596d88 100644 --- a/source/core/session_context/ut_session_info.tps +++ b/source/core/session_context/ut_session_info.tps @@ -1,7 +1,7 @@ create or replace type ut_session_info under ut_event_listener ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_console_reporter_base.tpb b/source/core/types/ut_console_reporter_base.tpb index df256e832..909e9355a 100644 --- a/source/core/types/ut_console_reporter_base.tpb +++ b/source/core/types/ut_console_reporter_base.tpb @@ -1,7 +1,7 @@ create or replace type body ut_console_reporter_base is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_console_reporter_base.tps b/source/core/types/ut_console_reporter_base.tps index 6c0a08502..a2c4b6b8c 100644 --- a/source/core/types/ut_console_reporter_base.tps +++ b/source/core/types/ut_console_reporter_base.tps @@ -1,7 +1,7 @@ create or replace type ut_console_reporter_base under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_coverage_options.tpb b/source/core/types/ut_coverage_options.tpb new file mode 100644 index 000000000..308c75553 --- /dev/null +++ b/source/core/types/ut_coverage_options.tpb @@ -0,0 +1,64 @@ +create or replace type body ut_coverage_options as + /* + utPLSQL - Version 3 + Copyright 2016 - 2021 utPLSQL Project + + Licensed under the Apache License, Version 2.0 (the "License"): + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + + constructor function ut_coverage_options( + self in out nocopy ut_coverage_options, + coverage_run_id raw, + schema_names ut_varchar2_rows := null, + exclude_objects ut_varchar2_rows := null, + include_objects ut_varchar2_rows := null, + file_mappings ut_file_mappings := null + ) return self as result is + function to_ut_object_list(a_names ut_varchar2_rows, a_schema_names ut_varchar2_rows) return ut_object_names is + l_result ut_object_names; + l_object_name ut_object_name; + begin + if a_names is not empty then + l_result := ut_object_names(); + for i in 1 .. a_names.count loop + l_object_name := ut_object_name(a_names(i)); + if l_object_name.owner is null then + for i in 1 .. cardinality(a_schema_names) loop + l_result.extend; + l_result(l_result.last) := ut_object_name(a_schema_names(i)||'.'||l_object_name.name); + end loop; + else + l_result.extend; + l_result(l_result.last) := l_object_name; + end if; + end loop; + end if; + return l_result; + end; + begin + self.coverage_run_id := coverage_run_id; + self.file_mappings := file_mappings; + self.schema_names := schema_names; + self.exclude_objects := ut_object_names(); + + if exclude_objects is not empty then + self.exclude_objects := to_ut_object_list(exclude_objects, self.schema_names); + end if; +-- self.exclude_objects := self.exclude_objects multiset union all ut_suite_manager.get_schema_ut_packages(schema_names); + + self.include_objects := to_ut_object_list(include_objects, self.schema_names); + + return; + end; +end; +/ diff --git a/source/core/types/ut_coverage_options.tps b/source/core/types/ut_coverage_options.tps index bcdbc0b32..1be518c5e 100644 --- a/source/core/types/ut_coverage_options.tps +++ b/source/core/types/ut_coverage_options.tps @@ -1,7 +1,7 @@ create or replace type ut_coverage_options force as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -16,9 +16,18 @@ create or replace type ut_coverage_options force as object ( limitations under the License. */ + coverage_run_id raw(32), schema_names ut_varchar2_rows, exclude_objects ut_object_names, include_objects ut_object_names, - file_mappings ut_file_mappings + file_mappings ut_file_mappings, + constructor function ut_coverage_options( + self in out nocopy ut_coverage_options, + coverage_run_id raw, + schema_names ut_varchar2_rows := null, + exclude_objects ut_varchar2_rows := null, + include_objects ut_varchar2_rows := null, + file_mappings ut_file_mappings := null + ) return self as result ) / diff --git a/source/core/types/ut_executable.tpb b/source/core/types/ut_executable.tpb index 826a5aaa1..d2ce9b79d 100644 --- a/source/core/types/ut_executable.tpb +++ b/source/core/types/ut_executable.tpb @@ -1,7 +1,7 @@ create or replace type body ut_executable is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_executable.tps b/source/core/types/ut_executable.tps index 786d926ad..aaa5a3a72 100644 --- a/source/core/types/ut_executable.tps +++ b/source/core/types/ut_executable.tps @@ -1,7 +1,7 @@ create or replace type ut_executable under ut_event_item( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_executable_test.tpb b/source/core/types/ut_executable_test.tpb index 6f25ea1c8..c5a7f29a1 100644 --- a/source/core/types/ut_executable_test.tpb +++ b/source/core/types/ut_executable_test.tpb @@ -1,7 +1,7 @@ create or replace type body ut_executable_test as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_executable_test.tps b/source/core/types/ut_executable_test.tps index 88500c9be..42b6080df 100644 --- a/source/core/types/ut_executable_test.tps +++ b/source/core/types/ut_executable_test.tps @@ -1,7 +1,7 @@ create or replace type ut_executable_test authid current_user under ut_executable ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_executables.tps b/source/core/types/ut_executables.tps index f5732d5a1..d6d52b3d2 100644 --- a/source/core/types/ut_executables.tps +++ b/source/core/types/ut_executables.tps @@ -1,7 +1,7 @@ create or replace type ut_executables as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_expectation_result.tpb b/source/core/types/ut_expectation_result.tpb index 9aa8b81c0..0b3adf983 100644 --- a/source/core/types/ut_expectation_result.tpb +++ b/source/core/types/ut_expectation_result.tpb @@ -1,7 +1,7 @@ create or replace type body ut_expectation_result is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_expectation_result.tps b/source/core/types/ut_expectation_result.tps index 815d90820..d4b4c7548 100644 --- a/source/core/types/ut_expectation_result.tps +++ b/source/core/types/ut_expectation_result.tps @@ -1,7 +1,7 @@ create or replace type ut_expectation_result under ut_event_item( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_expectation_results.tps b/source/core/types/ut_expectation_results.tps index 963c726f8..e5e4c6223 100644 --- a/source/core/types/ut_expectation_results.tps +++ b/source/core/types/ut_expectation_results.tps @@ -1,7 +1,7 @@ create or replace type ut_expectation_results as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_file_mapping.tpb b/source/core/types/ut_file_mapping.tpb index 247aa5ac8..dab1e35c5 100644 --- a/source/core/types/ut_file_mapping.tpb +++ b/source/core/types/ut_file_mapping.tpb @@ -1,7 +1,7 @@ create or replace type body ut_file_mapping as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_file_mapping.tps b/source/core/types/ut_file_mapping.tps index c032e0b77..941d95283 100644 --- a/source/core/types/ut_file_mapping.tps +++ b/source/core/types/ut_file_mapping.tps @@ -1,7 +1,7 @@ create or replace type ut_file_mapping as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_file_mappings.tps b/source/core/types/ut_file_mappings.tps index a48c3e872..240fb8dd7 100644 --- a/source/core/types/ut_file_mappings.tps +++ b/source/core/types/ut_file_mappings.tps @@ -1,7 +1,7 @@ create or replace type ut_file_mappings as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_integer_list.tps b/source/core/types/ut_integer_list.tps index 25f1679b2..ec9a2a78f 100644 --- a/source/core/types/ut_integer_list.tps +++ b/source/core/types/ut_integer_list.tps @@ -1,7 +1,7 @@ create or replace type ut_integer_list as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_key_value_pair.tps b/source/core/types/ut_key_value_pair.tps index 873a354fd..5a337e608 100644 --- a/source/core/types/ut_key_value_pair.tps +++ b/source/core/types/ut_key_value_pair.tps @@ -1,7 +1,7 @@ create or replace type ut_key_value_pair force as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_key_value_pairs.tps b/source/core/types/ut_key_value_pairs.tps index 28fa87cf0..24bdded36 100644 --- a/source/core/types/ut_key_value_pairs.tps +++ b/source/core/types/ut_key_value_pairs.tps @@ -1,7 +1,7 @@ create or replace type ut_key_value_pairs as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_logical_suite.tpb b/source/core/types/ut_logical_suite.tpb index 74c7ff81c..486cb83e7 100644 --- a/source/core/types/ut_logical_suite.tpb +++ b/source/core/types/ut_logical_suite.tpb @@ -1,7 +1,7 @@ create or replace type body ut_logical_suite as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_logical_suite.tps b/source/core/types/ut_logical_suite.tps index 71cfdb23d..0f816f26b 100644 --- a/source/core/types/ut_logical_suite.tps +++ b/source/core/types/ut_logical_suite.tps @@ -1,7 +1,7 @@ create or replace type ut_logical_suite under ut_suite_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_object_name.tpb b/source/core/types/ut_object_name.tpb index cf1ab2a78..76acc15bf 100644 --- a/source/core/types/ut_object_name.tpb +++ b/source/core/types/ut_object_name.tpb @@ -1,7 +1,7 @@ create or replace type body ut_object_name as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_object_name.tps b/source/core/types/ut_object_name.tps index 28e41958f..5f8f724c4 100644 --- a/source/core/types/ut_object_name.tps +++ b/source/core/types/ut_object_name.tps @@ -1,7 +1,7 @@ create or replace type ut_object_name as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_object_names.tps b/source/core/types/ut_object_names.tps index 2f7e5ea16..03830be17 100644 --- a/source/core/types/ut_object_names.tps +++ b/source/core/types/ut_object_names.tps @@ -1,7 +1,7 @@ create or replace type ut_object_names as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_output_reporter_base.tpb b/source/core/types/ut_output_reporter_base.tpb index c4ba73ba5..f6bb27b94 100644 --- a/source/core/types/ut_output_reporter_base.tpb +++ b/source/core/types/ut_output_reporter_base.tpb @@ -1,7 +1,7 @@ create or replace type body ut_output_reporter_base is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ create or replace type body ut_output_reporter_base is final member function get_lines(a_initial_timeout natural := null, a_timeout_sec natural) return ut_output_data_rows pipelined is begin - for i in (select value(x) val from table(self.output_buffer.get_lines(a_initial_timeout, a_timeout_sec)) x ) loop + for i in (select /*+ no_parallel */ value(x) val from table(self.output_buffer.get_lines(a_initial_timeout, a_timeout_sec)) x ) loop pipe row (i.val); end loop; end; diff --git a/source/core/types/ut_output_reporter_base.tps b/source/core/types/ut_output_reporter_base.tps index 01350208a..22f507f8d 100644 --- a/source/core/types/ut_output_reporter_base.tps +++ b/source/core/types/ut_output_reporter_base.tps @@ -1,7 +1,7 @@ create or replace type ut_output_reporter_base under ut_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_reporter_base.tpb b/source/core/types/ut_reporter_base.tpb index 94d518af4..3f8984331 100644 --- a/source/core/types/ut_reporter_base.tpb +++ b/source/core/types/ut_reporter_base.tpb @@ -1,7 +1,7 @@ create or replace type body ut_reporter_base is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_reporter_base.tps b/source/core/types/ut_reporter_base.tps index 36af70776..de157136e 100644 --- a/source/core/types/ut_reporter_base.tps +++ b/source/core/types/ut_reporter_base.tps @@ -1,7 +1,7 @@ create or replace type ut_reporter_base under ut_event_listener ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_reporter_info.tps b/source/core/types/ut_reporter_info.tps index d1f159211..f09c42e07 100644 --- a/source/core/types/ut_reporter_info.tps +++ b/source/core/types/ut_reporter_info.tps @@ -1,7 +1,7 @@ create or replace type ut_reporter_info as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_reporters.tps b/source/core/types/ut_reporters.tps index b16e74653..a2802bb26 100644 --- a/source/core/types/ut_reporters.tps +++ b/source/core/types/ut_reporters.tps @@ -1,7 +1,7 @@ create or replace type ut_reporters as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_reporters_info.tps b/source/core/types/ut_reporters_info.tps index 6e9a866ef..82c264f36 100644 --- a/source/core/types/ut_reporters_info.tps +++ b/source/core/types/ut_reporters_info.tps @@ -1,7 +1,7 @@ create or replace type ut_reporters_info as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_results_counter.tpb b/source/core/types/ut_results_counter.tpb index 0007acd9b..811389e0e 100644 --- a/source/core/types/ut_results_counter.tpb +++ b/source/core/types/ut_results_counter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_results_counter as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_results_counter.tps b/source/core/types/ut_results_counter.tps index 1b26b673a..913ae0967 100644 --- a/source/core/types/ut_results_counter.tps +++ b/source/core/types/ut_results_counter.tps @@ -1,7 +1,7 @@ create or replace type ut_results_counter as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_run.tpb b/source/core/types/ut_run.tpb index bff16dc69..258396427 100644 --- a/source/core/types/ut_run.tpb +++ b/source/core/types/ut_run.tpb @@ -1,7 +1,7 @@ create or replace type body ut_run as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -18,12 +18,9 @@ create or replace type body ut_run as constructor function ut_run( self in out nocopy ut_run, - a_items ut_suite_items, + a_items ut_suite_items := null, a_run_paths ut_varchar2_list := null, - a_schema_names ut_varchar2_rows := null, - a_exclude_objects ut_object_names := null, - a_include_objects ut_object_names := null, - a_project_file_mappings ut_file_mappings := null, + a_coverage_options ut_coverage_options := null, a_test_file_mappings ut_file_mappings := null, a_client_character_set varchar2 := null, a_random_test_order_seed positive := null, @@ -38,12 +35,7 @@ create or replace type body ut_run as self.random_test_order_seed := a_random_test_order_seed; self.results_count := ut_results_counter(); self.test_file_mappings := coalesce(a_test_file_mappings, ut_file_mappings()); - self.coverage_options := ut_coverage_options( - a_schema_names, - a_exclude_objects, - a_include_objects, - a_project_file_mappings - ); + self.coverage_options := a_coverage_options; return; end; diff --git a/source/core/types/ut_run.tps b/source/core/types/ut_run.tps index 2a4e11656..f556934ce 100644 --- a/source/core/types/ut_run.tps +++ b/source/core/types/ut_run.tps @@ -1,7 +1,7 @@ create or replace type ut_run under ut_suite_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -28,12 +28,9 @@ create or replace type ut_run under ut_suite_item ( random_test_order_seed number(38,0), constructor function ut_run( self in out nocopy ut_run, - a_items ut_suite_items, + a_items ut_suite_items := null, a_run_paths ut_varchar2_list := null, - a_schema_names ut_varchar2_rows := null, - a_exclude_objects ut_object_names := null, - a_include_objects ut_object_names := null, - a_project_file_mappings ut_file_mappings := null, + a_coverage_options ut_coverage_options := null, a_test_file_mappings ut_file_mappings := null, a_client_character_set varchar2 := null, a_random_test_order_seed positive := null, diff --git a/source/core/types/ut_run_info.tpb b/source/core/types/ut_run_info.tpb index 8e06d6137..6edc0f109 100644 --- a/source/core/types/ut_run_info.tpb +++ b/source/core/types/ut_run_info.tpb @@ -1,7 +1,7 @@ create or replace type body ut_run_info as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -20,27 +20,27 @@ create or replace type body ut_run_info as begin self.self_type := $$plsql_unit; execute immediate - 'select '||l_ut_owner||'.ut.version() from dual' + 'select /*+ no_parallel */ '||l_ut_owner||'.ut.version() from dual' into self.ut_version; dbms_utility.db_version( self.db_version, self.db_compatibility ); db_os_type := dbms_utility.port_string(); execute immediate - 'select '||l_ut_owner||'.ut_key_value_pair(x.product, x.version) from product_component_version x' + 'select /*+ no_parallel */ '||l_ut_owner||'.ut_key_value_pair(x.product, x.version) from product_component_version x' bulk collect into self.db_component_version; execute immediate - 'select '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) + 'select /*+ no_parallel */ '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) from nls_session_parameters x' bulk collect into self.nls_session_params; execute immediate - 'select '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) from nls_instance_parameters x' + 'select /*+ no_parallel */ '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) from nls_instance_parameters x' bulk collect into self.nls_instance_params; execute immediate - 'select '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) from nls_database_parameters x' + 'select /*+ no_parallel */ '||l_ut_owner||'.ut_key_value_pair(x.parameter, x.value) from nls_database_parameters x' bulk collect into self.nls_db_params; return; end; diff --git a/source/core/types/ut_run_info.tps b/source/core/types/ut_run_info.tps index f59c22c05..4a3da691f 100644 --- a/source/core/types/ut_run_info.tps +++ b/source/core/types/ut_run_info.tps @@ -1,7 +1,7 @@ create or replace type ut_run_info under ut_event_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite.tpb b/source/core/types/ut_suite.tpb index baaaf044d..2ec1c9ccd 100644 --- a/source/core/types/ut_suite.tpb +++ b/source/core/types/ut_suite.tpb @@ -1,7 +1,7 @@ create or replace type body ut_suite as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite.tps b/source/core/types/ut_suite.tps index ffe2d2d42..ff7f3e171 100644 --- a/source/core/types/ut_suite.tps +++ b/source/core/types/ut_suite.tps @@ -1,7 +1,7 @@ create or replace type ut_suite under ut_logical_suite ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_cache_row.tps b/source/core/types/ut_suite_cache_row.tps index d9f542de3..9c5990bfd 100644 --- a/source/core/types/ut_suite_cache_row.tps +++ b/source/core/types/ut_suite_cache_row.tps @@ -1,7 +1,7 @@ create type ut_suite_cache_row as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_cache_rows.tps b/source/core/types/ut_suite_cache_rows.tps index 660f934cf..9b6919df5 100644 --- a/source/core/types/ut_suite_cache_rows.tps +++ b/source/core/types/ut_suite_cache_rows.tps @@ -1,7 +1,7 @@ create type ut_suite_cache_rows as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_context.tpb b/source/core/types/ut_suite_context.tpb index 3669d3d7e..be92e6fc9 100644 --- a/source/core/types/ut_suite_context.tpb +++ b/source/core/types/ut_suite_context.tpb @@ -1,7 +1,7 @@ create or replace type body ut_suite_context as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_context.tps b/source/core/types/ut_suite_context.tps index a328e7657..5e3d20f87 100644 --- a/source/core/types/ut_suite_context.tps +++ b/source/core/types/ut_suite_context.tps @@ -1,7 +1,7 @@ create or replace type ut_suite_context under ut_suite ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_item.tpb b/source/core/types/ut_suite_item.tpb index 9b939727a..12f857cba 100644 --- a/source/core/types/ut_suite_item.tpb +++ b/source/core/types/ut_suite_item.tpb @@ -1,7 +1,7 @@ create or replace type body ut_suite_item as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_item.tps b/source/core/types/ut_suite_item.tps index 87f577459..d96ec8c30 100644 --- a/source/core/types/ut_suite_item.tps +++ b/source/core/types/ut_suite_item.tps @@ -1,7 +1,7 @@ create or replace type ut_suite_item force under ut_event_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_suite_items.tps b/source/core/types/ut_suite_items.tps index e80bcc7b4..615283446 100644 --- a/source/core/types/ut_suite_items.tps +++ b/source/core/types/ut_suite_items.tps @@ -1,7 +1,7 @@ create or replace type ut_suite_items as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_test.tpb b/source/core/types/ut_test.tpb index 4ed3f665e..9a36205c1 100644 --- a/source/core/types/ut_test.tpb +++ b/source/core/types/ut_test.tpb @@ -1,7 +1,7 @@ create or replace type body ut_test as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_test.tps b/source/core/types/ut_test.tps index 85caf7380..07958ec0f 100644 --- a/source/core/types/ut_test.tps +++ b/source/core/types/ut_test.tps @@ -1,7 +1,7 @@ create or replace type ut_test force under ut_suite_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_varchar2_list.tps b/source/core/types/ut_varchar2_list.tps index dd15f0d8f..f0b5df509 100644 --- a/source/core/types/ut_varchar2_list.tps +++ b/source/core/types/ut_varchar2_list.tps @@ -1,7 +1,7 @@ create or replace type ut_varchar2_list as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/types/ut_varchar2_rows.tps b/source/core/types/ut_varchar2_rows.tps index d56eeee46..e7fa29c29 100644 --- a/source/core/types/ut_varchar2_rows.tps +++ b/source/core/types/ut_varchar2_rows.tps @@ -1,7 +1,7 @@ create or replace type ut_varchar2_rows as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_dbms_output_cache.sql b/source/core/ut_dbms_output_cache.sql index 1fe4251c7..e61b403c8 100644 --- a/source/core/ut_dbms_output_cache.sql +++ b/source/core/ut_dbms_output_cache.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 -Copyright 2016 - 2019 utPLSQL Project +Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -19,7 +19,7 @@ limitations under the License. declare l_tab_exist number; begin - select count(*) into l_tab_exist from + select /*+ no_parallel */ count(*) into l_tab_exist from (select table_name from all_tables where table_name = 'UT_DBMS_OUTPUT_CACHE' and owner = sys_context('USERENV','CURRENT_SCHEMA') union all select synonym_name from all_synonyms where synonym_name = 'UT_DBMS_OUTPUT_CACHE' and owner = sys_context('USERENV','CURRENT_SCHEMA')); diff --git a/source/core/ut_expectation_processor.pkb b/source/core/ut_expectation_processor.pkb index d65d210c8..a03a28965 100644 --- a/source/core/ut_expectation_processor.pkb +++ b/source/core/ut_expectation_processor.pkb @@ -1,7 +1,7 @@ create or replace package body ut_expectation_processor as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -104,7 +104,7 @@ create or replace package body ut_expectation_processor as function get_session_parameters return tt_nls_params is l_session_params tt_nls_params; begin - select nsp.parameter, nsp.value + select /*+ no_parallel */ nsp.parameter, nsp.value bulk collect into l_session_params from nls_session_parameters nsp where parameter diff --git a/source/core/ut_expectation_processor.pks b/source/core/ut_expectation_processor.pks index cfcae8b42..dd9187526 100644 --- a/source/core/ut_expectation_processor.pks +++ b/source/core/ut_expectation_processor.pks @@ -1,7 +1,7 @@ create or replace package ut_expectation_processor authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_file_mapper.pkb b/source/core/ut_file_mapper.pkb index adecb7dc8..425360533 100644 --- a/source/core/ut_file_mapper.pkb +++ b/source/core/ut_file_mapper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_file_mapper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_file_mapper.pks b/source/core/ut_file_mapper.pks index 4ed670ee5..adc4c983f 100644 --- a/source/core/ut_file_mapper.pks +++ b/source/core/ut_file_mapper.pks @@ -1,7 +1,7 @@ create or replace package ut_file_mapper authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_metadata.pkb b/source/core/ut_metadata.pkb index 5448f1b5f..700c0efb0 100644 --- a/source/core/ut_metadata.pkb +++ b/source/core/ut_metadata.pkb @@ -1,7 +1,7 @@ create or replace package body ut_metadata as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ create or replace package body ut_metadata as l_view_name varchar2(200) := get_objects_view_name; begin - execute immediate q'[select count(*) + execute immediate q'[select /*+ no_parallel */ count(*) from ]'||l_view_name||q'[ where owner = :a_owner_name and object_name = :a_package_name @@ -58,7 +58,7 @@ create or replace package body ut_metadata as l_view_name varchar2(200) := get_dba_view('dba_procedures'); begin execute immediate - 'select count(*) from '||l_view_name + 'select /*+ no_parallel */ count(*) from '||l_view_name ||' where owner = :l_schema and object_name = :l_package_name and procedure_name = :l_procedure_name and rownum = 1' into l_cnt using a_owner_name, a_package_name, a_procedure_name; @@ -77,7 +77,7 @@ create or replace package body ut_metadata as if not nvl(c_key = g_cached_object, false) then g_cached_object := c_key; execute immediate - 'select trim(text) text + 'select /*+ no_parallel */ trim(text) text from '||l_view_name||q'[ s where s.owner = :a_owner and s.name = :a_object_name @@ -121,9 +121,26 @@ create or replace package body ut_metadata as end; function user_has_execute_any_proc return boolean is - l_ut_owner varchar2(250) := ut_utils.ut_owner; + l_has_execute_any varchar2(1); begin - return is_object_visible(l_ut_owner||'.ut_utils') and sys_context('userenv','current_schema') != l_ut_owner; + select /*+ no_parallel */ decode( count( 1 ), 0, 'N', 'Y' ) + into l_has_execute_any + from dual + where + exists( + select 1 + from + role_sys_privs + join session_roles + using ( role ) + where privilege = 'EXECUTE ANY PROCEDURE' + ) or + exists( + select 1 + from user_sys_privs + where privilege = 'EXECUTE ANY PROCEDURE' + ); + return l_has_execute_any = 'Y'; end; function is_object_visible(a_object_name varchar2) return boolean is @@ -140,7 +157,7 @@ create or replace package body ut_metadata as l_cnt number; c_current_schema constant all_tables.owner%type := sys_context('USERENV','CURRENT_SCHEMA'); begin - select count(*) + select /*+ no_parallel */ count(*) into l_cnt from all_objects t where t.object_name = a_object_name diff --git a/source/core/ut_metadata.pks b/source/core/ut_metadata.pks index bf62c4e52..27bfa5d30 100644 --- a/source/core/ut_metadata.pks +++ b/source/core/ut_metadata.pks @@ -1,7 +1,7 @@ create or replace package ut_metadata authid current_user as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_savepoint_seq.sql b/source/core/ut_savepoint_seq.sql index b87d18e6d..5b0cda35e 100644 --- a/source/core/ut_savepoint_seq.sql +++ b/source/core/ut_savepoint_seq.sql @@ -1,7 +1,7 @@ create sequence ut_savepoint_seq /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index d13cbaed9..2dac6b4ad 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -1,7 +1,7 @@ create or replace package body ut_suite_builder is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_suite_builder.pks b/source/core/ut_suite_builder.pks index e982fdbc1..352601a6d 100644 --- a/source/core/ut_suite_builder.pks +++ b/source/core/ut_suite_builder.pks @@ -1,7 +1,7 @@ create or replace package ut_suite_builder authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_suite_cache.sql b/source/core/ut_suite_cache.sql index a7f998f83..182caabd0 100644 --- a/source/core/ut_suite_cache.sql +++ b/source/core/ut_suite_cache.sql @@ -1,7 +1,7 @@ create table ut_suite_cache /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/ut_suite_cache_manager.pkb b/source/core/ut_suite_cache_manager.pkb index 7c4b1ee93..0ae8d7104 100644 --- a/source/core/ut_suite_cache_manager.pkb +++ b/source/core/ut_suite_cache_manager.pkb @@ -1,7 +1,7 @@ create or replace package body ut_suite_cache_manager is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -79,7 +79,7 @@ create or replace package body ut_suite_cache_manager is union all select obj from logical_suites ) - select c.obj + select /*+ no_parallel */ c.obj from items c order by c.obj.object_owner,{:random_seed:}]'; @@ -89,7 +89,7 @@ create or replace package body ut_suite_cache_manager is begin l_data := ut_annotation_cache_manager.get_cached_objects_list(a_object_owner, 'PACKAGE'); - select i.object_name + select /*+ no_parallel */ i.object_name bulk collect into l_result from ut_suite_cache_package i where not exists ( @@ -161,15 +161,18 @@ create or replace package body ut_suite_cache_manager is begin return case when a_random_seed is null then q'[ - replace( - --suite path until objects name (excluding contexts and test path) with trailing dot (full stop) - substr( c.obj.path, 1, instr( c.obj.path, lower(c.obj.object_name), -1 ) + length(c.obj.object_name) ), - '.', - --'.' replaced with chr(0) to assure that child elements come before parent when sorting in descending oder - chr(0) - ) desc nulls last, + nlssort( + replace( + /*suite path until objects name (excluding contexts and test path) with trailing dot (full stop)*/ + substr( c.obj.path, 1, instr( c.obj.path, lower(c.obj.object_name), -1 ) + length(c.obj.object_name) ), + '.', + /*'.' replaced with chr(0) to assure that child elements come before parent when sorting in descending order*/ + chr(0) + ), + 'nls_sort=binary' + )desc nulls last, case when c.obj.self_type = 'UT_SUITE_CONTEXT' then - ( select max( x.line_no ) + 1 + ( select /*+ no_parallel */ max( x.line_no ) + 1 from ut_suite_cache x where c.obj.object_owner = x.object_owner and c.obj.object_name = x.object_name @@ -178,7 +181,7 @@ create or replace package body ut_suite_cache_manager is else c.obj.line_no end, - --assures that child contexts come before parent contexts + /*assures that child contexts come before parent contexts*/ regexp_count(c.obj.path,'\.') desc, :a_random_seed]' else @@ -213,18 +216,18 @@ create or replace package body ut_suite_cache_manager is l_procedure_name varchar2(250) := ut_utils.qualified_sql_name(a_procedure_name); begin - select column_value + select /*+ no_parallel */ column_value bulk collect into l_include_tags from table(l_tags) where column_value not like '-%'; - select ltrim(column_value,'-') + select /*+ no_parallel */ ltrim(column_value,'-') bulk collect into l_exclude_tags from table(l_tags) where column_value like '-%'; if a_path is null and a_object_name is not null then - select min(c.path) + select /*+ no_parallel */ min(c.path) into l_path from ut_suite_cache c where c.object_owner = upper(l_object_owner) @@ -255,7 +258,7 @@ create or replace package body ut_suite_cache_manager is function get_schema_parse_time(a_schema_name varchar2) return timestamp result_cache is l_cache_parse_time timestamp; begin - select min(t.parse_time) + select /*+ no_parallel */ min(t.parse_time) into l_cache_parse_time from ut_suite_cache_schema t where object_owner = upper(a_schema_name); @@ -285,7 +288,7 @@ create or replace package body ut_suite_cache_manager is else - select min(parse_time) + select /*+ no_parallel */ min(parse_time) into l_cached_parse_time from ut_suite_cache_package t where t.object_name = l_object_name @@ -293,23 +296,23 @@ create or replace package body ut_suite_cache_manager is if a_parse_time > l_cached_parse_time or l_cached_parse_time is null then - update ut_suite_cache_schema t + update /*+ no_parallel */ ut_suite_cache_schema t set t.parse_time = a_parse_time where object_owner = l_object_owner; if sql%rowcount = 0 then - insert into ut_suite_cache_schema + insert /*+ no_parallel */ into ut_suite_cache_schema (object_owner, parse_time) values (l_object_owner, a_parse_time); end if; - update ut_suite_cache_package t + update /*+ no_parallel */ ut_suite_cache_package t set t.parse_time = a_parse_time where t.object_owner = l_object_owner and t.object_name = l_object_name; if sql%rowcount = 0 then - insert into ut_suite_cache_package + insert /*+ no_parallel */ into ut_suite_cache_package (object_owner, object_name, parse_time) values (l_object_owner, l_object_name, a_parse_time ); end if; @@ -318,7 +321,7 @@ create or replace package body ut_suite_cache_manager is where t.object_owner = l_object_owner and t.object_name = l_object_name; - insert into ut_suite_cache t + insert /*+ no_parallel */ into ut_suite_cache t ( id, self_type, path, object_owner, object_name, name, line_no, parse_time, description, @@ -333,7 +336,7 @@ create or replace package body ut_suite_cache_manager is select treat(value(x) as ut_suite) i from table(a_suite_items) x where x.self_type in( 'UT_SUITE', 'UT_SUITE_CONTEXT' ) ) - select ut_suite_cache_seq.nextval, s.i.self_type as self_type, s.i.path as path, + select /*+ no_parallel */ ut_suite_cache_seq.nextval, s.i.self_type as self_type, s.i.path as path, upper(s.i.object_owner) as object_owner, upper(s.i.object_name) as object_name, upper(s.i.name) as name, s.i.line_no as line_no, s.i.parse_time as parse_time, s.i.description as description, s.i.rollback_type as rollback_type, s.i.disabled_flag as disabled_flag, s.i.warnings as warnings, @@ -344,7 +347,7 @@ create or replace package body ut_suite_cache_manager is null item from suites s; - insert into ut_suite_cache t + insert /*+ no_parallel */ into ut_suite_cache t ( id, self_type, path, object_owner, object_name, name, line_no, parse_time, description, @@ -359,7 +362,7 @@ create or replace package body ut_suite_cache_manager is select treat(value(x) as ut_test) t from table ( a_suite_items ) x where x.self_type in ( 'UT_TEST' ) ) - select ut_suite_cache_seq.nextval, s.t.self_type as self_type, s.t.path as path, + select /*+ no_parallel */ ut_suite_cache_seq.nextval, s.t.self_type as self_type, s.t.path as path, upper(s.t.object_owner) as object_owner, upper(s.t.object_name) as object_name, upper(s.t.name) as name, s.t.line_no as line_no, s.t.parse_time as parse_time, s.t.description as description, s.t.rollback_type as rollback_type, s.t.disabled_flag as disabled_flag, s.t.warnings as warnings, @@ -382,13 +385,13 @@ create or replace package body ut_suite_cache_manager is l_objects := get_missing_cache_objects(a_schema_name); if l_objects is not empty then - delete from ut_suite_cache i + delete /*+ no_parallel */ from ut_suite_cache i where i.object_owner = a_schema_name - and i.object_name in ( select column_value from table (l_objects) ); + and i.object_name in ( select /*+ no_parallel */ column_value from table (l_objects) ); - delete from ut_suite_cache_package i + delete /*+ no_parallel */ from ut_suite_cache_package i where i.object_owner = a_schema_name - and i.object_name in ( select column_value from table (l_objects) ); + and i.object_name in ( select /*+ no_parallel */ column_value from table (l_objects) ); end if; commit; @@ -402,7 +405,7 @@ create or replace package body ut_suite_cache_manager is l_results ut_suite_items_info; begin l_cache_rows := get_cached_suite_rows( a_object_owner => a_object_owner, a_object_name =>a_object_name ); - select ut_suite_item_info( + select /*+ no_parallel */ ut_suite_item_info( c.object_owner, c.object_name, c.name, c.description, c.self_type, c.line_no, c.path, c.disabled_flag, c.tags @@ -418,7 +421,7 @@ create or replace package body ut_suite_cache_manager is ) return ut_object_names is l_results ut_object_names; begin - select ut_object_name( c.object_owner, c.object_name ) + select /*+ no_parallel */ ut_object_name( c.object_owner, c.object_name ) bulk collect into l_results from ut_suite_cache_package c join table ( a_schema_names ) s @@ -434,7 +437,7 @@ create or replace package body ut_suite_cache_manager is l_count integer; begin if a_procedure_name is not null then - select count( 1 ) into l_count from dual + select /*+ no_parallel */ count( 1 ) into l_count from dual where exists( select 1 from ut_suite_cache c @@ -443,7 +446,7 @@ create or replace package body ut_suite_cache_manager is and c.name = a_procedure_name ); elsif a_package_name is not null then - select count( 1 ) into l_count from dual + select /*+ no_parallel */ count( 1 ) into l_count from dual where exists( select 1 from ut_suite_cache c @@ -451,7 +454,7 @@ create or replace package body ut_suite_cache_manager is and c.object_name = a_package_name ); else - select count( 1 ) into l_count from dual + select /*+ no_parallel */ count( 1 ) into l_count from dual where exists( select 1 from ut_suite_cache c diff --git a/source/core/ut_suite_cache_manager.pks b/source/core/ut_suite_cache_manager.pks index d5b31ccee..0a38851fe 100644 --- a/source/core/ut_suite_cache_manager.pks +++ b/source/core/ut_suite_cache_manager.pks @@ -1,7 +1,7 @@ create or replace package ut_suite_cache_manager authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_suite_cache_package.sql b/source/core/ut_suite_cache_package.sql index 06f786949..7a146ff83 100644 --- a/source/core/ut_suite_cache_package.sql +++ b/source/core/ut_suite_cache_package.sql @@ -1,7 +1,7 @@ create table ut_suite_cache_package ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/ut_suite_cache_schema.sql b/source/core/ut_suite_cache_schema.sql index 46c7b0ef3..636816e65 100644 --- a/source/core/ut_suite_cache_schema.sql +++ b/source/core/ut_suite_cache_schema.sql @@ -1,7 +1,7 @@ create table ut_suite_cache_schema ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/ut_suite_cache_seq.sql b/source/core/ut_suite_cache_seq.sql index 36de28809..e1e560286 100644 --- a/source/core/ut_suite_cache_seq.sql +++ b/source/core/ut_suite_cache_seq.sql @@ -1,7 +1,7 @@ create sequence ut_suite_cache_seq /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/core/ut_suite_manager.pkb b/source/core/ut_suite_manager.pkb index ee5063105..8a5bcb9b8 100644 --- a/source/core/ut_suite_manager.pkb +++ b/source/core/ut_suite_manager.pkb @@ -1,7 +1,7 @@ create or replace package body ut_suite_manager is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -353,10 +353,10 @@ create or replace package body ut_suite_manager is ); if a_skip_all_objects then open l_result for - select c.* from table(l_unfiltered_rows) c; + select /*+ no_parallel */ c.* from table(l_unfiltered_rows) c; else open l_result for - select c.* from table(l_unfiltered_rows) c + select /*+ no_parallel */ c.* from table(l_unfiltered_rows) c where exists ( select 1 from all_objects a @@ -374,7 +374,7 @@ create or replace package body ut_suite_manager is a_owner_name varchar2 ) return boolean is begin - return sys_context( 'userenv', 'current_schema' ) = a_owner_name or ut_metadata.user_has_execute_any_proc(); + return sys_context( 'userenv', 'current_user' ) = upper(a_owner_name) or ut_metadata.user_has_execute_any_proc(); end; procedure build_and_cache_suites( @@ -425,17 +425,18 @@ create or replace package body ut_suite_manager is ) is l_annotations_cursor sys_refcursor; l_suite_cache_time timestamp; + l_owner_name varchar2(128) := upper(a_owner_name); begin ut_event_manager.trigger_event('refresh_cache - start'); - l_suite_cache_time := ut_suite_cache_manager.get_schema_parse_time(a_owner_name); + l_suite_cache_time := ut_suite_cache_manager.get_schema_parse_time(l_owner_name); l_annotations_cursor := ut_annotation_manager.get_annotated_objects( - a_owner_name, 'PACKAGE', l_suite_cache_time + l_owner_name, 'PACKAGE', l_suite_cache_time ); - build_and_cache_suites(a_owner_name, l_annotations_cursor); + build_and_cache_suites(l_owner_name, l_annotations_cursor); - if can_skip_all_objects_scan(a_owner_name) or ut_metadata.is_object_visible( 'dba_objects') then - ut_suite_cache_manager.remove_missing_objs_from_cache( a_owner_name ); + if can_skip_all_objects_scan(l_owner_name) or ut_metadata.is_object_visible( 'dba_objects') then + ut_suite_cache_manager.remove_missing_objs_from_cache( l_owner_name ); end if; ut_event_manager.trigger_event('refresh_cache - end'); @@ -595,12 +596,12 @@ create or replace package body ut_suite_manager is l_all_suite_info := ut_suite_cache_manager.get_cached_suite_info( l_owner_name, l_package_name ); if can_skip_all_objects_scan( l_owner_name ) then open l_result for - select value(c) + select /*+ no_parallel */ value(c) from table(l_all_suite_info) c order by c.object_owner, c.object_name, c.item_line_no; else open l_result for - select value(c) + select /*+ no_parallel */ value(c) from table(l_all_suite_info) c where exists ( select 1 @@ -630,7 +631,7 @@ create or replace package body ut_suite_manager is refresh_cache(l_owner_name); l_item_exists := ut_suite_cache_manager.suite_item_exists( l_owner_name, l_package_name, l_procedure_name ); if not can_skip_all_objects_scan( l_owner_name ) and l_package_name is not null then - select count(1) + select /*+ no_parallel */ count(1) into l_count from dual c where exists diff --git a/source/core/ut_suite_manager.pks b/source/core/ut_suite_manager.pks index 093201b36..5ae98d72a 100644 --- a/source/core/ut_suite_manager.pks +++ b/source/core/ut_suite_manager.pks @@ -1,7 +1,7 @@ create or replace package ut_suite_manager authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 87a14763c..f76a2668d 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -1,7 +1,7 @@ create or replace package body ut_utils is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -229,6 +229,19 @@ create or replace package body ut_utils is return l_result; end; + function string_table_to_table(a_list ut_varchar2_list, a_delimiter varchar2:= chr(10), a_skip_leading_delimiter varchar2 := 'N') return ut_varchar2_list is + l_result ut_varchar2_list; + begin + if a_delimiter is null then + l_result := a_list; + elsif a_list is not empty then + for i in 1 .. a_list.count loop + ut_utils.append_to_list(l_result, ut_utils.string_to_table(a_list(i), a_delimiter, a_skip_leading_delimiter) ); + end loop; + end if; + return l_result; + end; + function clob_to_table(a_clob clob, a_max_amount integer := 8191, a_delimiter varchar2:= chr(10)) return ut_varchar2_list is l_offset integer := 1; l_length integer := dbms_lob.getlength(a_clob); @@ -337,7 +350,7 @@ create or replace package body ut_utils is function get_utplsql_objects_list return ut_object_names is l_result ut_object_names; begin - select distinct ut_object_name(sys_context('userenv','current_user'), o.object_name) + select /*+ no_parallel */ distinct ut_object_name(sys_context('userenv','current_user'), o.object_name) bulk collect into l_result from user_objects o where o.object_name = 'UT' or object_name like 'UT\_%' escape '\' @@ -369,6 +382,19 @@ create or replace package body ut_utils is end if; end; + procedure append_to_list(a_list in out nocopy ut_varchar2_list, a_items ut_varchar2_list) is + begin + if a_items is not null then + if a_list is null then + a_list := ut_varchar2_list(); + end if; + for i in 1 .. a_items.count loop + a_list.extend; + a_list(a_list.last) := a_items(i); + end loop; + end if; + end; + procedure append_to_list(a_list in out nocopy ut_varchar2_rows, a_item clob) is begin append_to_list( @@ -479,13 +505,6 @@ create or replace package body ut_utils is return l_xpath; end; - procedure cleanup_session_temp_tables is - begin - execute immediate 'truncate table dbmspcc_blocks'; - execute immediate 'truncate table dbmspcc_units'; - execute immediate 'truncate table dbmspcc_runs'; - end; - function to_version(a_version_no varchar2) return t_version is l_result t_version; c_version_part_regex constant varchar2(20) := '[0-9]+'; @@ -513,8 +532,8 @@ create or replace package body ut_utils is procedure flush_lines(a_lines ut_varchar2_rows, a_offset integer) is begin if a_lines is not empty then - insert into ut_dbms_output_cache (seq_no,text) - select rownum+a_offset, column_value + insert /*+ no_parallel */ into ut_dbms_output_cache (seq_no,text) + select /*+ no_parallel */ rownum+a_offset, column_value from table(a_lines); end if; end; @@ -539,7 +558,7 @@ create or replace package body ut_utils is c_lines_limit constant integer := 10000; pragma autonomous_transaction; begin - open l_lines_data for select text from ut_dbms_output_cache order by seq_no; + open l_lines_data for select /*+ no_parallel */ text from ut_dbms_output_cache order by seq_no; loop fetch l_lines_data bulk collect into l_lines limit c_lines_limit; for i in 1 .. l_lines.count loop @@ -627,10 +646,10 @@ create or replace package body ut_utils is function xmlgen_escaped_string(a_string in varchar2) return varchar2 is l_result varchar2(4000) := a_string; - l_sql varchar2(32767) := q'!select q'[!'||a_string||q'!]' as "!'||a_string||'" from dual'; + l_sql varchar2(32767) := q'!select /*+ no_parallel */ q'[!'||a_string||q'!]' as "!'||a_string||'" from dual'; begin if a_string is not null then - select extract(dbms_xmlgen.getxmltype(l_sql),'/*/*/*').getRootElement() + select /*+ no_parallel */ extract(dbms_xmlgen.getxmltype(l_sql),'/*/*/*').getRootElement() into l_result from dual; end if; @@ -734,7 +753,7 @@ create or replace package body ut_utils is l_for_reporters := ut_reporters_info(ut_reporter_info('UT_REPORTER_BASE','N','N','N')); end if; - select /*+ cardinality(f 10) */ + select /*+ no_parallel cardinality(f 10) */ ut_reporter_info( object_name => t.type_name, is_output_reporter => @@ -769,7 +788,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.10.3347 + * secion v3.1.11.3557 */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin @@ -782,7 +801,7 @@ create or replace package body ut_utils is function build_valid_xml_name(a_preprocessed_name varchar2) return varchar2 is l_post_processed varchar2(4000); begin - for i in (select regexp_substr( a_preprocessed_name ,'(.{1})', 1, level, null, 1 ) AS string_char,level level_no + for i in (select /*+ no_parallel */ regexp_substr( a_preprocessed_name ,'(.{1})', 1, level, null, 1 ) AS string_char,level level_no from dual connect by level <= regexp_count(a_preprocessed_name, '(.{1})')) loop if i.level_no = 1 and regexp_like(i.string_char,gc_invalid_first_xml_char) then @@ -827,6 +846,9 @@ create or replace package body ut_utils is begin if a_clob is not null and a_clob != empty_clob() then l_result := replace( a_clob, gc_cdata_end_tag, gc_cdata_end_tag_wrap ); + l_result := to_clob(gc_cdata_start_tag) + || replace( a_clob, gc_cdata_end_tag, gc_cdata_end_tag_wrap ) + || to_clob(gc_cdata_end_tag); else l_result := a_clob; end if; diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index bd017020a..a2c3bb4d7 100644 --- a/source/core/ut_utils.pks +++ b/source/core/ut_utils.pks @@ -1,7 +1,7 @@ create or replace package ut_utils authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is * */ - gc_version constant varchar2(50) := 'v3.1.10.3347'; + gc_version constant varchar2(50) := 'v3.1.11.3557'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; @@ -216,8 +216,10 @@ create or replace package ut_utils authid definer is * * Splits a given string into table of string by delimiter. * The delimiter gets removed. - * If null passed as any of the parameters, empty table is returned. - * If no occurence of a_delimiter found in a_text then text is returned as a single row of the table. + * If null a_string passed, empty table is returned. + * If null a_delimiter passed, a_string is returned as element of result table. + * If null a_skip_leading_delimiter, it defaults to 'N' + * If no occurrence of a_delimiter found in a_text then text is returned as a single row of the table. * If no text between delimiters found then an empty row is returned, example: * string_to_table( 'a,,b', ',' ) gives table ut_varchar2_list( 'a', null, 'b' ); * @@ -229,14 +231,36 @@ create or replace package ut_utils authid definer is */ function string_to_table(a_string varchar2, a_delimiter varchar2:= chr(10), a_skip_leading_delimiter varchar2 := 'N') return ut_varchar2_list; + /** + * + * Splits each string in table of string into a table of string using specified delimiter. + * The delimiter gets removed. + * If null a_delimiter passed, a_list is returned as-is. + * If null a_list passed, empty table is returned. + * If null a_skip_leading_delimiter, it defaults to 'N' + * If no occurrence of a_delimiter found in a_text then text is returned as a single row of the table. + * If no text between delimiters found then an empty row is returned, example: + * string_table_to_table( a_list => ut_varchar2_list('x','y',null,'a,,b'), a_delimiter=>',' ) gives table ut_varchar2_list( 'x', 'y', null, 'a', null, 'b' ); + * + * @param a_list the table of texts to be split. + * @param a_delimiter the delimiter character or string + * @param a_skip_leading_delimiter determines if the leading delimiter should be ignored, used by clob_to_table + * + * @return table of varchar2 values + */ + function string_table_to_table(a_list ut_varchar2_list, a_delimiter varchar2:= chr(10), a_skip_leading_delimiter varchar2 := 'N') return ut_varchar2_list; + /** * Splits a given string into table of string by delimiter. * Default value of a_max_amount is 8191 because of code can contains multibyte character. * The delimiter gets removed. - * If null passed as any of the parameters, empty table is returned. + * If null a_clob passed, empty table is returned. + * If null a_delimiter passed, a_string is returned as element of result table. + * If null a_skip_leading_delimiter, it defaults to 'N' + * If no occurrence of a_delimiter found in a_text then text is returned as a single row of the table. * If split text is longer than a_max_amount it gets split into pieces of a_max_amount. * If no text between delimiters found then an empty row is returned, example: - * string_to_table( 'a,,b', ',' ) gives table ut_varchar2_list( 'a', null, 'b' ); + * clob_to_table( 'a,,b', ',' ) gives table ut_varchar2_list( 'a', null, 'b' ); * * @param a_clob the text to be split. * @param a_delimiter the delimiter character or string (default chr(10) ) @@ -287,6 +311,11 @@ create or replace package ut_utils authid definer is */ procedure append_to_list(a_list in out nocopy ut_varchar2_rows, a_items ut_varchar2_rows); + /** + * Append a list of items to the end of ut_varchar2_list + */ + procedure append_to_list(a_list in out nocopy ut_varchar2_list, a_items ut_varchar2_list); + procedure append_to_clob(a_src_clob in out nocopy clob, a_clob_table t_clob_tab, a_delimiter varchar2 := chr(10)); procedure append_to_clob(a_src_clob in out nocopy clob, a_new_data clob); @@ -299,12 +328,6 @@ create or replace package ut_utils authid definer is function to_xpath(a_list ut_varchar2_list, a_ancestors varchar2 := '/*/') return varchar2; - /* - * Truncates session-level GTT's (on commit preserve rows) - * IMPORTANT: Procedure will do an implicit commit when called - */ - procedure cleanup_session_temp_tables; - /** * Converts version string into version record * diff --git a/source/create_grants.sql b/source/create_grants.sql index 4553c52f6..f7f37a662 100644 --- a/source/create_grants.sql +++ b/source/create_grants.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -61,6 +61,7 @@ grant execute on &&ut3_owner..ut_file_mapper to &ut3_user; grant execute on &&ut3_owner..ut_suite_items_info to &ut3_user; grant execute on &&ut3_owner..ut_suite_item_info to &ut3_user; grant execute on &&ut3_owner..ut_run_info to &ut3_user; +grant execute on &&ut3_owner..ut_coverage_options to &ut3_user; --generic types grant execute on &&ut3_owner..ut_varchar2_list to &ut3_user; @@ -133,6 +134,7 @@ grant execute on &&ut3_owner..ut_suite_cache_rows to &ut3_user; grant select, insert, delete, update on &&ut3_owner..dbmspcc_blocks to &ut3_user; grant select, insert, delete, update on &&ut3_owner..dbmspcc_runs to &ut3_user; grant select, insert, delete, update on &&ut3_owner..dbmspcc_units to &ut3_user; +grant select on &&ut3_owner..ut_coverage_runs to &ut3_user; grant execute on &&ut3_owner..ut_matcher_options to &ut3_user; grant execute on &&ut3_owner..ut_matcher_options_items to &ut3_user; diff --git a/source/create_synonyms.sql b/source/create_synonyms.sql index 36dc465de..a4f06c228 100644 --- a/source/create_synonyms.sql +++ b/source/create_synonyms.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ set termout off spool params.sql.tmp select case - when upper('&&ut3_user') = 'PUBLIC' then q'[define action_type='public' + when upper('&&ut3_user') = 'PUBLIC' then q'[define action_type='or replace public' ]'||q'[define ut3_user='' ]'||q'[define grantee='PUBLIC']' else q'[define action_type='or replace' @@ -77,6 +77,7 @@ create &action_type. synonym &ut3_user.ut_file_mapper for &&ut3_owner..ut_file_m create &action_type. synonym &ut3_user.ut_suite_items_info for &&ut3_owner..ut_suite_items_info; create &action_type. synonym &ut3_user.ut_suite_item_info for &&ut3_owner..ut_suite_item_info; create &action_type. synonym &ut3_user.ut_run_info for &&ut3_owner..ut_run_info; +create &action_type. synonym &ut3_user.ut_coverage_options for &&ut3_owner..ut_coverage_options; --generic types create &action_type. synonym &ut3_user.ut_varchar2_list for &&ut3_owner..ut_varchar2_list; diff --git a/source/create_synonyms_and_grants_for_public.sql b/source/create_synonyms_and_grants_for_public.sql index 6d43c6b7a..050162d72 100644 --- a/source/create_synonyms_and_grants_for_public.sql +++ b/source/create_synonyms_and_grants_for_public.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/create_user_grants.sql b/source/create_user_grants.sql index 4ca721cf4..83e594884 100644 --- a/source/create_user_grants.sql +++ b/source/create_user_grants.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/create_user_synonyms.sql b/source/create_user_synonyms.sql index ee9f60fdd..a1e7a6acc 100644 --- a/source/create_user_synonyms.sql +++ b/source/create_user_synonyms.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/create_utplsql_owner.sql b/source/create_utplsql_owner.sql index ee161c99c..1af2cf168 100644 --- a/source/create_utplsql_owner.sql +++ b/source/create_utplsql_owner.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -21,26 +21,26 @@ set feedback off set heading off set verify off -define ut3_user = &1 -define ut3_password = &2 -define ut3_tablespace = &3 +define ut3_owner_schema = &1 +define ut3_password = &2 +define ut3_tablespace = &3 -prompt Creating utPLSQL user &&ut3_user +prompt Creating utPLSQL user &&ut3_owner_schema -create user &ut3_user identified by "&ut3_password" default tablespace &ut3_tablespace quota unlimited on &ut3_tablespace; +create user &ut3_owner_schema identified by "&ut3_password" default tablespace &ut3_tablespace quota unlimited on &ut3_tablespace; -grant create session, create sequence, create procedure, create type, create table, create view, create synonym to &ut3_user; +grant create session, create sequence, create procedure, create type, create table, create view, create synonym to &ut3_owner_schema; begin $if dbms_db_version.version < 18 $then - execute immediate 'grant execute on dbms_lock to &ut3_user'; + execute immediate 'grant execute on dbms_lock to &ut3_owner_schema'; $else null; $end end; / -grant execute on dbms_crypto to &ut3_user; +grant execute on dbms_crypto to &ut3_owner_schema; -grant alter session to &ut3_user; +grant alter session to &ut3_owner_schema; diff --git a/source/define_ut3_owner_param.sql b/source/define_ut3_owner_param.sql index 1b183b581..259b49712 100644 --- a/source/define_ut3_owner_param.sql +++ b/source/define_ut3_owner_param.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_compound_data_diff_tmp.sql b/source/expectations/data_values/ut_compound_data_diff_tmp.sql index e96d716b5..c10e8d2e8 100644 --- a/source/expectations/data_values/ut_compound_data_diff_tmp.sql +++ b/source/expectations/data_values/ut_compound_data_diff_tmp.sql @@ -1,7 +1,7 @@ create global temporary table ut_compound_data_diff_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/expectations/data_values/ut_compound_data_helper.pkb b/source/expectations/data_values/ut_compound_data_helper.pkb index 69ba90811..37d9901ff 100644 --- a/source/expectations/data_values/ut_compound_data_helper.pkb +++ b/source/expectations/data_values/ut_compound_data_helper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_compound_data_helper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ create or replace package body ut_compound_data_helper is where x.data_id = :act_guid ) ucd ) - select + select /*+ no_parallel */ a."UT3$_Item#Data" as act_item_data, a."UT3$_Data#Id" act_data_id, e."UT3$_Item#Data" as exp_item_data, @@ -103,7 +103,7 @@ create or replace package body ut_compound_data_helper is full outer join actual_cols a on e.exp_column_name = a.act_column_name ) - select case + select /*+ no_parallel */ case when exp_col_pos is null and act_col_pos is not null then '+' when exp_col_pos is not null and act_col_pos is null then '-' when exp_col_type_compare != act_col_type_compare then 't' @@ -486,7 +486,7 @@ create or replace package body ut_compound_data_helper is ) unpivot ( data_item for diff_type in (exp_item as 'Expected:', act_item as 'Actual:') ) ) - select rn, diff_type, diffed_row, pk_value + select /*+ no_parallel */ rn, diff_type, diffed_row, pk_value from ( select rn, diff_type, diffed_row, pk_value, case when diff_type = 'Actual:' then 1 else 2 end rnk, @@ -564,7 +564,7 @@ create or replace package body ut_compound_data_helper is procedure insert_diffs_result(a_diff_tab t_diff_tab, a_diff_id raw) is begin forall idx in 1..a_diff_tab.count save exceptions - insert into ut_compound_data_diff_tmp + insert /*+ no_parallel */ into ut_compound_data_diff_tmp ( diff_id, act_item_data, act_data_id, exp_item_data, exp_data_id, item_no, duplicate_no ) values (a_diff_id, @@ -639,13 +639,13 @@ create or replace package body ut_compound_data_helper is procedure save_cursor_data_for_diff(a_data_id raw, a_set_id integer, a_xml xmltype) is begin - insert into ut_compound_data_tmp (data_id, item_no, item_data) values (a_data_id, a_set_id, a_xml); + insert /*+ no_parallel */ into ut_compound_data_tmp (data_id, item_no, item_data) values (a_data_id, a_set_id, a_xml); end; function get_row_data_as_xml(a_data_id raw, a_max_rows integer) return ut_utils.t_clob_tab is l_results ut_utils.t_clob_tab; begin - select xmlserialize( content ucd.item_data no indent) + select /*+ no_parallel */ xmlserialize( content ucd.item_data no indent) bulk collect into l_results from ut_compound_data_tmp tmp ,xmltable ( '/ROWSET' passing tmp.item_data @@ -720,7 +720,7 @@ create or replace package body ut_compound_data_helper is or (a.json_type != e.json_type) or (decode(a.element_value,e.element_value,1,0) = 0) ) - select difference_type, + select /*+ no_parallel */ difference_type, act_element_name, act_element_value, act_json_type, act_access_path, act_parent_path, exp_element_name, exp_element_value, exp_json_type, exp_access_path, exp_parent_path bulk collect into l_result_diff @@ -742,7 +742,7 @@ create or replace package body ut_compound_data_helper is l_diffs tt_json_diff_tab := compare_json_data(a_act_json_data,a_exp_json_data); begin forall i in 1..l_diffs.count - insert into ut_json_data_diff_tmp ( + insert /*+ no_parallel */ into ut_json_data_diff_tmp ( diff_id, difference_type, act_element_name, act_element_value, act_json_type, act_access_path, act_parent_path, exp_element_name, exp_element_value, exp_json_type, exp_access_path, exp_parent_path @@ -759,7 +759,7 @@ create or replace package body ut_compound_data_helper is function get_json_diffs_type(a_diff_id raw) return tt_json_diff_type_tab is l_diffs_summary tt_json_diff_type_tab := tt_json_diff_type_tab(); begin - select d.difference_type,count(1) + select /*+ no_parallel */ d.difference_type,count(1) bulk collect into l_diffs_summary from ut_json_data_diff_tmp d where diff_id = a_diff_id @@ -771,7 +771,7 @@ create or replace package body ut_compound_data_helper is function get_json_diffs_tmp(a_diff_id raw) return tt_json_diff_tab is l_diffs tt_json_diff_tab; begin - select difference_type, + select /*+ no_parallel */ difference_type, act_element_name, act_element_value, act_json_type, act_access_path, act_parent_path, exp_element_name, exp_element_value, exp_json_type, exp_access_path, exp_parent_path bulk collect into l_diffs diff --git a/source/expectations/data_values/ut_compound_data_helper.pks b/source/expectations/data_values/ut_compound_data_helper.pks index b39df0039..53b0846b8 100644 --- a/source/expectations/data_values/ut_compound_data_helper.pks +++ b/source/expectations/data_values/ut_compound_data_helper.pks @@ -1,7 +1,7 @@ create or replace package ut_compound_data_helper authid definer is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_compound_data_tmp.sql b/source/expectations/data_values/ut_compound_data_tmp.sql index c860a1872..1bfa77fca 100644 --- a/source/expectations/data_values/ut_compound_data_tmp.sql +++ b/source/expectations/data_values/ut_compound_data_tmp.sql @@ -1,7 +1,7 @@ create global temporary table ut_compound_data_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/expectations/data_values/ut_compound_data_value.tpb b/source/expectations/data_values/ut_compound_data_value.tpb index 627e14680..2c52ff8fa 100644 --- a/source/expectations/data_values/ut_compound_data_value.tpb +++ b/source/expectations/data_values/ut_compound_data_value.tpb @@ -1,7 +1,7 @@ create or replace type body ut_compound_data_value as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_compound_data_value.tps b/source/expectations/data_values/ut_compound_data_value.tps index 027b5ca26..c14dadceb 100644 --- a/source/expectations/data_values/ut_compound_data_value.tps +++ b/source/expectations/data_values/ut_compound_data_value.tps @@ -1,7 +1,7 @@ create or replace type ut_compound_data_value force under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_cursor_column.tps b/source/expectations/data_values/ut_cursor_column.tps index c865ea64b..77bf78f01 100644 --- a/source/expectations/data_values/ut_cursor_column.tps +++ b/source/expectations/data_values/ut_cursor_column.tps @@ -1,7 +1,7 @@ create or replace type ut_cursor_column authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_cursor_column_tab.tps b/source/expectations/data_values/ut_cursor_column_tab.tps index b1b33f7fe..106023d96 100644 --- a/source/expectations/data_values/ut_cursor_column_tab.tps +++ b/source/expectations/data_values/ut_cursor_column_tab.tps @@ -1,7 +1,7 @@ create or replace type ut_cursor_column_tab as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_cursor_details.tpb b/source/expectations/data_values/ut_cursor_details.tpb index 20313ed96..adc705f65 100644 --- a/source/expectations/data_values/ut_cursor_details.tpb +++ b/source/expectations/data_values/ut_cursor_details.tpb @@ -3,7 +3,7 @@ create or replace type body ut_cursor_details as member function equals( a_other ut_cursor_details, a_match_options ut_matcher_options ) return boolean is l_diffs integer; begin - select count(1) into l_diffs + select /*+ no_parallel */ count(1) into l_diffs from table(self.cursor_columns_info) a full outer join table(a_other.cursor_columns_info) e on decode(a.parent_name,e.parent_name,1,0)= 1 @@ -139,7 +139,7 @@ create or replace type body ut_cursor_details as member function contains_collection return boolean is l_collection_elements number; begin - select count(1) into l_collection_elements + select /*+ no_parallel */ count(1) into l_collection_elements from table(cursor_columns_info) c where c.is_collection = 1 and rownum = 1; return l_collection_elements > 0; @@ -149,7 +149,7 @@ create or replace type body ut_cursor_details as l_result ut_varchar2_list; begin --regexp_replace(c.access_path,'^\/?([^\/]+\/){1}') - select fl.column_value + select /*+ no_parallel */ fl.column_value bulk collect into l_result from table(a_expected_columns) fl where not exists ( @@ -179,7 +179,7 @@ create or replace type body ut_cursor_details as select regexp_replace( column_value, c_xpath_extract_reg, '\5' ) col_names from table(a_match_options.exclude.items) ) - select value(x) + select /*+ no_parallel */ value(x) bulk collect into l_result.cursor_columns_info from table(self.cursor_columns_info) x where exists( @@ -192,7 +192,7 @@ create or replace type body ut_cursor_details as select regexp_replace( column_value, c_xpath_extract_reg, '\5' ) col_names from table(a_match_options.exclude.items) ) - select value(x) + select /*+ no_parallel */ value(x) bulk collect into l_result.cursor_columns_info from table(self.cursor_columns_info) x where not exists( @@ -202,7 +202,7 @@ create or replace type body ut_cursor_details as --Rewrite column order after columns been excluded for i in ( - select parent_name, access_path, display_path, has_nested_col, + select /*+ no_parallel */ parent_name, access_path, display_path, has_nested_col, transformed_name, hierarchy_level, rownum as new_position, xml_valid_name, column_name, column_type, column_type_name, column_schema, @@ -224,7 +224,7 @@ create or replace type body ut_cursor_details as member function get_xml_children(a_parent_name varchar2 := null) return xmltype is l_result xmltype; begin - select xmlagg(xmlelement(evalname t.column_name,t.column_type_name)) + select /*+ no_parallel */ xmlagg(xmlelement(evalname t.column_name,t.column_type_name)) into l_result from table(self.cursor_columns_info) t where (a_parent_name is null and parent_name is null and hierarchy_level = 1 and column_name is not null) @@ -236,7 +236,7 @@ create or replace type body ut_cursor_details as l_root varchar2(250); begin if self.cursor_columns_info.count > 0 then - select x.access_path into l_root from table(self.cursor_columns_info) x + select /*+ no_parallel */ x.access_path into l_root from table(self.cursor_columns_info) x where x.hierarchy_level = 1; else l_root := null; diff --git a/source/expectations/data_values/ut_cursor_details.tps b/source/expectations/data_values/ut_cursor_details.tps index 7092e834f..e7f9405eb 100644 --- a/source/expectations/data_values/ut_cursor_details.tps +++ b/source/expectations/data_values/ut_cursor_details.tps @@ -1,7 +1,7 @@ create or replace type ut_cursor_details authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value.tpb b/source/expectations/data_values/ut_data_value.tpb index a644fe30e..6b1763dd0 100644 --- a/source/expectations/data_values/ut_data_value.tpb +++ b/source/expectations/data_values/ut_data_value.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value.tps b/source/expectations/data_values/ut_data_value.tps index ca7e18308..6864bc52e 100644 --- a/source/expectations/data_values/ut_data_value.tps +++ b/source/expectations/data_values/ut_data_value.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value force authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_anydata.tpb b/source/expectations/data_values/ut_data_value_anydata.tpb index a81b0f5c7..f6fbdc840 100644 --- a/source/expectations/data_values/ut_data_value_anydata.tpb +++ b/source/expectations/data_values/ut_data_value_anydata.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_anydata as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ create or replace type body ut_data_value_anydata as begin l_status := l_value.get'||self.compound_type||'(l_data); '|| case when self.compound_type = 'collection' then - q'[ open :l_tmp_refcursor for select value(x) as "]'|| + q'[ open :l_tmp_refcursor for select /*+ no_parallel */ value(x) as "]'|| ut_metadata.get_object_name(ut_metadata.get_collection_element(a_data_value))|| q'[" from table(l_data) x;]' else - q'[ open :l_tmp_refcursor for select l_data as "]'||ut_metadata.get_object_name(self.data_type)|| + q'[ open :l_tmp_refcursor for select /*+ no_parallel */ l_data as "]'||ut_metadata.get_object_name(self.data_type)|| q'[" from dual;]' end || 'end;'; diff --git a/source/expectations/data_values/ut_data_value_anydata.tps b/source/expectations/data_values/ut_data_value_anydata.tps index 5ed0406ca..60dba5515 100644 --- a/source/expectations/data_values/ut_data_value_anydata.tps +++ b/source/expectations/data_values/ut_data_value_anydata.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_anydata under ut_data_value_refcursor( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_blob.tpb b/source/expectations/data_values/ut_data_value_blob.tpb index 11af6d2f7..a7b5fbeca 100644 --- a/source/expectations/data_values/ut_data_value_blob.tpb +++ b/source/expectations/data_values/ut_data_value_blob.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_blob as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_blob.tps b/source/expectations/data_values/ut_data_value_blob.tps index f557ffbce..6df3f3273 100644 --- a/source/expectations/data_values/ut_data_value_blob.tps +++ b/source/expectations/data_values/ut_data_value_blob.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_blob under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_boolean.tpb b/source/expectations/data_values/ut_data_value_boolean.tpb index 0645d3269..798222e30 100644 --- a/source/expectations/data_values/ut_data_value_boolean.tpb +++ b/source/expectations/data_values/ut_data_value_boolean.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_boolean as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_boolean.tps b/source/expectations/data_values/ut_data_value_boolean.tps index a254e05c0..e25b6e0fd 100644 --- a/source/expectations/data_values/ut_data_value_boolean.tps +++ b/source/expectations/data_values/ut_data_value_boolean.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_boolean under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_clob.tpb b/source/expectations/data_values/ut_data_value_clob.tpb index dacb390b6..9cfe9b283 100644 --- a/source/expectations/data_values/ut_data_value_clob.tpb +++ b/source/expectations/data_values/ut_data_value_clob.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_clob as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_clob.tps b/source/expectations/data_values/ut_data_value_clob.tps index 1ff5d5623..6869798d1 100644 --- a/source/expectations/data_values/ut_data_value_clob.tps +++ b/source/expectations/data_values/ut_data_value_clob.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_clob under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_date.tpb b/source/expectations/data_values/ut_data_value_date.tpb index dd87156bc..5b5b1d387 100644 --- a/source/expectations/data_values/ut_data_value_date.tpb +++ b/source/expectations/data_values/ut_data_value_date.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_date as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_date.tps b/source/expectations/data_values/ut_data_value_date.tps index 4435a3512..f64a577e0 100644 --- a/source/expectations/data_values/ut_data_value_date.tps +++ b/source/expectations/data_values/ut_data_value_date.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_date under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_dsinterval.tpb b/source/expectations/data_values/ut_data_value_dsinterval.tpb index ff9d5fe1e..f81f35974 100644 --- a/source/expectations/data_values/ut_data_value_dsinterval.tpb +++ b/source/expectations/data_values/ut_data_value_dsinterval.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_dsinterval as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_dsinterval.tps b/source/expectations/data_values/ut_data_value_dsinterval.tps index 114619bf2..a047ead48 100644 --- a/source/expectations/data_values/ut_data_value_dsinterval.tps +++ b/source/expectations/data_values/ut_data_value_dsinterval.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_dsinterval under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_json.tpb b/source/expectations/data_values/ut_data_value_json.tpb index 83916c30e..dfb3275ab 100644 --- a/source/expectations/data_values/ut_data_value_json.tpb +++ b/source/expectations/data_values/ut_data_value_json.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_json as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_json.tps b/source/expectations/data_values/ut_data_value_json.tps index bfaccb2e2..135124e64 100644 --- a/source/expectations/data_values/ut_data_value_json.tps +++ b/source/expectations/data_values/ut_data_value_json.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_json under ut_compound_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_number.tpb b/source/expectations/data_values/ut_data_value_number.tpb index b8a28a124..c5c4fe2c3 100644 --- a/source/expectations/data_values/ut_data_value_number.tpb +++ b/source/expectations/data_values/ut_data_value_number.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_number as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_number.tps b/source/expectations/data_values/ut_data_value_number.tps index 872ab405e..86d68f356 100644 --- a/source/expectations/data_values/ut_data_value_number.tps +++ b/source/expectations/data_values/ut_data_value_number.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_number under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_refcursor.tpb b/source/expectations/data_values/ut_data_value_refcursor.tpb index 801b35802..2715614c4 100644 --- a/source/expectations/data_values/ut_data_value_refcursor.tpb +++ b/source/expectations/data_values/ut_data_value_refcursor.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_refcursor as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -178,7 +178,7 @@ create or replace type body ut_data_value_refcursor as l_missing_cols(l_missing_cols.last) := coalesce(a_column_diffs(i).expected_name, a_column_diffs(i).actual_name); end if; end loop; - select value(i) bulk collect into l_result + select /*+ no_parallel */ value(i) bulk collect into l_result from table(a_cursor_details) i where i.access_path not in ( select c.column_value diff --git a/source/expectations/data_values/ut_data_value_refcursor.tps b/source/expectations/data_values/ut_data_value_refcursor.tps index 4de253b8f..594695e32 100644 --- a/source/expectations/data_values/ut_data_value_refcursor.tps +++ b/source/expectations/data_values/ut_data_value_refcursor.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_refcursor under ut_compound_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp.tpb b/source/expectations/data_values/ut_data_value_timestamp.tpb index adb18e360..79facae4a 100644 --- a/source/expectations/data_values/ut_data_value_timestamp.tpb +++ b/source/expectations/data_values/ut_data_value_timestamp.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_timestamp as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp.tps b/source/expectations/data_values/ut_data_value_timestamp.tps index ebd00762c..c047e3c79 100644 --- a/source/expectations/data_values/ut_data_value_timestamp.tps +++ b/source/expectations/data_values/ut_data_value_timestamp.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_timestamp under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp_ltz.tpb b/source/expectations/data_values/ut_data_value_timestamp_ltz.tpb index 0f41e16b1..f2c5cddbd 100644 --- a/source/expectations/data_values/ut_data_value_timestamp_ltz.tpb +++ b/source/expectations/data_values/ut_data_value_timestamp_ltz.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_timestamp_ltz as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp_ltz.tps b/source/expectations/data_values/ut_data_value_timestamp_ltz.tps index 3608ebd37..7bb296bc9 100644 --- a/source/expectations/data_values/ut_data_value_timestamp_ltz.tps +++ b/source/expectations/data_values/ut_data_value_timestamp_ltz.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_timestamp_ltz under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp_tz.tpb b/source/expectations/data_values/ut_data_value_timestamp_tz.tpb index 710a313a7..0991e9e9f 100644 --- a/source/expectations/data_values/ut_data_value_timestamp_tz.tpb +++ b/source/expectations/data_values/ut_data_value_timestamp_tz.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_timestamp_tz as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_timestamp_tz.tps b/source/expectations/data_values/ut_data_value_timestamp_tz.tps index ca0bfc5cb..01cf11124 100644 --- a/source/expectations/data_values/ut_data_value_timestamp_tz.tps +++ b/source/expectations/data_values/ut_data_value_timestamp_tz.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_timestamp_tz under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_varchar2.tpb b/source/expectations/data_values/ut_data_value_varchar2.tpb index da4276d51..307ca583d 100644 --- a/source/expectations/data_values/ut_data_value_varchar2.tpb +++ b/source/expectations/data_values/ut_data_value_varchar2.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_varchar2 as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_varchar2.tps b/source/expectations/data_values/ut_data_value_varchar2.tps index 27bb720ce..3fbeb378b 100644 --- a/source/expectations/data_values/ut_data_value_varchar2.tps +++ b/source/expectations/data_values/ut_data_value_varchar2.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_varchar2 under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_xmltype.tpb b/source/expectations/data_values/ut_data_value_xmltype.tpb index 3b10aadce..d17896492 100644 --- a/source/expectations/data_values/ut_data_value_xmltype.tpb +++ b/source/expectations/data_values/ut_data_value_xmltype.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_xmltype as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_xmltype.tps b/source/expectations/data_values/ut_data_value_xmltype.tps index 476097de3..9ba738b88 100644 --- a/source/expectations/data_values/ut_data_value_xmltype.tps +++ b/source/expectations/data_values/ut_data_value_xmltype.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_xmltype under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_yminterval.tpb b/source/expectations/data_values/ut_data_value_yminterval.tpb index 6d6a05b4a..7de3e58cd 100644 --- a/source/expectations/data_values/ut_data_value_yminterval.tpb +++ b/source/expectations/data_values/ut_data_value_yminterval.tpb @@ -1,7 +1,7 @@ create or replace type body ut_data_value_yminterval as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_data_value_yminterval.tps b/source/expectations/data_values/ut_data_value_yminterval.tps index d20dfcad7..278a2f803 100644 --- a/source/expectations/data_values/ut_data_value_yminterval.tps +++ b/source/expectations/data_values/ut_data_value_yminterval.tps @@ -1,7 +1,7 @@ create or replace type ut_data_value_yminterval under ut_data_value( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_json_data_diff_tmp.sql b/source/expectations/data_values/ut_json_data_diff_tmp.sql index bfaaa1b72..5ff3440d8 100644 --- a/source/expectations/data_values/ut_json_data_diff_tmp.sql +++ b/source/expectations/data_values/ut_json_data_diff_tmp.sql @@ -1,7 +1,7 @@ create global temporary table ut_json_data_diff_tmp( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/source/expectations/data_values/ut_json_leaf.tps b/source/expectations/data_values/ut_json_leaf.tps index c38c3b238..8aa8afd6a 100644 --- a/source/expectations/data_values/ut_json_leaf.tps +++ b/source/expectations/data_values/ut_json_leaf.tps @@ -1,7 +1,7 @@ create or replace type ut_json_leaf authid current_user as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_json_leaf_tab.tps b/source/expectations/data_values/ut_json_leaf_tab.tps index 0c7a40b9f..395ab5d9e 100644 --- a/source/expectations/data_values/ut_json_leaf_tab.tps +++ b/source/expectations/data_values/ut_json_leaf_tab.tps @@ -1,7 +1,7 @@ create or replace type ut_json_leaf_tab as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_json_tree_details.tps b/source/expectations/data_values/ut_json_tree_details.tps index 0684ecafe..20ac2fdcc 100644 --- a/source/expectations/data_values/ut_json_tree_details.tps +++ b/source/expectations/data_values/ut_json_tree_details.tps @@ -1,7 +1,7 @@ create or replace type ut_json_tree_details force as object ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_key_anyval_pair.tps b/source/expectations/data_values/ut_key_anyval_pair.tps index 4903282e9..d1068f109 100644 --- a/source/expectations/data_values/ut_key_anyval_pair.tps +++ b/source/expectations/data_values/ut_key_anyval_pair.tps @@ -1,7 +1,7 @@ create or replace type ut_key_anyval_pair force as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_key_anyval_pairs.tps b/source/expectations/data_values/ut_key_anyval_pairs.tps index 94bd5df54..7e10bf50f 100644 --- a/source/expectations/data_values/ut_key_anyval_pairs.tps +++ b/source/expectations/data_values/ut_key_anyval_pairs.tps @@ -1,7 +1,7 @@ create or replace type ut_key_anyval_pairs as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_key_anyvalues.tpb b/source/expectations/data_values/ut_key_anyvalues.tpb index 93bf1eb53..d30d8a841 100644 --- a/source/expectations/data_values/ut_key_anyvalues.tpb +++ b/source/expectations/data_values/ut_key_anyvalues.tpb @@ -1,7 +1,7 @@ create or replace type body ut_key_anyvalues as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/data_values/ut_key_anyvalues.tps b/source/expectations/data_values/ut_key_anyvalues.tps index 6dd32a76d..8c672bd00 100644 --- a/source/expectations/data_values/ut_key_anyvalues.tps +++ b/source/expectations/data_values/ut_key_anyvalues.tps @@ -1,7 +1,7 @@ create or replace type ut_key_anyvalues under ut_event_item ( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_between.tpb b/source/expectations/matchers/ut_be_between.tpb index 7368ad5a7..6aea96f55 100644 --- a/source/expectations/matchers/ut_be_between.tpb +++ b/source/expectations/matchers/ut_be_between.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_between is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_between.tps b/source/expectations/matchers/ut_be_between.tps index 7e254719e..9e984085b 100644 --- a/source/expectations/matchers/ut_be_between.tps +++ b/source/expectations/matchers/ut_be_between.tps @@ -1,7 +1,7 @@ create or replace type ut_be_between under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_empty.tpb b/source/expectations/matchers/ut_be_empty.tpb index 08523fb02..e5e02f6b2 100644 --- a/source/expectations/matchers/ut_be_empty.tpb +++ b/source/expectations/matchers/ut_be_empty.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_empty as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_empty.tps b/source/expectations/matchers/ut_be_empty.tps index 76af402fe..9e9f899d0 100644 --- a/source/expectations/matchers/ut_be_empty.tps +++ b/source/expectations/matchers/ut_be_empty.tps @@ -1,7 +1,7 @@ create or replace type ut_be_empty under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_false.tpb b/source/expectations/matchers/ut_be_false.tpb index 671f43cbe..4cc88600a 100644 --- a/source/expectations/matchers/ut_be_false.tpb +++ b/source/expectations/matchers/ut_be_false.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_false as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_false.tps b/source/expectations/matchers/ut_be_false.tps index 3d4e8dda9..ede510719 100644 --- a/source/expectations/matchers/ut_be_false.tps +++ b/source/expectations/matchers/ut_be_false.tps @@ -1,7 +1,7 @@ create or replace type ut_be_false under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_greater_or_equal.tpb b/source/expectations/matchers/ut_be_greater_or_equal.tpb index 6877eb32c..1c2a19c09 100644 --- a/source/expectations/matchers/ut_be_greater_or_equal.tpb +++ b/source/expectations/matchers/ut_be_greater_or_equal.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_greater_or_equal AS /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_greater_or_equal.tps b/source/expectations/matchers/ut_be_greater_or_equal.tps index facd33b3d..b3ab54ff1 100644 --- a/source/expectations/matchers/ut_be_greater_or_equal.tps +++ b/source/expectations/matchers/ut_be_greater_or_equal.tps @@ -1,7 +1,7 @@ create or replace type ut_be_greater_or_equal under ut_comparison_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_greater_than.tpb b/source/expectations/matchers/ut_be_greater_than.tpb index da46347af..9cce79119 100644 --- a/source/expectations/matchers/ut_be_greater_than.tpb +++ b/source/expectations/matchers/ut_be_greater_than.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_greater_than AS /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_greater_than.tps b/source/expectations/matchers/ut_be_greater_than.tps index fa19a9bd4..a5a44692d 100644 --- a/source/expectations/matchers/ut_be_greater_than.tps +++ b/source/expectations/matchers/ut_be_greater_than.tps @@ -1,7 +1,7 @@ create or replace type ut_be_greater_than under ut_comparison_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_less_or_equal.tpb b/source/expectations/matchers/ut_be_less_or_equal.tpb index 98c4238eb..6acec1dda 100644 --- a/source/expectations/matchers/ut_be_less_or_equal.tpb +++ b/source/expectations/matchers/ut_be_less_or_equal.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_less_or_equal AS /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_less_or_equal.tps b/source/expectations/matchers/ut_be_less_or_equal.tps index 225c99b72..118611a41 100644 --- a/source/expectations/matchers/ut_be_less_or_equal.tps +++ b/source/expectations/matchers/ut_be_less_or_equal.tps @@ -1,7 +1,7 @@ create or replace type ut_be_less_or_equal under ut_comparison_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_less_than.tpb b/source/expectations/matchers/ut_be_less_than.tpb index e1c5c84b1..7608e4917 100644 --- a/source/expectations/matchers/ut_be_less_than.tpb +++ b/source/expectations/matchers/ut_be_less_than.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_less_than as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_less_than.tps b/source/expectations/matchers/ut_be_less_than.tps index 8482f0327..b652de789 100644 --- a/source/expectations/matchers/ut_be_less_than.tps +++ b/source/expectations/matchers/ut_be_less_than.tps @@ -1,7 +1,7 @@ create or replace type ut_be_less_than under ut_comparison_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_like.tpb b/source/expectations/matchers/ut_be_like.tpb index dbcd1c798..6865c2942 100644 --- a/source/expectations/matchers/ut_be_like.tpb +++ b/source/expectations/matchers/ut_be_like.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_like as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_like.tps b/source/expectations/matchers/ut_be_like.tps index 0c1609a98..dae93a1d9 100644 --- a/source/expectations/matchers/ut_be_like.tps +++ b/source/expectations/matchers/ut_be_like.tps @@ -1,7 +1,7 @@ create or replace type ut_be_like under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_not_null.tpb b/source/expectations/matchers/ut_be_not_null.tpb index 94ee0ce0a..194e2ea32 100644 --- a/source/expectations/matchers/ut_be_not_null.tpb +++ b/source/expectations/matchers/ut_be_not_null.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_not_null as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_not_null.tps b/source/expectations/matchers/ut_be_not_null.tps index 34cc2bfd0..196aac9fb 100644 --- a/source/expectations/matchers/ut_be_not_null.tps +++ b/source/expectations/matchers/ut_be_not_null.tps @@ -1,7 +1,7 @@ create or replace type ut_be_not_null under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_null.tpb b/source/expectations/matchers/ut_be_null.tpb index 3194f092f..8c672791b 100644 --- a/source/expectations/matchers/ut_be_null.tpb +++ b/source/expectations/matchers/ut_be_null.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_null as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_null.tps b/source/expectations/matchers/ut_be_null.tps index 486e11f28..3b2d6ac84 100644 --- a/source/expectations/matchers/ut_be_null.tps +++ b/source/expectations/matchers/ut_be_null.tps @@ -1,7 +1,7 @@ create or replace type ut_be_null under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_true.tpb b/source/expectations/matchers/ut_be_true.tpb index 565ab590b..fe78b4e22 100644 --- a/source/expectations/matchers/ut_be_true.tpb +++ b/source/expectations/matchers/ut_be_true.tpb @@ -1,7 +1,7 @@ create or replace type body ut_be_true as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_be_true.tps b/source/expectations/matchers/ut_be_true.tps index b994913f5..8b5491e39 100644 --- a/source/expectations/matchers/ut_be_true.tps +++ b/source/expectations/matchers/ut_be_true.tps @@ -1,7 +1,7 @@ create or replace type ut_be_true under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_comparison_matcher.tpb b/source/expectations/matchers/ut_comparison_matcher.tpb index 50f8d6050..20ed35927 100644 --- a/source/expectations/matchers/ut_comparison_matcher.tpb +++ b/source/expectations/matchers/ut_comparison_matcher.tpb @@ -1,7 +1,7 @@ create or replace type body ut_comparison_matcher as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_comparison_matcher.tps b/source/expectations/matchers/ut_comparison_matcher.tps index 76520a296..68ecb4462 100644 --- a/source/expectations/matchers/ut_comparison_matcher.tps +++ b/source/expectations/matchers/ut_comparison_matcher.tps @@ -1,7 +1,7 @@ create or replace type ut_comparison_matcher under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_contain.tpb b/source/expectations/matchers/ut_contain.tpb index c0c4f481a..7591925f5 100644 --- a/source/expectations/matchers/ut_contain.tpb +++ b/source/expectations/matchers/ut_contain.tpb @@ -1,7 +1,7 @@ create or replace type body ut_contain as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_contain.tps b/source/expectations/matchers/ut_contain.tps index 518352573..e572edf62 100644 --- a/source/expectations/matchers/ut_contain.tps +++ b/source/expectations/matchers/ut_contain.tps @@ -1,7 +1,7 @@ create or replace type ut_contain under ut_equal( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_equal.tpb b/source/expectations/matchers/ut_equal.tpb index afa2148f3..05caf3b09 100644 --- a/source/expectations/matchers/ut_equal.tpb +++ b/source/expectations/matchers/ut_equal.tpb @@ -1,7 +1,7 @@ create or replace type body ut_equal as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_equal.tps b/source/expectations/matchers/ut_equal.tps index 1f42324d7..eecbe8c1d 100644 --- a/source/expectations/matchers/ut_equal.tps +++ b/source/expectations/matchers/ut_equal.tps @@ -1,7 +1,7 @@ create or replace type ut_equal force under ut_comparison_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_have_count.tpb b/source/expectations/matchers/ut_have_count.tpb index b0f4e06d4..457cd6272 100644 --- a/source/expectations/matchers/ut_have_count.tpb +++ b/source/expectations/matchers/ut_have_count.tpb @@ -1,7 +1,7 @@ create or replace type body ut_have_count as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_have_count.tps b/source/expectations/matchers/ut_have_count.tps index fb0fc76fc..d48dc44c8 100644 --- a/source/expectations/matchers/ut_have_count.tps +++ b/source/expectations/matchers/ut_have_count.tps @@ -1,7 +1,7 @@ create or replace type ut_have_count under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_match.tpb b/source/expectations/matchers/ut_match.tpb index 57fabbaec..3c7a71402 100644 --- a/source/expectations/matchers/ut_match.tpb +++ b/source/expectations/matchers/ut_match.tpb @@ -1,7 +1,7 @@ create or replace type body ut_match as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_match.tps b/source/expectations/matchers/ut_match.tps index 8d6b0f73a..ee51a4c28 100644 --- a/source/expectations/matchers/ut_match.tps +++ b/source/expectations/matchers/ut_match.tps @@ -1,7 +1,7 @@ create or replace type ut_match under ut_matcher( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher.tpb b/source/expectations/matchers/ut_matcher.tpb index 11ff1b6b6..c64b6d246 100644 --- a/source/expectations/matchers/ut_matcher.tpb +++ b/source/expectations/matchers/ut_matcher.tpb @@ -1,7 +1,7 @@ create or replace type body ut_matcher as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher.tps b/source/expectations/matchers/ut_matcher.tps index 34e1742df..ba8bb7e85 100644 --- a/source/expectations/matchers/ut_matcher.tps +++ b/source/expectations/matchers/ut_matcher.tps @@ -1,7 +1,7 @@ create or replace type ut_matcher authid current_user as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher_options.tpb b/source/expectations/matchers/ut_matcher_options.tpb index 6fec3dee6..8730c204b 100644 --- a/source/expectations/matchers/ut_matcher_options.tpb +++ b/source/expectations/matchers/ut_matcher_options.tpb @@ -1,7 +1,7 @@ create or replace type body ut_matcher_options as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher_options.tps b/source/expectations/matchers/ut_matcher_options.tps index dbdf985f0..276cad2ec 100644 --- a/source/expectations/matchers/ut_matcher_options.tps +++ b/source/expectations/matchers/ut_matcher_options.tps @@ -1,7 +1,7 @@ create or replace type ut_matcher_options authid current_user as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher_options_items.tpb b/source/expectations/matchers/ut_matcher_options_items.tpb index 2c3f51d34..92da588ce 100644 --- a/source/expectations/matchers/ut_matcher_options_items.tpb +++ b/source/expectations/matchers/ut_matcher_options_items.tpb @@ -1,7 +1,7 @@ create or replace type body ut_matcher_options_items is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/matchers/ut_matcher_options_items.tps b/source/expectations/matchers/ut_matcher_options_items.tps index cc74650f3..53787070d 100644 --- a/source/expectations/matchers/ut_matcher_options_items.tps +++ b/source/expectations/matchers/ut_matcher_options_items.tps @@ -1,7 +1,7 @@ create or replace type ut_matcher_options_items authid current_user as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation.tpb b/source/expectations/ut_expectation.tpb index d8ed1f79a..dfad630a6 100644 --- a/source/expectations/ut_expectation.tpb +++ b/source/expectations/ut_expectation.tpb @@ -1,7 +1,7 @@ create or replace type body ut_expectation as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation.tps b/source/expectations/ut_expectation.tps index 37fefd085..45d768200 100644 --- a/source/expectations/ut_expectation.tps +++ b/source/expectations/ut_expectation.tps @@ -1,7 +1,7 @@ create or replace type ut_expectation authid current_user as object( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation_compound.tpb b/source/expectations/ut_expectation_compound.tpb index 5e7268bd9..9dfd78e3e 100644 --- a/source/expectations/ut_expectation_compound.tpb +++ b/source/expectations/ut_expectation_compound.tpb @@ -1,7 +1,7 @@ create or replace type body ut_expectation_compound as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation_compound.tps b/source/expectations/ut_expectation_compound.tps index fc413e3fd..ab320cae0 100644 --- a/source/expectations/ut_expectation_compound.tps +++ b/source/expectations/ut_expectation_compound.tps @@ -1,7 +1,7 @@ create or replace type ut_expectation_compound force under ut_expectation( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation_json.tpb b/source/expectations/ut_expectation_json.tpb index 49c0c2e1f..b71e8ea83 100644 --- a/source/expectations/ut_expectation_json.tpb +++ b/source/expectations/ut_expectation_json.tpb @@ -1,7 +1,7 @@ create or replace type body ut_expectation_json as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/expectations/ut_expectation_json.tps b/source/expectations/ut_expectation_json.tps index dd3aa5b25..f33c6a580 100644 --- a/source/expectations/ut_expectation_json.tps +++ b/source/expectations/ut_expectation_json.tps @@ -1,7 +1,7 @@ create or replace type ut_expectation_json under ut_expectation( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/install.sql b/source/install.sql index 1f9913b0a..9f91297b2 100644 --- a/source/install.sql +++ b/source/install.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -34,14 +34,7 @@ alter session set current_schema = &&ut3_owner; @@check_sys_grants.sql "'CREATE TYPE','CREATE VIEW','CREATE SYNONYM','CREATE SEQUENCE','CREATE PROCEDURE','CREATE TABLE', 'CREATE CONTEXT'" --set define off -begin - $if $$self_testing_install $then - execute immediate 'create or replace context &&ut3_owner._info using &&ut3_owner..ut_session_context'; - $else - execute immediate 'create or replace context ut3_info using &&ut3_owner..ut_session_context'; - $end -end; -/ +create or replace context &&ut3_owner._info using &&ut3_owner..ut_session_context; --dbms_output buffer cache table @@install_component.sql 'core/ut_dbms_output_cache.sql' @@ -172,9 +165,6 @@ end; prompt Installing PLSQL profiler objects into &&ut3_owner schema @@core/coverage/proftab.sql -prompt Installing PLSQL profiler objects into &&ut3_owner schema -@@core/coverage/proftab.sql - prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema @@core/coverage/dbms_plssqlcode.sql @@ -184,6 +174,7 @@ prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema --gathering coverage @@install_component.sql 'core/coverage/ut_coverage_sources_tmp.sql' +@@install_component.sql 'core/coverage/ut_coverage_runs.sql' @@install_component.sql 'core/coverage/ut_coverage_helper.pks' @@install_component.sql 'core/coverage/ut_coverage_helper_block.pks' @@install_component.sql 'core/coverage/ut_coverage_helper_profiler.pks' @@ -206,6 +197,7 @@ prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema @@install_component.sql 'core/types/ut_logical_suite.tpb' @@install_component.sql 'core/types/ut_suite.tpb' @@install_component.sql 'core/types/ut_suite_context.tpb' +@@install_component.sql 'core/types/ut_coverage_options.tpb' @@install_component.sql 'core/types/ut_run.tpb' @@install_component.sql 'core/types/ut_expectation_result.tpb' @@install_component.sql 'core/types/ut_reporter_base.tpb' diff --git a/source/install_component.sql b/source/install_component.sql index 857c1771c..373c85c54 100644 --- a/source/install_component.sql +++ b/source/install_component.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/install_ddl_trigger.sql b/source/install_ddl_trigger.sql index 843ee0c07..bc147c2be 100644 --- a/source/install_ddl_trigger.sql +++ b/source/install_ddl_trigger.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/install_headless.sql b/source/install_headless.sql index e8cf00705..183262675 100644 --- a/source/install_headless.sql +++ b/source/install_headless.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/install_headless_with_trigger.sql b/source/install_headless_with_trigger.sql index 16d81f3c6..76ae48ccb 100644 --- a/source/install_headless_with_trigger.sql +++ b/source/install_headless_with_trigger.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_ansiconsole_helper.pkb b/source/reporters/ut_ansiconsole_helper.pkb index b015e50be..53e6bc6aa 100644 --- a/source/reporters/ut_ansiconsole_helper.pkb +++ b/source/reporters/ut_ansiconsole_helper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_ansiconsole_helper as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_ansiconsole_helper.pks b/source/reporters/ut_ansiconsole_helper.pks index 7c83ca73b..217d36a49 100644 --- a/source/reporters/ut_ansiconsole_helper.pks +++ b/source/reporters/ut_ansiconsole_helper.pks @@ -1,7 +1,7 @@ create or replace package ut_ansiconsole_helper as /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coverage_cobertura_reporter.tpb b/source/reporters/ut_coverage_cobertura_reporter.tpb index eed8e8e73..48082a6d4 100644 --- a/source/reporters/ut_coverage_cobertura_reporter.tpb +++ b/source/reporters/ut_coverage_cobertura_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_coverage_cobertura_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -70,7 +70,7 @@ create or replace type body ut_coverage_cobertura_reporter is ) return ut_varchar2_rows is l_file_part varchar2(32767); l_result ut_varchar2_rows := ut_varchar2_rows(); - l_unit ut_coverage.t_full_name; + l_unit ut_coverage.t_object_name; l_obj_name ut_coverage.t_object_name; c_coverage_def constant varchar2(200) := ''; c_file_footer constant varchar2(30) := ''; @@ -79,8 +79,10 @@ create or replace type body ut_coverage_cobertura_reporter is c_packages_footer constant varchar2(30) := ''; c_package_footer constant varchar2(30) := ''; c_class_footer constant varchar2(30) := ''; + c_classes_footer constant varchar2(30) := ''; c_lines_footer constant varchar2(30) := ''; l_epoch varchar2(50) := (sysdate - to_date('01-01-1970 00:00:00', 'dd-mm-yyyy hh24:mi:ss')) * 24 * 60 * 60; + l_lines_valid integer := a_coverage_data.covered_lines + a_coverage_data.uncovered_lines; begin ut_utils.append_to_list( l_result, ut_utils.get_xml_header(a_run.client_character_set) ); @@ -89,9 +91,11 @@ create or replace type body ut_coverage_cobertura_reporter is --write header ut_utils.append_to_list( l_result, - '' ); @@ -116,6 +120,11 @@ create or replace type body ut_coverage_cobertura_reporter is l_result, '' ); + + ut_utils.append_to_list( + l_result, + '' + ); ut_utils.append_to_list( l_result, @@ -129,6 +138,7 @@ create or replace type body ut_coverage_cobertura_reporter is ut_utils.append_to_list(l_result, c_lines_footer); ut_utils.append_to_list(l_result, c_class_footer); + ut_utils.append_to_list(l_result, c_classes_footer); ut_utils.append_to_list(l_result, c_package_footer); l_unit := a_coverage_data.objects.next(l_unit); diff --git a/source/reporters/ut_coverage_cobertura_reporter.tps b/source/reporters/ut_coverage_cobertura_reporter.tps index ec5cef2cb..1292e60fb 100644 --- a/source/reporters/ut_coverage_cobertura_reporter.tps +++ b/source/reporters/ut_coverage_cobertura_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_coverage_cobertura_reporter under ut_coverage_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coverage_html_reporter.tpb b/source/reporters/ut_coverage_html_reporter.tpb index 9e51b5cc2..c88c91a80 100644 --- a/source/reporters/ut_coverage_html_reporter.tpb +++ b/source/reporters/ut_coverage_html_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_coverage_html_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coverage_html_reporter.tps b/source/reporters/ut_coverage_html_reporter.tps index f6bdcc249..42f2fd4e3 100644 --- a/source/reporters/ut_coverage_html_reporter.tps +++ b/source/reporters/ut_coverage_html_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_coverage_html_reporter under ut_coverage_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coverage_report_html_helper.pkb b/source/reporters/ut_coverage_report_html_helper.pkb index 00a53c4c6..2bb9a87d9 100644 --- a/source/reporters/ut_coverage_report_html_helper.pkb +++ b/source/reporters/ut_coverage_report_html_helper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_coverage_report_html_helper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -90,7 +90,7 @@ create or replace package body ut_coverage_report_html_helper is function object_id(a_object_full_name varchar2) return varchar2 is begin - return rawtohex(utl_raw.cast_to_raw(dbms_obfuscation_toolkit.md5(input_string => a_object_full_name))); + return rawtohex(dbms_crypto.hash(src => utl_raw.cast_to_raw(a_object_full_name), typ => dbms_crypto.hash_md5)); end; function link_to_source_file(a_object_full_name varchar2) return varchar2 is @@ -287,7 +287,7 @@ create or replace package body ut_coverage_report_html_helper is l_coverage_pct number(5, 2); l_time_str varchar2(50); l_using varchar2(1000); - l_unit ut_coverage.t_full_name; + l_unit ut_coverage.t_object_name; l_charset varchar2(1000); begin l_charset := coalesce(upper(a_charset),'UTF-8'); diff --git a/source/reporters/ut_coverage_report_html_helper.pks b/source/reporters/ut_coverage_report_html_helper.pks index 48dd76acf..42a59c123 100644 --- a/source/reporters/ut_coverage_report_html_helper.pks +++ b/source/reporters/ut_coverage_report_html_helper.pks @@ -1,7 +1,7 @@ create or replace package ut_coverage_report_html_helper authid current_user is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coverage_sonar_reporter.tpb b/source/reporters/ut_coverage_sonar_reporter.tpb index bfe0d890b..4bde1a88d 100644 --- a/source/reporters/ut_coverage_sonar_reporter.tpb +++ b/source/reporters/ut_coverage_sonar_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_coverage_sonar_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -61,7 +61,7 @@ create or replace type body ut_coverage_sonar_reporter is a_run ut_run ) return ut_varchar2_rows is l_result ut_varchar2_rows := ut_varchar2_rows(); - l_unit ut_coverage.t_full_name; + l_unit ut_coverage.t_object_name; c_coverage_header constant varchar2(30) := ''; c_file_footer constant varchar2(30) := ''; c_coverage_footer constant varchar2(30) := ''; diff --git a/source/reporters/ut_coverage_sonar_reporter.tps b/source/reporters/ut_coverage_sonar_reporter.tps index aa21cafe3..f3076368f 100644 --- a/source/reporters/ut_coverage_sonar_reporter.tps +++ b/source/reporters/ut_coverage_sonar_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_coverage_sonar_reporter under ut_coverage_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_coveralls_reporter.tpb b/source/reporters/ut_coveralls_reporter.tpb index 1ca317c69..3a54aa7f7 100644 --- a/source/reporters/ut_coveralls_reporter.tpb +++ b/source/reporters/ut_coveralls_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_coveralls_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ create or replace type body ut_coveralls_reporter is a_coverage_data ut_coverage.t_coverage ) return ut_varchar2_rows is l_result ut_varchar2_rows := ut_varchar2_rows(); - l_unit ut_coverage.t_full_name; + l_unit ut_coverage.t_object_name; c_coverage_header constant varchar2(30) := '{"source_files":['; c_coverage_footer constant varchar2(30) := ']}'||chr(10)||' '; begin diff --git a/source/reporters/ut_coveralls_reporter.tps b/source/reporters/ut_coveralls_reporter.tps index 53e86338e..f3cad3a4e 100644 --- a/source/reporters/ut_coveralls_reporter.tps +++ b/source/reporters/ut_coveralls_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_coveralls_reporter under ut_coverage_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_debug_reporter.tpb b/source/reporters/ut_debug_reporter.tpb index 365f77755..879725172 100644 --- a/source/reporters/ut_debug_reporter.tpb +++ b/source/reporters/ut_debug_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_debug_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ create or replace type body ut_debug_reporter is member function event_item_to_clob(a_event_item ut_event_item) return clob is l_clob clob; begin - select xmlserialize( content deletexml(xmltype(a_event_item),'/*/ITEMS|/*/ALL_EXPECTATIONS|/*/FAILED_EXPECTATIONS') as clob indent size = 2 ) into l_clob from dual; + select /*+ no_parallel */ xmlserialize( content deletexml(xmltype(a_event_item),'/*/ITEMS|/*/ALL_EXPECTATIONS|/*/FAILED_EXPECTATIONS') as clob indent size = 2 ) into l_clob from dual; return l_clob; end; diff --git a/source/reporters/ut_debug_reporter.tps b/source/reporters/ut_debug_reporter.tps index 5fbab61fb..2123f19cc 100644 --- a/source/reporters/ut_debug_reporter.tps +++ b/source/reporters/ut_debug_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_debug_reporter under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_documentation_reporter.tpb b/source/reporters/ut_documentation_reporter.tpb index 7210e1cb6..8b92d447f 100644 --- a/source/reporters/ut_documentation_reporter.tpb +++ b/source/reporters/ut_documentation_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_documentation_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_documentation_reporter.tps b/source/reporters/ut_documentation_reporter.tps index 08097e7d4..422225117 100644 --- a/source/reporters/ut_documentation_reporter.tps +++ b/source/reporters/ut_documentation_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_documentation_reporter under ut_console_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_junit_reporter.tpb b/source/reporters/ut_junit_reporter.tpb index aa6786f6f..94ea5c5e6 100644 --- a/source/reporters/ut_junit_reporter.tpb +++ b/source/reporters/ut_junit_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_junit_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_junit_reporter.tps b/source/reporters/ut_junit_reporter.tps index ca6cf505b..6cdaff1b9 100644 --- a/source/reporters/ut_junit_reporter.tps +++ b/source/reporters/ut_junit_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_junit_reporter force under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_realtime_reporter.tpb b/source/reporters/ut_realtime_reporter.tpb index 64eb343e5..837643b0b 100644 --- a/source/reporters/ut_realtime_reporter.tpb +++ b/source/reporters/ut_realtime_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_realtime_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. @@ -252,7 +252,7 @@ create or replace type body ut_realtime_reporter is ) is begin if a_content is not null then - self.print_xml_fragment('<' || a_name || '>'); + self.print_xml_fragment('<' || a_name || '>' || ut_utils.to_cdata(a_content) || ''); end if; end print_cdata_node; diff --git a/source/reporters/ut_realtime_reporter.tps b/source/reporters/ut_realtime_reporter.tps index 99efed387..0501006e4 100644 --- a/source/reporters/ut_realtime_reporter.tps +++ b/source/reporters/ut_realtime_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_realtime_reporter force under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_sonar_test_reporter.tpb b/source/reporters/ut_sonar_test_reporter.tpb index 6d76b5d41..8b043832a 100644 --- a/source/reporters/ut_sonar_test_reporter.tpb +++ b/source/reporters/ut_sonar_test_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_sonar_test_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_sonar_test_reporter.tps b/source/reporters/ut_sonar_test_reporter.tps index 8bdb067df..ac3b16bd1 100644 --- a/source/reporters/ut_sonar_test_reporter.tps +++ b/source/reporters/ut_sonar_test_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_sonar_test_reporter under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_teamcity_reporter.tpb b/source/reporters/ut_teamcity_reporter.tpb index 9475c0a90..3e1a4bcf8 100644 --- a/source/reporters/ut_teamcity_reporter.tpb +++ b/source/reporters/ut_teamcity_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_teamcity_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_teamcity_reporter.tps b/source/reporters/ut_teamcity_reporter.tps index 2738ec00e..e03fa3643 100644 --- a/source/reporters/ut_teamcity_reporter.tps +++ b/source/reporters/ut_teamcity_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_teamcity_reporter under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_teamcity_reporter_helper.pkb b/source/reporters/ut_teamcity_reporter_helper.pkb index 2d165d7a3..3a4679cb4 100644 --- a/source/reporters/ut_teamcity_reporter_helper.pkb +++ b/source/reporters/ut_teamcity_reporter_helper.pkb @@ -1,7 +1,7 @@ create or replace package body ut_teamcity_reporter_helper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_teamcity_reporter_helper.pks b/source/reporters/ut_teamcity_reporter_helper.pks index 7258999e1..d94099411 100644 --- a/source/reporters/ut_teamcity_reporter_helper.pks +++ b/source/reporters/ut_teamcity_reporter_helper.pks @@ -1,7 +1,7 @@ create or replace package ut_teamcity_reporter_helper is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_tfs_junit_reporter.tpb b/source/reporters/ut_tfs_junit_reporter.tpb index 5262ac687..e14af1d4d 100644 --- a/source/reporters/ut_tfs_junit_reporter.tpb +++ b/source/reporters/ut_tfs_junit_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_tfs_junit_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_tfs_junit_reporter.tps b/source/reporters/ut_tfs_junit_reporter.tps index ecf422bd3..61cbc3fd8 100644 --- a/source/reporters/ut_tfs_junit_reporter.tps +++ b/source/reporters/ut_tfs_junit_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_tfs_junit_reporter under ut_output_reporter_base( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_xunit_reporter.tpb b/source/reporters/ut_xunit_reporter.tpb index b06c20810..eab0c8a3c 100644 --- a/source/reporters/ut_xunit_reporter.tpb +++ b/source/reporters/ut_xunit_reporter.tpb @@ -1,7 +1,7 @@ create or replace type body ut_xunit_reporter is /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/reporters/ut_xunit_reporter.tps b/source/reporters/ut_xunit_reporter.tps index b09205171..6c530fee4 100644 --- a/source/reporters/ut_xunit_reporter.tps +++ b/source/reporters/ut_xunit_reporter.tps @@ -1,7 +1,7 @@ create or replace type ut_xunit_reporter under ut_junit_reporter( /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/set_install_params.sql b/source/set_install_params.sql index 4dc33c367..34a23dc93 100644 --- a/source/set_install_params.sql +++ b/source/set_install_params.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/uninstall.sql b/source/uninstall.sql index 760bf89b7..ced7b8dc4 100644 --- a/source/uninstall.sql +++ b/source/uninstall.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/uninstall_all.sql b/source/uninstall_all.sql index 32180d762..cfaaaa29f 100644 --- a/source/uninstall_all.sql +++ b/source/uninstall_all.sql @@ -1,6 +1,6 @@ /* utPLSQL - Version 3 - Copyright 2016 - 2019 utPLSQL Project + Copyright 2016 - 2021 utPLSQL Project Licensed under the Apache License, Version 2.0 (the "License"): you may not use this file except in compliance with the License. diff --git a/source/uninstall_coverage_tables.sql b/source/uninstall_coverage_tables.sql index 8de75b51e..890aa7090 100644 --- a/source/uninstall_coverage_tables.sql +++ b/source/uninstall_coverage_tables.sql @@ -11,7 +11,7 @@ begin and owner = sys_context( 'USERENV', 'CURRENT_SCHEMA' ) ) loop - execute immediate 'drop table '||to_be_dopped.table_name||' cascade constraints'; + execute immediate 'drop table '||to_be_dopped.table_name||' cascade constraints purge'; dbms_output.put_line('Table '||to_be_dopped.table_name||' dropped'); end loop; end; diff --git a/source/uninstall_objects.sql b/source/uninstall_objects.sql index c905153f4..230e394ee 100644 --- a/source/uninstall_objects.sql +++ b/source/uninstall_objects.sql @@ -74,6 +74,8 @@ drop package ut_coverage_helper; drop table ut_coverage_sources_tmp purge; +drop table ut_coverage_runs purge; + drop package ut_teamcity_reporter_helper; drop package ut_runner; @@ -196,7 +198,7 @@ drop table ut_compound_data_tmp purge; drop table ut_compound_data_diff_tmp purge; -drop table ut_json_data_diff_tmp; +drop table ut_json_data_diff_tmp purge; drop package ut_annotation_manager; diff --git a/test/install_tests.sh b/test/install_tests.sh index e07b4d2b3..4ccc312e8 100755 --- a/test/install_tests.sh +++ b/test/install_tests.sh @@ -1,9 +1,9 @@ #!/bin/bash set -ev -#goto git root directory -git rev-parse && cd "$(git rev-parse --show-cdup)" -cd test +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +cd ${SCRIPT_DIR} + "$SQLCLI" ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWORD}@//${CONNECTION_STR} @install_ut3_tester_helper.sql diff --git a/test/install_ut3_tester_helper.sql b/test/install_ut3_tester_helper.sql index c0c20634e..9841252a0 100644 --- a/test/install_ut3_tester_helper.sql +++ b/test/install_ut3_tester_helper.sql @@ -29,6 +29,7 @@ alter session set plsql_optimize_level=0; @@ut3_tester_helper/annotation_cache_helper.pks @@ut3_tester_helper/annotation_cache_helper.pkb create or replace synonym ut3_tester.annotation_cache_helper for ut3_tester_helper.annotation_cache_helper; +create or replace synonym ut3$user#.coverage_helper for ut3_tester_helper.coverage_helper; set linesize 200 set define on diff --git a/test/install_ut3_user_tests.sql b/test/install_ut3_user_tests.sql index 05f2634e8..e790293c8 100644 --- a/test/install_ut3_user_tests.sql +++ b/test/install_ut3_user_tests.sql @@ -42,16 +42,16 @@ set define off @@ut3_user/reporters/test_debug_reporter.pks @@ut3_user/reporters/test_realtime_reporter.pks @@ut3_user/reporters/test_coverage.pks +@@ut3_user/reporters/test_coverage/test_coverage_standalone.pks set define on -@@install_above_12_1.sql 'ut3_user/reporters/test_extended_coverage.pks' -@@install_above_12_1.sql 'ut3_user/reporters/test_coverage/test_html_extended_reporter.pks' +@@ut3_user/reporters/test_coverage/test_extended_coverage.pks +@@ut3_user/reporters/test_coverage/test_html_coverage_reporter.pks set define off @@ut3_user/reporters/test_coverage/test_coveralls_reporter.pks @@ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks @@ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pks set define on -@@install_below_12_2.sql 'ut3_user/reporters/test_proftab_coverage.pks' -@@install_below_12_2.sql 'ut3_user/reporters/test_coverage/test_html_proftab_reporter.pks' +@@ut3_user/reporters/test_coverage/test_proftab_coverage.pks set define off @@ut3_user/test_user.pkb @@ -82,17 +82,16 @@ set define off @@ut3_user/reporters/test_documentation_reporter.pkb @@ut3_user/reporters/test_debug_reporter.pkb @@ut3_user/reporters/test_realtime_reporter.pkb -@@ut3_user/reporters/test_coverage.pkb +@@ut3_user/reporters/test_coverage/test_coverage_standalone.pkb set define on -@@install_above_12_1.sql 'ut3_user/reporters/test_extended_coverage.pkb' -@@install_above_12_1.sql 'ut3_user/reporters/test_coverage/test_html_extended_reporter.pkb' +@@ut3_user/reporters/test_coverage/test_extended_coverage.pkb +@@ut3_user/reporters/test_coverage/test_html_coverage_reporter.pkb set define off @@ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb @@ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb @@ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb set define on -@@install_below_12_2.sql 'ut3_user/reporters/test_proftab_coverage.pkb' -@@install_below_12_2.sql 'ut3_user/reporters/test_coverage/test_html_proftab_reporter.pkb' +@@ut3_user/reporters/test_coverage/test_proftab_coverage.pkb set define off diff --git a/test/run_tests.sh b/test/run_tests.sh index 29086f5f7..0edc4d96d 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -5,7 +5,7 @@ set -ev git rev-parse && cd "$(git rev-parse --show-cdup)" time utPLSQL-cli/bin/utplsql run ${UT3_TESTER_HELPER}/${UT3_TESTER_HELPER_PASSWORD}@${CONNECTION_STR} \ --source_path=source -owner=ut3 \ +-source_path=source -owner=ut3_develop \ -p='ut3_tester,ut3$user#' \ -test_path=test -c \ -f=ut_coverage_sonar_reporter -o=coverage.xml \ diff --git a/test/ut3_tester/core/annotations/test_annot_throws_exception.pkb b/test/ut3_tester/core/annotations/test_annot_throws_exception.pkb index 04e65a6c2..ac51d3a49 100644 --- a/test/ut3_tester/core/annotations/test_annot_throws_exception.pkb +++ b/test/ut3_tester/core/annotations/test_annot_throws_exception.pkb @@ -8,7 +8,7 @@ is l_package_spec varchar2(32737); l_package_body varchar2(32737); l_exception_spec varchar2(32737); - l_test_results ut3.ut_varchar2_list; + l_test_results ut3_develop.ut_varchar2_list; begin l_exception_spec := q'[ create or replace package exc_pkg is @@ -251,9 +251,9 @@ is execute immediate l_package_body; - select * bulk collect into l_test_results from table(ut3.ut.run(('annotated_package_with_throws'))); + select * bulk collect into l_test_results from table(ut3_develop.ut.run(('annotated_package_with_throws'))); - g_tests_results := ut3.ut_utils.table_to_clob(l_test_results); + g_tests_results := ut3_develop.ut_utils.table_to_clob(l_test_results); end; procedure throws_same_annotated_except is diff --git a/test/ut3_tester/core/annotations/test_annotation_cache.pkb b/test/ut3_tester/core/annotations/test_annotation_cache.pkb index 372fec890..eefaf8800 100644 --- a/test/ut3_tester/core/annotations/test_annotation_cache.pkb +++ b/test/ut3_tester/core/annotations/test_annotation_cache.pkb @@ -6,7 +6,7 @@ create or replace package body test_annotation_cache is begin open l_actual_cache_info for select * - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = 'UT3_CACHE_TEST_OWNER'; open l_expected_cache_info for select 'UT3_CACHE_TEST_OWNER' as object_owner, upper( column_value ) as object_name @@ -14,6 +14,19 @@ create or replace package body test_annotation_cache is ut.expect( l_actual_cache_info ).to_equal( l_expected_cache_info ).exclude( 'CACHE_ID,PARSE_TIME,OBJECT_TYPE' ).JOIN_BY('OBJECT_NAME'); end; + procedure cant_run_any_packages(a_user varchar2) is + l_actual clob; + l_current_time date := sysdate; + pragma autonomous_transaction; + begin + --Act + l_actual := annotation_cache_helper.run_tests_as( a_user ); + + --Assert - no suites are + ut.expect( l_actual ).to_be_like( '%0 tests, 0 failed%' ); + rollback; + end; + procedure can_run_one_package(a_user varchar2) is l_actual clob; l_current_time date := sysdate; @@ -380,6 +393,11 @@ create or replace package body test_annotation_cache is cache_populated_for_packages( ut_varchar2_rows( 'GRANTED_TEST_SUITE', 'NOT_GRANTED_TEST_SUITE' ) ); end; + procedure t_ut_owner_cannot_run_tests is + begin + cant_run_any_packages( 'ut3_develop' ); + cache_populated_for_packages( ut_varchar2_rows( 'GRANTED_TEST_SUITE', 'NOT_GRANTED_TEST_SUITE' ) ); + end; diff --git a/test/ut3_tester/core/annotations/test_annotation_cache.pks b/test/ut3_tester/core/annotations/test_annotation_cache.pks index f44b816e1..5a3fdd8ca 100644 --- a/test/ut3_tester/core/annotations/test_annotation_cache.pks +++ b/test/ut3_tester/core/annotations/test_annotation_cache.pks @@ -89,6 +89,13 @@ create or replace package test_annotation_cache is --%endcontext + --%context(utPLSQL framework owner) + + --%test(Cannot see any tests and doesn't impact annotation cache ) + procedure t_ut_owner_cannot_run_tests; + + --%endcontext + --%endcontext --%context(With DDL trigger disabled) diff --git a/test/ut3_tester/core/annotations/test_annotation_manager.pkb b/test/ut3_tester/core/annotations/test_annotation_manager.pkb index 8a3efc508..a5503f841 100644 --- a/test/ut3_tester/core/annotations/test_annotation_manager.pkb +++ b/test/ut3_tester/core/annotations/test_annotation_manager.pkb @@ -101,14 +101,14 @@ create or replace package body test_annotation_manager is begin select max(cache_id) into l_actual_cache_id - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE' and parse_time >= a_start_date; ut.expect(l_actual_cache_id).to_be_not_null; open l_actual for select annotation_position, annotation_name, annotation_text, subobject_name - from ut3.ut_annotation_cache where cache_id = l_actual_cache_id + from ut3_develop.ut_annotation_cache where cache_id = l_actual_cache_id order by annotation_position; ut.expect(l_actual).to_be_empty(); @@ -116,26 +116,26 @@ create or replace package body test_annotation_manager is procedure assert_dummy_test_package(a_start_time timestamp) is l_actual_cache_id integer; - l_data ut3.ut_annotated_objects; + l_data ut3_develop.ut_annotated_objects; l_result sys_refcursor; l_actual sys_refcursor; l_expected sys_refcursor; begin open l_expected for select - ut3.ut_annotated_object( + ut3_develop.ut_annotated_object( sys_context('USERENV', 'CURRENT_USER'), 'DUMMY_TEST_PACKAGE', 'PACKAGE', a_start_time, - ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', 'dummy_test_suite', null ), - ut3.ut_annotation( 3, 'rollback', 'manual', null ), - ut3.ut_annotation( 7, 'test', 'dummy_test', 'some_dummy_test_procedure' ), - ut3.ut_annotation( 8, 'beforetest', 'some_procedure', 'some_dummy_test_procedure' ) + ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', 'dummy_test_suite', null ), + ut3_develop.ut_annotation( 3, 'rollback', 'manual', null ), + ut3_develop.ut_annotation( 7, 'test', 'dummy_test', 'some_dummy_test_procedure' ), + ut3_develop.ut_annotation( 8, 'beforetest', 'some_procedure', 'some_dummy_test_procedure' ) ) ) annotated_object from dual; - l_result := ut3.ut_annotation_manager.get_annotated_objects(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE', a_start_time); + l_result := ut3_develop.ut_annotation_manager.get_annotated_objects(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE', a_start_time); fetch l_result bulk collect into l_data; open l_actual for select value(x) as annotated_object from table(l_data) x where object_name = 'DUMMY_TEST_PACKAGE'; ut.expect(l_actual).to_equal(l_expected).exclude('ANNOTATED_OBJECT/PARSE_TIME').join_by('ANNOTATED_OBJECT/OBJECT_NAME'); @@ -153,7 +153,7 @@ create or replace package body test_annotation_manager is --Assert select max(cache_id) into l_actual_cache_id - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE'; ut.expect(l_actual_cache_id).to_be_null; @@ -185,7 +185,7 @@ create or replace package body test_annotation_manager is --Act annotation_cache_helper.enable_ddl_trigger(); l_start_date := sysdate; - ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); --Assert assert_dummy_test_package(l_start_date); assert_dummy_package(l_start_date); @@ -197,7 +197,7 @@ create or replace package body test_annotation_manager is --Arrange open l_actual for select * - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE'; ut.expect(l_actual).to_be_empty(); @@ -207,7 +207,7 @@ create or replace package body test_annotation_manager is --Assert open l_actual for select * - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_PACKAGE'; ut.expect(l_actual).to_be_empty(); @@ -233,7 +233,7 @@ create or replace package body test_annotation_manager is --Assert open l_actual for select * - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE'; @@ -247,7 +247,7 @@ create or replace package body test_annotation_manager is --Arrange create_dummy_test_package(); l_start_date := sysdate; - ut3.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE'); + ut3_develop.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE'); --Act & Assert assert_dummy_test_package(l_start_date); end; @@ -273,7 +273,7 @@ create or replace package body test_annotation_manager is --Assert ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ), 'Annotations are empty after package was dropped' @@ -287,7 +287,7 @@ create or replace package body test_annotation_manager is create_dummy_package(); --Act & Assert ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ), 'Annotations are empty for not annotated package' @@ -300,7 +300,7 @@ create or replace package body test_annotation_manager is --Arrange create_dummy_package(); ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ), 'Annotations are empty for non annotated package' @@ -311,7 +311,7 @@ create or replace package body test_annotation_manager is --Assert ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ), 'Annotations are empty after non annoteted package was dropped' @@ -332,7 +332,7 @@ create or replace package body test_annotation_manager is --Assert ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ) ).to_be_empty(); @@ -346,7 +346,7 @@ create or replace package body test_annotation_manager is procedure some_dummy_test_procedure; end;]'); ut.expect( - ut3.ut_annotation_manager.get_annotated_objects( + ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context( 'USERENV', 'CURRENT_USER' ), 'PACKAGE', l_start_time ) ).to_be_empty(); @@ -365,15 +365,15 @@ create or replace package body test_annotation_manager is l_start_date date; begin --Arrange - ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); l_start_date := sysdate; modify_dummy_test_package(); --Act - ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); --Assert select max(cache_id) into l_actual_cache_id - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE' and parse_time >= l_start_date; @@ -381,7 +381,7 @@ create or replace package body test_annotation_manager is open l_actual for select annotation_position, annotation_name, annotation_text, subobject_name - from ut3.ut_annotation_cache where cache_id = l_actual_cache_id + from ut3_develop.ut_annotation_cache where cache_id = l_actual_cache_id order by annotation_position; open l_expected for @@ -407,7 +407,7 @@ create or replace package body test_annotation_manager is --Assert select count(1) into l_cache_count - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE' @@ -417,14 +417,14 @@ create or replace package body test_annotation_manager is procedure no_data_for_dropped_object is l_result sys_refcursor; - l_data ut3.ut_annotated_objects; + l_data ut3_develop.ut_annotated_objects; l_actual sys_refcursor; l_start_time timestamp := systimestamp; begin --Arrange drop_dummy_test_package(); --Act - l_result := ut3.ut_annotation_manager.get_annotated_objects( sys_context('USERENV', 'CURRENT_USER'),'PACKAGE', l_start_time ); + l_result := ut3_develop.ut_annotation_manager.get_annotated_objects( sys_context('USERENV', 'CURRENT_USER'),'PACKAGE', l_start_time ); fetch l_result bulk collect into l_data; open l_actual for select object_name from table(l_data) where object_name = 'DUMMY_TEST_PACKAGE'; --Assert @@ -435,14 +435,14 @@ create or replace package body test_annotation_manager is l_cache_count integer; begin --Arrange - ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); drop_dummy_test_package(); --Act - ut3.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache(sys_context('USERENV', 'CURRENT_USER'),'PACKAGE'); --Assert select count(1) into l_cache_count - from ut3.ut_annotation_cache_info + from ut3_develop.ut_annotation_cache_info where object_owner = sys_context('USERENV', 'CURRENT_USER') and object_type = 'PACKAGE' and object_name = 'DUMMY_TEST_PACKAGE'; @@ -457,7 +457,7 @@ create or replace package body test_annotation_manager is --Arrange create_dummy_test_package(); l_start_date := sysdate; - ut3.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE'); + ut3_develop.ut_annotation_manager.purge_cache(sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE'); --Act & Assert assert_dummy_test_package(l_start_date); end; diff --git a/test/ut3_tester/core/annotations/test_annotation_parser.pkb b/test/ut3_tester/core/annotations/test_annotation_parser.pkb index c4c90c046..bc789c377 100644 --- a/test/ut3_tester/core/annotations/test_annotation_parser.pkb +++ b/test/ut3_tester/core/annotations/test_annotation_parser.pkb @@ -2,8 +2,8 @@ create or replace package body test_annotation_parser is procedure test_proc_comments is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -18,16 +18,16 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation(2,'suite',null, null), - ut3.ut_annotation(3,'displayname','Name of suite',null), - ut3.ut_annotation(4,'suitepath','all.globaltests',null), - ut3.ut_annotation(6,'ann1','Name of suite',null), - ut3.ut_annotation(8,'ann2','some_value','foo') + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2,'suite',null, null), + ut3_develop.ut_annotation(3,'displayname','Name of suite',null), + ut3_develop.ut_annotation(4,'suitepath','all.globaltests',null), + ut3_develop.ut_annotation(6,'ann1','Name of suite',null), + ut3_develop.ut_annotation(8,'ann2','some_value','foo') ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -35,8 +35,8 @@ create or replace package body test_annotation_parser is procedure include_floating_annotations is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS -- %suite @@ -57,19 +57,19 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), - ut3.ut_annotation( 6, 'ann1', 'Name of suite', null ), - ut3.ut_annotation( 7, 'ann2', 'all.globaltests', null ), - ut3.ut_annotation( 9, 'test', null, 'foo'), - ut3.ut_annotation( 12, 'ann3', 'Name of suite', null ), - ut3.ut_annotation( 13, 'ann4', 'all.globaltests', null ), - ut3.ut_annotation( 15, 'test', null, 'bar') + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), + ut3_develop.ut_annotation( 6, 'ann1', 'Name of suite', null ), + ut3_develop.ut_annotation( 7, 'ann2', 'all.globaltests', null ), + ut3_develop.ut_annotation( 9, 'test', null, 'foo'), + ut3_develop.ut_annotation( 12, 'ann3', 'Name of suite', null ), + ut3_develop.ut_annotation( 13, 'ann4', 'all.globaltests', null ), + ut3_develop.ut_annotation( 15, 'test', null, 'bar') ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -78,8 +78,8 @@ create or replace package body test_annotation_parser is procedure parse_complex_with_functions is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -110,17 +110,17 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), - ut3.ut_annotation( 6, 'test', null, 'foo' ), - ut3.ut_annotation( 10, 'beforeeach', null,'foo2' ), - ut3.ut_annotation( 20, 'beforeeach', 'key=testval','foo3' ), - ut3.ut_annotation( 23, 'all', null,'foo4' ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), + ut3_develop.ut_annotation( 6, 'test', null, 'foo' ), + ut3_develop.ut_annotation( 10, 'beforeeach', null,'foo2' ), + ut3_develop.ut_annotation( 20, 'beforeeach', 'key=testval','foo3' ), + ut3_develop.ut_annotation( 23, 'all', null,'foo4' ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -129,8 +129,8 @@ create or replace package body test_annotation_parser is procedure no_procedure_annotation is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -142,13 +142,13 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -157,8 +157,8 @@ create or replace package body test_annotation_parser is procedure parse_accessible_by is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt accessible by (foo) AS @@ -170,13 +170,13 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -185,8 +185,8 @@ create or replace package body test_annotation_parser is procedure complex_package_declaration is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt @@ -201,13 +201,13 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 5, 'suite', null, null ), - ut3.ut_annotation( 6, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 7, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 5, 'suite', null, null ), + ut3_develop.ut_annotation( 6, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 7, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -216,8 +216,8 @@ create or replace package body test_annotation_parser is procedure complex_text is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -229,13 +229,13 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'name = Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'key=all.globaltests,key2=foo,"--%some text"', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'name = Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'key=all.globaltests,key2=foo,"--%some text"', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -244,8 +244,8 @@ create or replace package body test_annotation_parser is procedure ignore_annotations_in_comments is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -262,13 +262,13 @@ create or replace package body test_annotation_parser is END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 7, 'suite', null, null ), - ut3.ut_annotation( 8, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 9, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 7, 'suite', null, null ), + ut3_develop.ut_annotation( 8, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 9, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -277,7 +277,7 @@ create or replace package body test_annotation_parser is procedure ignore_wrapped_package is l_source dbms_preprocessor.source_lines_t; - l_actual ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; begin --Arrange l_source(1) := 'create or replace PACKAGE tst_wrapped_pck wrapped @@ -305,7 +305,7 @@ v58yvbLAXLi9gYHwoIvAgccti+Cmpg0DKLY= -- %some_annotation_like_text '; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source,'PACKAGE'); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source,'PACKAGE'); --Assert ut.expect(anydata.convertCollection(l_actual)).to_be_empty(); end; @@ -313,19 +313,19 @@ v58yvbLAXLi9gYHwoIvAgccti+Cmpg0DKLY= procedure brackets_in_desc is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS -- %suite(Name of suite (including some brackets) and some more text) END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', 'Name of suite (including some brackets) and some more text', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', 'Name of suite (including some brackets) and some more text', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -333,8 +333,8 @@ END;'; procedure test_space_before_annot_params is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS @@ -349,12 +349,12 @@ END;'; END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 6, 'suite', null, null ), - ut3.ut_annotation( 7, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 6, 'suite', null, null ), + ut3_develop.ut_annotation( 7, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -363,8 +363,8 @@ END;'; procedure test_windows_newline as l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS -- %suite @@ -373,13 +373,13 @@ END;'; END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -388,8 +388,8 @@ END;'; procedure test_annot_very_long_name as l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it AS -- %suite @@ -401,14 +401,14 @@ END;'; END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), - ut3.ut_annotation( 6, 'test', null, 'very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_dit_it' ) + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), + ut3_develop.ut_annotation( 6, 'test', null, 'very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_dit_it' ) ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); @@ -416,8 +416,8 @@ END;'; procedure test_upper_annot is l_source clob; - l_actual ut3.ut_annotations; - l_expected ut3.ut_annotations; + l_actual ut3_develop.ut_annotations; + l_expected ut3_develop.ut_annotations; begin l_source := 'PACKAGE test_tt AS -- %SUITE @@ -438,19 +438,19 @@ END;'; END;'; --Act - l_actual := ut3.ut_annotation_parser.parse_object_annotations(l_source); + l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source); --Assert - l_expected := ut3.ut_annotations( - ut3.ut_annotation( 2, 'suite', null, null ), - ut3.ut_annotation( 3, 'displayname', 'Name of suite', null ), - ut3.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), - ut3.ut_annotation( 6, 'ann1', 'Name of suite', null ), - ut3.ut_annotation( 7, 'ann2', 'all.globaltests', null ), - ut3.ut_annotation( 9, 'test', null, 'foo'), - ut3.ut_annotation( 12, 'ann3', 'Name of suite', null ), - ut3.ut_annotation( 13, 'ann4', 'all.globaltests', null ), - ut3.ut_annotation( 15, 'test', null, 'bar') + l_expected := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 2, 'suite', null, null ), + ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ), + ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ), + ut3_develop.ut_annotation( 6, 'ann1', 'Name of suite', null ), + ut3_develop.ut_annotation( 7, 'ann2', 'all.globaltests', null ), + ut3_develop.ut_annotation( 9, 'test', null, 'foo'), + ut3_develop.ut_annotation( 12, 'ann3', 'Name of suite', null ), + ut3_develop.ut_annotation( 13, 'ann4', 'all.globaltests', null ), + ut3_develop.ut_annotation( 15, 'test', null, 'bar') ); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); diff --git a/test/ut3_tester/core/annotations/test_before_after_annotations.pkb b/test/ut3_tester/core/annotations/test_before_after_annotations.pkb index e2f34e847..75bbadcc0 100644 --- a/test/ut3_tester/core/annotations/test_before_after_annotations.pkb +++ b/test/ut3_tester/core/annotations/test_before_after_annotations.pkb @@ -28,7 +28,7 @@ create or replace package body test_before_after_annotations is l_dummy_utility_pkg_body varchar2(32737); l_test_package_spec varchar2(32737); l_test_package_body varchar2(32737); - l_test_results ut3.ut_varchar2_list; + l_test_results ut3_develop.ut_varchar2_list; begin l_dummy_utility_pkg_spec := q'[ @@ -200,7 +200,7 @@ create or replace package body test_before_after_annotations is execute immediate l_test_package_body; --Execute the tests and collect the results - select * bulk collect into l_test_results from table(ut3.ut.run(('ut3_tester.dummy_before_after_test'))); + select * bulk collect into l_test_results from table(ut3_develop.ut.run(('ut3_tester.dummy_before_after_test'))); execute immediate 'drop package dummy_before_after_test'; execute immediate 'drop package shared_test_package'; diff --git a/test/ut3_tester/core/expectations/test_expectation_processor.pkb b/test/ut3_tester/core/expectations/test_expectation_processor.pkb index c061e55d4..63ce3c791 100644 --- a/test/ut3_tester/core/expectations/test_expectation_processor.pkb +++ b/test/ut3_tester/core/expectations/test_expectation_processor.pkb @@ -33,7 +33,7 @@ cba24bfad0 75 SCH_TEST.UT_LOGICAL_SUITE 20be951ab0 320 package body SCH_TEST.UT ]'; ut.expect( - ut3.ut_expectation_processor.who_called_expectation(l_stack_trace) + ut3_develop.ut_expectation_processor.who_called_expectation(l_stack_trace) ).to_equal('at "'||gc_user||'.TEST_EXPECTATION_PROCESSOR", line 7 l_source_line varchar2(4000); at "'||gc_user||'.TEST_EXPECTATION_PROCESSOR", line 12 at "'||gc_user||'.TEST_EXPECTATION_PROCESSOR", line 24'); @@ -47,24 +47,24 @@ at "'||gc_user||'.TEST_EXPECTATION_PROCESSOR", line 24'); l_stack_trace := q'[----- PL/SQL Call Stack ----- object line object handle number name -0x80e701d8 26 UT3.UT_EXPECTATION_RESULT -0x85e10150 112 UT3.UT_EXPECTATION -0x8b54bad8 21 UT3.UT_EXPECTATION_NUMBER -0x85cfd238 20 package body UT3.UT_EXAMPLETEST +0x80e701d8 26 UT3_DEVELOP.UT_EXPECTATION_RESULT +0x85e10150 112 UT3_DEVELOP.UT_EXPECTATION +0x8b54bad8 21 UT3_DEVELOP.UT_EXPECTATION_NUMBER +0x85cfd238 20 package body UT3_DEVELOP.UT_EXAMPLETEST 0x85def380 6 anonymous block 0x85e93750 1825 package body SYS.DBMS_SQL -0x80f4f608 129 UT3.UT_EXECUTABLE -0x80f4f608 65 UT3.UT_EXECUTABLE -0x8a116010 76 UT3.UT_TEST -0x8a3348a0 48 UT3.UT_SUITE_ITEM -0x887e9948 67 UT3.UT_LOGICAL_SUITE -0x8a26de20 59 UT3.UT_RUN -0x8a3348a0 48 UT3.UT_SUITE_ITEM +0x80f4f608 129 UT3_DEVELOP.UT_EXECUTABLE +0x80f4f608 65 UT3_DEVELOP.UT_EXECUTABLE +0x8a116010 76 UT3_DEVELOP.UT_TEST +0x8a3348a0 48 UT3_DEVELOP.UT_SUITE_ITEM +0x887e9948 67 UT3_DEVELOP.UT_LOGICAL_SUITE +0x8a26de20 59 UT3_DEVELOP.UT_RUN +0x8a3348a0 48 UT3_DEVELOP.UT_SUITE_ITEM 0x838d17c0 28 anonymous block ]'; ut.expect( - ut3.ut_expectation_processor.who_called_expectation(l_stack_trace) - ).to_be_like('at "UT3.UT_EXAMPLETEST", line 20 %'); + ut3_develop.ut_expectation_processor.who_called_expectation(l_stack_trace) + ).to_be_like('at "UT3_DEVELOP.UT_EXAMPLETEST", line 20 %'); end; procedure who_call_expectation_win_stack is @@ -82,22 +82,22 @@ handle number name 00007FF81FF207B0 345 type body SCOTT.TEST_BETWNSTR.BASIC_USAGE_TYP 00007FF8544B21B8 6 anonymous block 00007FF8267FBFC8 1721 package body SYS.DBMS_SQL.EXECUTE -00007FF852BCFC68 142 type body UT3.UT_EXECUTABLE.DO_EXECUTE -00007FF852BCFC68 44 type body UT3.UT_EXECUTABLE.DO_EXECUTE -00007FF8512F9A90 74 type body UT3.UT_EXECUTABLE_TEST.DO_EXECUTE -00007FF8512F9A90 38 type body UT3.UT_EXECUTABLE_TEST.DO_EXECUTE -00007FF8231A2088 79 type body UT3.UT_TEST.DO_EXECUTE -00007FF81FF207B0 49 type body UT3.UT_SUITE_ITEM.DO_EXECUTE -00007FF852C83270 66 type body UT3.UT_SUITE.DO_EXECUTE -00007FF82165F3B0 67 type body UT3.UT_RUN.DO_EXECUTE -00007FF81FF207B0 49 type body UT3.UT_SUITE_ITEM.DO_EXECUTE -00007FF8266285C0 172 package body UT3.UT_RUNNER.RUN -00007FF854710538 134 package body UT3.UT.RUN_AUTONOMOUS -00007FF854710538 488 package body UT3.UT.RUN -00007FF854710538 623 package body UT3.UT.RUN +00007FF852BCFC68 142 type body UT3_DEVELOP.UT_EXECUTABLE.DO_EXECUTE +00007FF852BCFC68 44 type body UT3_DEVELOP.UT_EXECUTABLE.DO_EXECUTE +00007FF8512F9A90 74 type body UT3_DEVELOP.UT_EXECUTABLE_TEST.DO_EXECUTE +00007FF8512F9A90 38 type body UT3_DEVELOP.UT_EXECUTABLE_TEST.DO_EXECUTE +00007FF8231A2088 79 type body UT3_DEVELOP.UT_TEST.DO_EXECUTE +00007FF81FF207B0 49 type body UT3_DEVELOP.UT_SUITE_ITEM.DO_EXECUTE +00007FF852C83270 66 type body UT3_DEVELOP.UT_SUITE.DO_EXECUTE +00007FF82165F3B0 67 type body UT3_DEVELOP.UT_RUN.DO_EXECUTE +00007FF81FF207B0 49 type body UT3_DEVELOP.UT_SUITE_ITEM.DO_EXECUTE +00007FF8266285C0 172 package body UT3_DEVELOP.UT_RUNNER.RUN +00007FF854710538 134 package body UT3_DEVELOP.UT.RUN_AUTONOMOUS +00007FF854710538 488 package body UT3_DEVELOP.UT.RUN +00007FF854710538 623 package body UT3_DEVELOP.UT.RUN 00007FF81CFFA388 1 anonymous block]'; ut.expect( - ut3.ut_expectation_processor.who_called_expectation(l_stack_trace) + ut3_develop.ut_expectation_processor.who_called_expectation(l_stack_trace) ).to_be_like('at "SCOTT.TEST_BETWNSTR.BASIC_USAGE", line 7 %'); end; diff --git a/test/ut3_tester/core/test_file_mapper.pkb b/test/ut3_tester/core/test_file_mapper.pkb index 3813c9450..fccc487bd 100644 --- a/test/ut3_tester/core/test_file_mapper.pkb +++ b/test/ut3_tester/core/test_file_mapper.pkb @@ -1,17 +1,17 @@ create or replace package body test_file_mapper is procedure default_mappings is - l_actual ut3.ut_file_mappings; - l_expected ut3.ut_file_mappings; + l_actual ut3_develop.ut_file_mappings; + l_expected ut3_develop.ut_file_mappings; begin --Arrange - l_expected := ut3.ut_file_mappings( - ut3.ut_file_mapping('C:\tests\helpers\core.pkb',sys_context('USERENV', 'CURRENT_USER'),'CORE','PACKAGE BODY'), - ut3.ut_file_mapping('tests/helpers/test_file_mapper.pkb',sys_context('USERENV', 'CURRENT_USER'),'TEST_FILE_MAPPER','PACKAGE BODY') + l_expected := ut3_develop.ut_file_mappings( + ut3_develop.ut_file_mapping('C:\tests\helpers\core.pkb',sys_context('USERENV', 'CURRENT_USER'),'CORE','PACKAGE BODY'), + ut3_develop.ut_file_mapping('tests/helpers/test_file_mapper.pkb',sys_context('USERENV', 'CURRENT_USER'),'TEST_FILE_MAPPER','PACKAGE BODY') ); --Act - l_actual := ut3.ut_file_mapper.build_file_mappings( - ut3.ut_varchar2_list( + l_actual := ut3_develop.ut_file_mapper.build_file_mappings( + ut3_develop.ut_varchar2_list( 'C:\tests\helpers\core.pkb', 'tests/helpers/test_file_mapper.pkb' ) @@ -21,18 +21,18 @@ create or replace package body test_file_mapper is end; procedure specific_owner is - l_actual ut3.ut_file_mappings; - l_expected ut3.ut_file_mappings; + l_actual ut3_develop.ut_file_mappings; + l_expected ut3_develop.ut_file_mappings; begin --Arrange - l_expected := ut3.ut_file_mappings( - ut3.ut_file_mapping('C:\source\core\types\ut_file_mapping.tpb','UT3','UT_FILE_MAPPING','TYPE BODY'), - ut3.ut_file_mapping('source/core/ut_file_mapper.pkb','UT3','UT_FILE_MAPPER','PACKAGE BODY') + l_expected := ut3_develop.ut_file_mappings( + ut3_develop.ut_file_mapping('C:\source\core\types\ut_file_mapping.tpb','UT3_DEVELOP','UT_FILE_MAPPING','TYPE BODY'), + ut3_develop.ut_file_mapping('source/core/ut_file_mapper.pkb','UT3_DEVELOP','UT_FILE_MAPPER','PACKAGE BODY') ); --Act - l_actual := ut3.ut_file_mapper.build_file_mappings( - 'UT3', - ut3.ut_varchar2_list( + l_actual := ut3_develop.ut_file_mapper.build_file_mappings( + 'UT3_DEVELOP', + ut3_develop.ut_varchar2_list( 'C:\source\core\types\ut_file_mapping.tpb', 'source/core/ut_file_mapper.pkb' ) diff --git a/test/ut3_tester/core/test_output_buffer.pkb b/test/ut3_tester/core/test_output_buffer.pkb index 7aab6f389..2e8b3337c 100644 --- a/test/ut3_tester/core/test_output_buffer.pkb +++ b/test/ut3_tester/core/test_output_buffer.pkb @@ -6,10 +6,10 @@ create or replace package body test_output_buffer is l_remaining integer; l_expected_text clob; l_expected_item_type varchar2(1000); - l_buffer ut3.ut_output_buffer_base; + l_buffer ut3_develop.ut_output_buffer_base; begin --Arrange - l_buffer := ut3.ut_output_clob_table_buffer(); + l_buffer := ut3_develop.ut_output_clob_table_buffer(); l_expected_text := to_clob(lpad('a text', 31000, ',a text')) || chr(10) || to_clob(lpad('a text', 31000, ',a text')) || chr(13) || to_clob(lpad('a text', 31000, ',a text')) @@ -36,7 +36,7 @@ create or replace package body test_output_buffer is procedure test_doesnt_send_on_null_text is l_cur sys_refcursor; l_result integer; - l_buffer ut3.ut_output_buffer_base := ut3.ut_output_table_buffer(); + l_buffer ut3_develop.ut_output_buffer_base := ut3_develop.ut_output_table_buffer(); begin ut3_tester_helper.run_helper.delete_buffer(); --Act @@ -50,14 +50,14 @@ create or replace package body test_output_buffer is procedure test_doesnt_send_on_null_elem is l_cur sys_refcursor; l_result integer; - l_buffer ut3.ut_output_buffer_base := ut3.ut_output_table_buffer(); + l_buffer ut3_develop.ut_output_buffer_base := ut3_develop.ut_output_table_buffer(); l_message_id varchar2(255); l_text varchar2(4000); begin ut3_tester_helper.run_helper.delete_buffer(); --Act - l_buffer.send_lines(ut3.ut_varchar2_rows(null)); - l_buffer.send_lines(ut3.ut_varchar2_rows('test')); + l_buffer.send_lines(ut3_develop.ut_varchar2_rows(null)); + l_buffer.send_lines(ut3_develop.ut_varchar2_rows('test')); select message_id, text into l_message_id, l_text from table(ut3_tester_helper.run_helper.ut_output_buffer_tmp); ut.expect(l_message_id).to_equal('1'); @@ -67,7 +67,7 @@ create or replace package body test_output_buffer is procedure test_send_line is l_result varchar2(4000); c_expected constant varchar2(4000) := lpad('a text',4000,',a text'); - l_buffer ut3.ut_output_buffer_base := ut3.ut_output_table_buffer(); + l_buffer ut3_develop.ut_output_buffer_base := ut3_develop.ut_output_table_buffer(); begin l_buffer.send_line(c_expected); @@ -80,7 +80,7 @@ create or replace package body test_output_buffer is l_result clob; l_remaining integer; l_expected clob; - l_buffer ut3.ut_output_buffer_base := ut3.ut_output_table_buffer(); + l_buffer ut3_develop.ut_output_buffer_base := ut3_develop.ut_output_table_buffer(); l_start timestamp; l_duration interval day to second; begin @@ -99,7 +99,7 @@ create or replace package body test_output_buffer is --Fetches data from output ut.expect(l_result).to_equal(l_expected); --Throws a timeout exception - ut.expect(dbms_utility.format_error_stack()).to_match('ORA'||ut3.ut_utils.gc_out_buffer_timeout); + ut.expect(dbms_utility.format_error_stack()).to_match('ORA'||ut3_develop.ut_utils.gc_out_buffer_timeout); --Waited for one second ut.expect(l_duration).to_be_greater_than(interval '0.99' second); end; @@ -110,10 +110,10 @@ create or replace package body test_output_buffer is end; - procedure test_purge(a_buffer ut3.ut_output_buffer_base ) is - l_stale_buffer ut3.ut_output_buffer_base := a_buffer; - l_fresh_buffer ut3.ut_output_buffer_base; - l_buffer ut3.ut_output_buffer_base; + procedure test_purge(a_buffer ut3_develop.ut_output_buffer_base ) is + l_stale_buffer ut3_develop.ut_output_buffer_base := a_buffer; + l_fresh_buffer ut3_develop.ut_output_buffer_base; + l_buffer ut3_develop.ut_output_buffer_base; begin --Arrange l_stale_buffer.start_date := sysdate - 2; @@ -122,28 +122,28 @@ create or replace package body test_output_buffer is l_stale_buffer.send_line('some text'); l_stale_buffer.close(); - l_fresh_buffer := ut3.ut_output_table_buffer(); + l_fresh_buffer := ut3_develop.ut_output_table_buffer(); l_fresh_buffer.send_line('some text'); l_fresh_buffer.close(); --Act - purge is performed on new buffer create - l_buffer := ut3.ut_output_table_buffer(); + l_buffer := ut3_develop.ut_output_table_buffer(); --Assert -- Data in "fresh" buffer remains ut.expect( l_fresh_buffer.get_lines_cursor(0,0), l_buffer.self_type ).to_have_count(1); - -- Data in "slate" buffer is purged and so the call to get_lines_cursor throws ORA-20218 + -- Data in "stale" buffer is purged and so the call to get_lines_cursor throws ORA-20218 ut.expect( l_stale_buffer.get_lines_cursor(0,0), l_buffer.self_type ).to_be_empty(); end; procedure test_purge_text_buffer is begin - test_purge(ut3.ut_output_table_buffer()); + test_purge(ut3_develop.ut_output_table_buffer()); end; procedure test_purge_clob_buffer is begin - test_purge(ut3.ut_output_clob_table_buffer()); + test_purge(ut3_develop.ut_output_clob_table_buffer()); end; end test_output_buffer; diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index 8eedc1142..570d86a0d 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -1,29 +1,29 @@ create or replace package body test_suite_builder is function invoke_builder_for_annotations( - a_annotations ut3.ut_annotations, + a_annotations ut3_develop.ut_annotations, a_package_name varchar2 := 'TEST_SUITE_BUILDER_PACKAGE' ) return clob is - l_suites ut3.ut_suite_items; - l_suite ut3.ut_logical_suite; + l_suites ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_logical_suite; l_cursor sys_refcursor; l_type_cursor sys_refcursor; l_ctx dbms_xmlgen.ctxhandle; l_xml xmltype; begin open l_cursor for select value(x) from table( - ut3.ut_annotated_objects( - ut3.ut_annotated_object('UT3_TESTER', a_package_name, 'PACKAGE', systimestamp, a_annotations) + ut3_develop.ut_annotated_objects( + ut3_develop.ut_annotated_object('UT3_TESTER', a_package_name, 'PACKAGE', systimestamp, a_annotations) ) ) x; - l_suites := ut3.ut_suite_manager.build_suites_from_annotations( + l_suites := ut3_develop.ut_suite_manager.build_suites_from_annotations( a_owner_name => 'UT3_TESTER', a_annotated_objects => l_cursor, a_path => null, a_object_name => a_package_name, a_skip_all_objects => true ); - l_suite := treat( l_suites(l_suites.first) as ut3.ut_logical_suite); + l_suite := treat( l_suites(l_suites.first) as ut3_develop.ut_logical_suite); open l_type_cursor for select l_suite as "UT_LOGICAL_SUITE" from dual; l_ctx := dbms_xmlgen.newcontext(l_type_cursor); @@ -43,11 +43,11 @@ create or replace package body test_suite_builder is procedure no_suite_description is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -59,12 +59,12 @@ create or replace package body test_suite_builder is procedure suite_description_from_suite is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Some description', null), - ut3.ut_annotation(2, 'suite','Another description', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Some description', null), + ut3_develop.ut_annotation(2, 'suite','Another description', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -76,13 +76,13 @@ create or replace package body test_suite_builder is procedure suitepath_from_non_empty_path is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite',null, null), - ut3.ut_annotation(2, 'suitepath','org.utplsql.some', null), - ut3.ut_annotation(3, 'suitepath','dummy.utplsql.some', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite',null, null), + ut3_develop.ut_annotation(2, 'suitepath','org.utplsql.some', null), + ut3_develop.ut_annotation(3, 'suitepath','dummy.utplsql.some', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -94,14 +94,14 @@ create or replace package body test_suite_builder is procedure suite_descr_from_displayname is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Some description', null), - ut3.ut_annotation(2, 'suite','Another description', null), - ut3.ut_annotation(3, 'displayname','New description', null), - ut3.ut_annotation(4, 'displayname','Newest description', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Some description', null), + ut3_develop.ut_annotation(2, 'suite','Another description', null), + ut3_develop.ut_annotation(3, 'displayname','New description', null), + ut3_develop.ut_annotation(4, 'displayname','Newest description', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -113,31 +113,31 @@ create or replace package body test_suite_builder is procedure rollback_type_valid is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite',null, null), - ut3.ut_annotation(2, 'rollback','manual', null), - ut3.ut_annotation(3, 'rollback','bad', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite',null, null), + ut3_develop.ut_annotation(2, 'rollback','manual', null), + ut3_develop.ut_annotation(3, 'rollback','bad', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%'||ut3.ut_utils.gc_rollback_manual||'%' + '%'||ut3_develop.ut_utils.gc_rollback_manual||'%' ); end; procedure rollback_type_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite',null, null), - ut3.ut_annotation(2, 'rollback','manual', null), - ut3.ut_annotation(3, 'rollback','bad', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite',null, null), + ut3_develop.ut_annotation(2, 'rollback','manual', null), + ut3_develop.ut_annotation(3, 'rollback','bad', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -149,12 +149,12 @@ create or replace package body test_suite_builder is procedure suite_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'suite','bad', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'suite','bad', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -166,12 +166,12 @@ create or replace package body test_suite_builder is procedure test_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -185,13 +185,13 @@ create or replace package body test_suite_builder is procedure test_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'test','Dup', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'test','Dup', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -203,13 +203,13 @@ create or replace package body test_suite_builder is procedure beforeall_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'beforeall', null, 'test_procedure'), - ut3.ut_annotation(9, 'beforeall', null, 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'beforeall', null, 'test_procedure'), + ut3_develop.ut_annotation(9, 'beforeall', null, 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -221,13 +221,13 @@ create or replace package body test_suite_builder is procedure beforeeach_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'beforeeach', null, 'test_procedure'), - ut3.ut_annotation(9, 'beforeeach', null, 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'beforeeach', null, 'test_procedure'), + ut3_develop.ut_annotation(9, 'beforeeach', null, 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -239,13 +239,13 @@ create or replace package body test_suite_builder is procedure afterall_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'afterall', null, 'test_procedure'), - ut3.ut_annotation(9, 'afterall', null, 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'afterall', null, 'test_procedure'), + ut3_develop.ut_annotation(9, 'afterall', null, 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -257,13 +257,13 @@ create or replace package body test_suite_builder is procedure aftereach_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(8, 'aftereach', null, 'test_procedure'), - ut3.ut_annotation(9, 'aftereach', null, 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(8, 'aftereach', null, 'test_procedure'), + ut3_develop.ut_annotation(9, 'aftereach', null, 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -275,13 +275,13 @@ create or replace package body test_suite_builder is procedure suitepath_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(3, 'suitepath','dummy.utplsql.some', null), - ut3.ut_annotation(4, 'suitepath','org.utplsql.some', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'suitepath','dummy.utplsql.some', null), + ut3_develop.ut_annotation(4, 'suitepath','org.utplsql.some', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -293,13 +293,13 @@ create or replace package body test_suite_builder is procedure displayname_annot_duplicated is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','Cool', null), - ut3.ut_annotation(4, 'displayname','New description', null), - ut3.ut_annotation(5, 'displayname','Newest description', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'displayname','New description', null), + ut3_develop.ut_annotation(5, 'displayname','Newest description', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -311,12 +311,12 @@ create or replace package body test_suite_builder is procedure suitepath_annot_empty is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(3, 'suitepath',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'suitepath',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -328,12 +328,12 @@ create or replace package body test_suite_builder is procedure suitepath_annot_invalid_path is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'suitepath','path with spaces', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'suitepath','path with spaces', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -345,12 +345,12 @@ create or replace package body test_suite_builder is procedure displayname_annot_empty is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(3, 'displayname',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'displayname',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -362,12 +362,12 @@ create or replace package body test_suite_builder is procedure rollback_type_empty is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(3, 'rollback',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'rollback',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -379,12 +379,12 @@ create or replace package body test_suite_builder is procedure rollback_type_invalid is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'rollback','bad', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'rollback','bad', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -396,24 +396,24 @@ create or replace package body test_suite_builder is procedure multiple_before_after is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'first_before_all'), - ut3.ut_annotation(3, 'beforeall',null, 'another_before_all'), - ut3.ut_annotation(4, 'beforeeach',null, 'first_before_each'), - ut3.ut_annotation(5, 'beforeeach',null, 'another_before_each'), - ut3.ut_annotation(6, 'aftereach',null, 'first_after_each'), - ut3.ut_annotation(7, 'aftereach',null, 'another_after_each'), - ut3.ut_annotation(8, 'afterall',null, 'first_after_all'), - ut3.ut_annotation(9, 'afterall',null, 'another_after_all'), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), - ut3.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), - ut3.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), - ut3.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'first_before_all'), + ut3_develop.ut_annotation(3, 'beforeall',null, 'another_before_all'), + ut3_develop.ut_annotation(4, 'beforeeach',null, 'first_before_each'), + ut3_develop.ut_annotation(5, 'beforeeach',null, 'another_before_each'), + ut3_develop.ut_annotation(6, 'aftereach',null, 'first_after_each'), + ut3_develop.ut_annotation(7, 'aftereach',null, 'another_after_each'), + ut3_develop.ut_annotation(8, 'afterall',null, 'first_after_all'), + ut3_develop.ut_annotation(9, 'afterall',null, 'another_after_all'), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), + ut3_develop.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), + ut3_develop.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -450,24 +450,24 @@ create or replace package body test_suite_builder is procedure multiple_standalone_bef_aft is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall', 'some_package.first_before_all',null), - ut3.ut_annotation(3, 'beforeall', 'different_package.another_before_all',null), - ut3.ut_annotation(4, 'beforeeach', 'first_before_each',null), - ut3.ut_annotation(5, 'beforeeach', 'different_owner.different_package.another_before_each',null), - ut3.ut_annotation(6, 'aftereach', 'first_after_each',null), - ut3.ut_annotation(7, 'aftereach', 'another_after_each,different_owner.different_package.one_more_after_each',null), - ut3.ut_annotation(8, 'afterall', 'first_after_all',null), - ut3.ut_annotation(9, 'afterall', 'another_after_all',null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), - ut3.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), - ut3.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), - ut3.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall', 'some_package.first_before_all',null), + ut3_develop.ut_annotation(3, 'beforeall', 'different_package.another_before_all',null), + ut3_develop.ut_annotation(4, 'beforeeach', 'first_before_each',null), + ut3_develop.ut_annotation(5, 'beforeeach', 'different_owner.different_package.another_before_each',null), + ut3_develop.ut_annotation(6, 'aftereach', 'first_after_each',null), + ut3_develop.ut_annotation(7, 'aftereach', 'another_after_each,different_owner.different_package.one_more_after_each',null), + ut3_develop.ut_annotation(8, 'afterall', 'first_after_all',null), + ut3_develop.ut_annotation(9, 'afterall', 'another_after_all',null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), + ut3_develop.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), + ut3_develop.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -505,16 +505,16 @@ create or replace package body test_suite_builder is procedure before_after_on_single_proc is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'do_stuff'), - ut3.ut_annotation(3, 'beforeeach',null, 'do_stuff'), - ut3.ut_annotation(4, 'aftereach',null, 'do_stuff'), - ut3.ut_annotation(5, 'afterall',null, 'do_stuff'), - ut3.ut_annotation(6, 'test','A test', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'do_stuff'), + ut3_develop.ut_annotation(3, 'beforeeach',null, 'do_stuff'), + ut3_develop.ut_annotation(4, 'aftereach',null, 'do_stuff'), + ut3_develop.ut_annotation(5, 'afterall',null, 'do_stuff'), + ut3_develop.ut_annotation(6, 'test','A test', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -539,27 +539,27 @@ create or replace package body test_suite_builder is procedure multiple_mixed_bef_aft is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall', null,'first_before_all'), - ut3.ut_annotation(3, 'beforeall', 'different_package.another_before_all',null), - ut3.ut_annotation(4, 'beforeeach', 'first_before_each',null), - ut3.ut_annotation(5, 'beforeeach', 'different_owner.different_package.another_before_each',null), - ut3.ut_annotation(6, 'aftereach', null, 'first_after_each'), - ut3.ut_annotation(7, 'aftereach', 'another_after_each,different_owner.different_package.one_more_after_each',null), - ut3.ut_annotation(8, 'afterall', 'first_after_all',null), - ut3.ut_annotation(9, 'afterall', 'another_after_all',null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), - ut3.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), - ut3.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), - ut3.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test'), - ut3.ut_annotation(21, 'beforeall', null,'last_before_all'), - ut3.ut_annotation(22, 'aftereach', null, 'last_after_each'), - ut3.ut_annotation(23, 'afterall', null, 'last_after_all') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall', null,'first_before_all'), + ut3_develop.ut_annotation(3, 'beforeall', 'different_package.another_before_all',null), + ut3_develop.ut_annotation(4, 'beforeeach', 'first_before_each',null), + ut3_develop.ut_annotation(5, 'beforeeach', 'different_owner.different_package.another_before_each',null), + ut3_develop.ut_annotation(6, 'aftereach', null, 'first_after_each'), + ut3_develop.ut_annotation(7, 'aftereach', 'another_after_each,different_owner.different_package.one_more_after_each',null), + ut3_develop.ut_annotation(8, 'afterall', 'first_after_all',null), + ut3_develop.ut_annotation(9, 'afterall', 'another_after_all',null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), + ut3_develop.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), + ut3_develop.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test'), + ut3_develop.ut_annotation(21, 'beforeall', null,'last_before_all'), + ut3_develop.ut_annotation(22, 'aftereach', null, 'last_after_each'), + ut3_develop.ut_annotation(23, 'afterall', null, 'last_after_all') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -601,16 +601,16 @@ create or replace package body test_suite_builder is procedure before_after_mixed_with_test is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'do_stuff'), - ut3.ut_annotation(3, 'beforeeach',null, 'do_stuff'), - ut3.ut_annotation(4, 'aftereach',null, 'do_stuff'), - ut3.ut_annotation(5, 'afterall',null, 'do_stuff'), - ut3.ut_annotation(6, 'test','A test', 'do_stuff') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'do_stuff'), + ut3_develop.ut_annotation(3, 'beforeeach',null, 'do_stuff'), + ut3_develop.ut_annotation(4, 'aftereach',null, 'do_stuff'), + ut3_develop.ut_annotation(5, 'afterall',null, 'do_stuff'), + ut3_develop.ut_annotation(6, 'test','A test', 'do_stuff') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -628,18 +628,18 @@ create or replace package body test_suite_builder is procedure suite_from_context is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(5, 'name','a_context', null), - ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation(3, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(5, 'name','a_context', null), + ut3_develop.ut_annotation(6, 'beforeall',null, 'context_setup'), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -676,31 +676,31 @@ create or replace package body test_suite_builder is procedure nested_contexts is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation( 1, 'suite','Cool', null), - ut3.ut_annotation( 2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation( 3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation( 4, 'context','A context', null), - ut3.ut_annotation( 5, 'name','a_context', null), - ut3.ut_annotation( 6, 'beforeall',null, 'context_setup'), - ut3.ut_annotation( 7, 'test', 'First test in context', 'first_test_in_a_context'), - ut3.ut_annotation( 8, 'context','A nested context', null), - ut3.ut_annotation( 9, 'name','a_nested_context', null), - ut3.ut_annotation(10, 'beforeall',null, 'nested_context_setup'), - ut3.ut_annotation(11, 'test', 'Test in nested context', 'test_in_nested_context'), - ut3.ut_annotation(12, 'endcontext',null, null), - ut3.ut_annotation(13, 'context',null, null), - ut3.ut_annotation(14, 'name','nested_context_2', null), - ut3.ut_annotation(15, 'test', 'Test in nested context', 'test_in_nested_context_2'), - ut3.ut_annotation(16, 'context','a_nested_context_3', null), - ut3.ut_annotation(17, 'test', 'Test in nested context', 'test_in_nested_context_3'), - ut3.ut_annotation(18, 'endcontext',null, null), - ut3.ut_annotation(19, 'endcontext',null, null), - ut3.ut_annotation(20, 'test', 'Second test in context', 'second_test_in_a_context'), - ut3.ut_annotation(21, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 1, 'suite','Cool', null), + ut3_develop.ut_annotation( 2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation( 3, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation( 4, 'context','A context', null), + ut3_develop.ut_annotation( 5, 'name','a_context', null), + ut3_develop.ut_annotation( 6, 'beforeall',null, 'context_setup'), + ut3_develop.ut_annotation( 7, 'test', 'First test in context', 'first_test_in_a_context'), + ut3_develop.ut_annotation( 8, 'context','A nested context', null), + ut3_develop.ut_annotation( 9, 'name','a_nested_context', null), + ut3_develop.ut_annotation(10, 'beforeall',null, 'nested_context_setup'), + ut3_develop.ut_annotation(11, 'test', 'Test in nested context', 'test_in_nested_context'), + ut3_develop.ut_annotation(12, 'endcontext',null, null), + ut3_develop.ut_annotation(13, 'context',null, null), + ut3_develop.ut_annotation(14, 'name','nested_context_2', null), + ut3_develop.ut_annotation(15, 'test', 'Test in nested context', 'test_in_nested_context_2'), + ut3_develop.ut_annotation(16, 'context','a_nested_context_3', null), + ut3_develop.ut_annotation(17, 'test', 'Test in nested context', 'test_in_nested_context_3'), + ut3_develop.ut_annotation(18, 'endcontext',null, null), + ut3_develop.ut_annotation(19, 'endcontext',null, null), + ut3_develop.ut_annotation(20, 'test', 'Second test in context', 'second_test_in_a_context'), + ut3_develop.ut_annotation(21, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -769,24 +769,24 @@ create or replace package body test_suite_builder is procedure nested_contexts_2 is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation( 1, 'suite','Cool', null), - ut3.ut_annotation( 2, 'suitepath','path', null), - ut3.ut_annotation( 3, 'context','Level 1', null), - ut3.ut_annotation( 4, 'name','context_1', null), - ut3.ut_annotation( 5, 'context','Level 1.1', null), - ut3.ut_annotation( 6, 'name','context_1_1', null), - ut3.ut_annotation( 7, 'test', 'Test 1.1.1', 'test_1_1_1'), - ut3.ut_annotation( 8, 'test', 'Test 1.1.2', 'test_1_1_2'), - ut3.ut_annotation( 9, 'endcontext', null, null), - ut3.ut_annotation(10, 'endcontext', null, null), - ut3.ut_annotation(11, 'context','Level 2', null), - ut3.ut_annotation(12, 'name','context_2', null), - ut3.ut_annotation(13, 'test', 'Test 2.1', 'test_2_1'), - ut3.ut_annotation(14, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation( 1, 'suite','Cool', null), + ut3_develop.ut_annotation( 2, 'suitepath','path', null), + ut3_develop.ut_annotation( 3, 'context','Level 1', null), + ut3_develop.ut_annotation( 4, 'name','context_1', null), + ut3_develop.ut_annotation( 5, 'context','Level 1.1', null), + ut3_develop.ut_annotation( 6, 'name','context_1_1', null), + ut3_develop.ut_annotation( 7, 'test', 'Test 1.1.1', 'test_1_1_1'), + ut3_develop.ut_annotation( 8, 'test', 'Test 1.1.2', 'test_1_1_2'), + ut3_develop.ut_annotation( 9, 'endcontext', null, null), + ut3_develop.ut_annotation(10, 'endcontext', null, null), + ut3_develop.ut_annotation(11, 'context','Level 2', null), + ut3_develop.ut_annotation(12, 'name','context_2', null), + ut3_develop.ut_annotation(13, 'test', 'Test 2.1', 'test_2_1'), + ut3_develop.ut_annotation(14, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -838,19 +838,19 @@ create or replace package body test_suite_builder is procedure before_after_in_context is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite', 'Cool', null), - ut3.ut_annotation(2, 'test', 'In suite', 'suite_level_test'), - ut3.ut_annotation(3, 'context', 'A context', null), - ut3.ut_annotation(4, 'beforeall', 'context_beforeall', null), - ut3.ut_annotation(5, 'beforeeach', null, 'context_beforeeach'), - ut3.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(7, 'aftereach', 'context_aftereach' ,null), - ut3.ut_annotation(8, 'afterall', null, 'context_afterall'), - ut3.ut_annotation(9, 'endcontext', null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite', 'Cool', null), + ut3_develop.ut_annotation(2, 'test', 'In suite', 'suite_level_test'), + ut3_develop.ut_annotation(3, 'context', 'A context', null), + ut3_develop.ut_annotation(4, 'beforeall', 'context_beforeall', null), + ut3_develop.ut_annotation(5, 'beforeeach', null, 'context_beforeeach'), + ut3_develop.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(7, 'aftereach', 'context_aftereach' ,null), + ut3_develop.ut_annotation(8, 'afterall', null, 'context_afterall'), + ut3_develop.ut_annotation(9, 'endcontext', null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -888,19 +888,19 @@ create or replace package body test_suite_builder is procedure before_after_out_of_context is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation(3, 'beforeeach',null, 'suite_level_beforeeach'), - ut3.ut_annotation(4, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(5, 'context',null, null), - ut3.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(7, 'endcontext',null, null), - ut3.ut_annotation(8, 'aftereach',null, 'suite_level_aftereach'), - ut3.ut_annotation(9, 'afterall',null, 'suite_level_afterall') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation(3, 'beforeeach',null, 'suite_level_beforeeach'), + ut3_develop.ut_annotation(4, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation(5, 'context',null, null), + ut3_develop.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(7, 'endcontext',null, null), + ut3_develop.ut_annotation(8, 'aftereach',null, 'suite_level_aftereach'), + ut3_develop.ut_annotation(9, 'afterall',null, 'suite_level_afterall') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -938,17 +938,17 @@ create or replace package body test_suite_builder is procedure context_without_endcontext is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','Some context', null), - ut3.ut_annotation(5, 'name','a_context', null), - ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation(3, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation(4, 'context','Some context', null), + ut3_develop.ut_annotation(5, 'name','a_context', null), + ut3_develop.ut_annotation(6, 'beforeall',null, 'context_setup'), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -987,19 +987,19 @@ create or replace package body test_suite_builder is procedure endcontext_without_context is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(5, 'name','a_context', null), - ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(9, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation(3, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(5, 'name','a_context', null), + ut3_develop.ut_annotation(6, 'beforeall',null, 'context_setup'), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null), + ut3_develop.ut_annotation(9, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1039,23 +1039,23 @@ create or replace package body test_suite_builder is procedure duplicate_context_name is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), - ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(5, 'name','a_context', null), - ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(9, 'context','A context', null), - ut3.ut_annotation(10, 'name','a_context', null), - ut3.ut_annotation(11, 'beforeall',null, 'setup_in_duplicated_context'), - ut3.ut_annotation(12, 'test', 'In duplicated context', 'test_in_duplicated_context'), - ut3.ut_annotation(13, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), + ut3_develop.ut_annotation(3, 'test','In suite', 'suite_level_test'), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(5, 'name','a_context', null), + ut3_develop.ut_annotation(6, 'beforeall',null, 'context_setup'), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null), + ut3_develop.ut_annotation(9, 'context','A context', null), + ut3_develop.ut_annotation(10, 'name','a_context', null), + ut3_develop.ut_annotation(11, 'beforeall',null, 'setup_in_duplicated_context'), + ut3_develop.ut_annotation(12, 'test', 'In duplicated context', 'test_in_duplicated_context'), + ut3_develop.ut_annotation(13, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1107,17 +1107,17 @@ create or replace package body test_suite_builder is procedure hard_stop_in_ctx_name is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; l_bad_name varchar2(100); begin --Arrange l_bad_name := 'ctx_with_dot.in_it'; - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context',null, null), - ut3.ut_annotation(5, 'name',l_bad_name, null), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(13, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'context',null, null), + ut3_develop.ut_annotation(5, 'name',l_bad_name, null), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(13, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1145,17 +1145,17 @@ create or replace package body test_suite_builder is procedure name_with_spaces_invalid is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; l_bad_name varchar2(100); begin --Arrange l_bad_name := 'context name with spaces'; - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context',null, null), - ut3.ut_annotation(5, 'name',l_bad_name, null), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(13, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'context',null, null), + ut3_develop.ut_annotation(5, 'name',l_bad_name, null), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(13, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1183,17 +1183,17 @@ create or replace package body test_suite_builder is procedure duplicate_name_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(5, 'name','a_context_name', null), - ut3.ut_annotation(6, 'name','a_newer_context_name', null), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(5, 'name','a_context_name', null), + ut3_develop.ut_annotation(6, 'name','a_newer_context_name', null), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null), + ut3_develop.ut_annotation(12, 'test', 'In suite', 'suite_level_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1229,16 +1229,16 @@ create or replace package body test_suite_builder is procedure name_outside_of_context is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(3, 'name','a_context_name', null), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'name','a_context_name', null), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null), + ut3_develop.ut_annotation(12, 'test', 'In suite', 'suite_level_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1274,16 +1274,16 @@ create or replace package body test_suite_builder is procedure name_empty_value is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(5, 'name',null, null), - ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), - ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(5, 'name',null, null), + ut3_develop.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3_develop.ut_annotation(8, 'endcontext',null, null), + ut3_develop.ut_annotation(12, 'test', 'In suite', 'suite_level_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1319,17 +1319,17 @@ create or replace package body test_suite_builder is procedure multiple_contexts is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context','A context', null), - ut3.ut_annotation(6, 'test', 'In context1', 'test_in_a_context1'), - ut3.ut_annotation(7, 'endcontext',null, null), - ut3.ut_annotation(8, 'context','A context', null), - ut3.ut_annotation(10, 'test', 'In context2', 'test_in_a_context2'), - ut3.ut_annotation(11, 'endcontext',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'context','A context', null), + ut3_develop.ut_annotation(6, 'test', 'In context1', 'test_in_a_context1'), + ut3_develop.ut_annotation(7, 'endcontext',null, null), + ut3_develop.ut_annotation(8, 'context','A context', null), + ut3_develop.ut_annotation(10, 'test', 'In context2', 'test_in_a_context2'), + ut3_develop.ut_annotation(11, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1372,13 +1372,13 @@ create or replace package body test_suite_builder is procedure throws_value_empty is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(3, 'test','A test with empty throws annotation', 'A_TEST_PROCEDURE'), - ut3.ut_annotation(3, 'throws',null, 'A_TEST_PROCEDURE') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(3, 'test','A test with empty throws annotation', 'A_TEST_PROCEDURE'), + ut3_develop.ut_annotation(3, 'throws',null, 'A_TEST_PROCEDURE') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1391,16 +1391,16 @@ create or replace package body test_suite_builder is procedure before_aftertest_multi is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), - ut3.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), - ut3.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), - ut3.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','before_test_proc', 'some_test'), + ut3_develop.ut_annotation(16, 'beforetest','before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','after_test_proc', 'some_test'), + ut3_develop.ut_annotation(20, 'aftertest','after_test_proc2', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1421,16 +1421,16 @@ create or replace package body test_suite_builder is procedure before_aftertest_twice is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','before_test_proc, before_test_proc2', 'some_test'), - ut3.ut_annotation(16, 'beforetest','before_test_proc3', 'some_test'), - ut3.ut_annotation(18, 'aftertest','after_test_proc,after_test_proc2', 'some_test'), - ut3.ut_annotation(20, 'aftertest','after_test_proc3', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','before_test_proc, before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(16, 'beforetest','before_test_proc3', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','after_test_proc,after_test_proc2', 'some_test'), + ut3_develop.ut_annotation(20, 'aftertest','after_test_proc3', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1453,14 +1453,14 @@ create or replace package body test_suite_builder is procedure before_aftertest_pkg_proc is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','external_package.before_test_proc', 'some_test'), - ut3.ut_annotation(18, 'aftertest','external_package.after_test_proc', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','external_package.before_test_proc', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','external_package.after_test_proc', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1479,14 +1479,14 @@ create or replace package body test_suite_builder is procedure before_aftertest_mixed_syntax is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(14, 'test','A test', 'some_test'), - ut3.ut_annotation(15, 'beforetest','external_package.before_test_proc, before_test_proc2', 'some_test'), - ut3.ut_annotation(18, 'aftertest','external_package.after_test_proc, after_test_proc2', 'some_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(14, 'test','A test', 'some_test'), + ut3_develop.ut_annotation(15, 'beforetest','external_package.before_test_proc, before_test_proc2', 'some_test'), + ut3_develop.ut_annotation(18, 'aftertest','external_package.after_test_proc, after_test_proc2', 'some_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1507,14 +1507,14 @@ create or replace package body test_suite_builder is procedure test_annotation_ordering is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'test','B test', 'b_test'), - ut3.ut_annotation(10, 'test','Z test', 'z_test'), - ut3.ut_annotation(14, 'test','A test', 'a_test') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(4, 'test','B test', 'b_test'), + ut3_develop.ut_annotation(10, 'test','Z test', 'z_test'), + ut3_develop.ut_annotation(14, 'test','A test', 'a_test') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1531,13 +1531,13 @@ create or replace package body test_suite_builder is procedure test_bad_procedure_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(2, 'bad_procedure_annotation',null, 'some_procedure'), - ut3.ut_annotation(6, 'test','A test', 'do_stuff') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(2, 'bad_procedure_annotation',null, 'some_procedure'), + ut3_develop.ut_annotation(6, 'test','A test', 'do_stuff') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1547,13 +1547,13 @@ create or replace package body test_suite_builder is procedure test_bad_package_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(17, 'bad_package_annotation',null, null), - ut3.ut_annotation(24, 'test','A test', 'do_stuff') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(1, 'suite','Cool', null), + ut3_develop.ut_annotation(17, 'bad_package_annotation',null, null), + ut3_develop.ut_annotation(24, 'test','A test', 'do_stuff') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1563,13 +1563,13 @@ create or replace package body test_suite_builder is procedure test_tag_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','testtag', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','testtag', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1585,12 +1585,12 @@ create or replace package body test_suite_builder is procedure suite_tag_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','suitetag', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','suitetag', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1606,13 +1606,13 @@ create or replace package body test_suite_builder is procedure test_tags_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','testtag,testtag2,testtag3', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','testtag,testtag2,testtag3', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1628,12 +1628,12 @@ create or replace package body test_suite_builder is procedure suite_tags_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','suitetag,suitetag1,suitetag2', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','suitetag,suitetag1,suitetag2', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1649,14 +1649,14 @@ create or replace package body test_suite_builder is procedure test_2line_tags_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','testtag', 'test_procedure'), - ut3.ut_annotation(10, 'tags','testtag2', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','testtag', 'test_procedure'), + ut3_develop.ut_annotation(10, 'tags','testtag2', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1672,13 +1672,13 @@ create or replace package body test_suite_builder is procedure suite_2line_tags_annotation is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','suitetag', null), - ut3.ut_annotation(4, 'tags','suitetag1', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','suitetag', null), + ut3_develop.ut_annotation(4, 'tags','suitetag1', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1694,12 +1694,12 @@ create or replace package body test_suite_builder is procedure test_empty_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags',null, 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags',null, 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1713,12 +1713,12 @@ create or replace package body test_suite_builder is procedure suite_empty_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags',null, null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1732,14 +1732,14 @@ create or replace package body test_suite_builder is procedure test_duplicate_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','testtag,testtag1,testtag', 'test_procedure'), - ut3.ut_annotation(10, 'tags',' testtag,testtag1,testtag2', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','testtag,testtag1,testtag', 'test_procedure'), + ut3_develop.ut_annotation(10, 'tags',' testtag,testtag1,testtag2', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1755,13 +1755,13 @@ create or replace package body test_suite_builder is procedure suite_duplicate_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','suitetag,suitetag1,suitetag', null), - ut3.ut_annotation(4, 'tags',' suitetag1,suitetag2', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','suitetag,suitetag1,suitetag', null), + ut3_develop.ut_annotation(4, 'tags',' suitetag1,suitetag2', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1777,13 +1777,13 @@ create or replace package body test_suite_builder is procedure test_empty_tag_between is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','testtag,, ,testtag1', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','testtag,, ,testtag1', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1799,12 +1799,12 @@ create or replace package body test_suite_builder is procedure suite_empty_tag_between is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','suitetag,, ,suitetag1', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','suitetag,, ,suitetag1', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1820,13 +1820,13 @@ create or replace package body test_suite_builder is procedure test_special_char_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags','#?$%^&*!|\/@][', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags','#?$%^&*!|\/@][', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1842,12 +1842,12 @@ create or replace package body test_suite_builder is procedure suite_special_char_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags','#?$%^&*!|\/@][', null) + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags','#?$%^&*!|\/@][', null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1863,14 +1863,14 @@ create or replace package body test_suite_builder is procedure test_spaces_in_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags',' good_tag , bad tag , good-tag ', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags',' good_tag , bad tag , good-tag ', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags',' good_tag , bad tag , good-tag ', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags',' good_tag , bad tag , good-tag ', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -1893,14 +1893,14 @@ create or replace package body test_suite_builder is procedure test_minus_in_tag is l_actual clob; - l_annotations ut3.ut_annotations; + l_annotations ut3_develop.ut_annotations; begin --Arrange - l_annotations := ut3.ut_annotations( - ut3.ut_annotation(2, 'suite','testsuite', null), - ut3.ut_annotation(3, 'tags',' good_tag , -invalid_tag , good-tag ', null), - ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), - ut3.ut_annotation(9, 'tags',' good_tag , -invalid_tag , good-tag ', 'test_procedure') + l_annotations := ut3_develop.ut_annotations( + ut3_develop.ut_annotation(2, 'suite','testsuite', null), + ut3_develop.ut_annotation(3, 'tags',' good_tag , -invalid_tag , good-tag ', null), + ut3_develop.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3_develop.ut_annotation(9, 'tags',' good_tag , -invalid_tag , good-tag ', 'test_procedure') ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); diff --git a/test/ut3_tester/core/test_suite_manager.pkb b/test/ut3_tester/core/test_suite_manager.pkb index fd35adc70..11cc7acfe 100644 --- a/test/ut3_tester/core/test_suite_manager.pkb +++ b/test/ut3_tester/core/test_suite_manager.pkb @@ -292,15 +292,15 @@ end test_package_with_ctx;]'; procedure test_schema_run is c_path constant varchar2(100) := sys_context('USERENV', 'CURRENT_USER'); - l_objects_to_run ut3.ut_suite_items := ut3.ut_suite_items(); - l_all_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items := ut3_develop.ut_suite_items(); + l_all_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_all_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_all_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); for i in 1..l_all_objects_to_run.count loop if l_all_objects_to_run(i).name in ('tests', 'tests2') then @@ -313,21 +313,21 @@ end test_package_with_ctx;]'; ut.expect(l_objects_to_run.count).to_equal(2); for i in 1 .. 2 loop - l_test0_suite := treat(l_objects_to_run(i) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(i) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name in ('tests', 'tests2')).to_be_true; - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); case l_test0_suite.name when 'tests' then ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(3); - ut.expect(l_test1_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + ut.expect(l_test1_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(3); - ut.expect(l_test2_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test2_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); when 'tests2' then ut.expect(l_test1_suite.name).to_equal('test_package_3'); ut.expect(l_test1_suite.items.count).to_equal(3); @@ -339,84 +339,84 @@ end test_package_with_ctx;]'; procedure test_top2_by_name is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||'.test_package_2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - ut.expect(l_test1_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + ut.expect(l_test1_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); - ut.expect(l_test2_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test2_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); ut.expect(l_test2_suite.items.count).to_equal(3); end; procedure test_top2_bt_name_cur_user is c_path varchar2(100) := 'test_package_2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - ut.expect(l_test1_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + ut.expect(l_test1_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); - ut.expect(l_test2_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test2_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); ut.expect(l_test2_suite.items.count).to_equal(3); end; procedure test_by_path_to_subsuite is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':tests.test_package_1.test_package_2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(3); @@ -424,26 +424,26 @@ end test_package_with_ctx;]'; procedure test_by_path_to_subsuite_cu is c_path varchar2(100) := ':tests.test_package_1.test_package_2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(3); @@ -451,36 +451,36 @@ end test_package_with_ctx;]'; procedure test_subsute_proc_by_path is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':tests.test_package_1.test_package_2.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); - ut.expect(l_test1_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test1_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); - ut.expect(l_test2_suite.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test2_suite.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); ut.expect(l_test2_suite.items.count).to_equal(1); - l_test_proc := treat(l_test2_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test2_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); - ut.expect(l_test_proc.rollback_type).to_equal(ut3.ut_utils.gc_rollback_manual); + ut.expect(l_test_proc.rollback_type).to_equal(ut3_develop.ut_utils.gc_rollback_manual); ut.expect(l_test_proc.before_test_list.count).to_be_greater_than(0); ut.expect(l_test_proc.after_test_list.count).to_be_greater_than(0); @@ -488,32 +488,32 @@ end test_package_with_ctx;]'; procedure test_subsute_proc_by_path_cu is c_path varchar2(100) := ':tests.test_package_1.test_package_2.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(1); - l_test_proc := treat(l_test2_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test2_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); ut.expect(l_test_proc.before_test_list.count).to_be_greater_than(0); ut.expect(l_test_proc.after_test_list.count).to_be_greater_than(0); @@ -521,101 +521,101 @@ end test_package_with_ctx;]'; procedure test_top_pack_by_name is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||'.test_package_1'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(2); ut.expect(l_test1_suite.items(1).name).to_equal('test1'); ut.expect(l_test1_suite.items(1).description).to_equal('Test1 from test package 1'); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).before_test_list.count).to_equal(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).after_test_list.count).to_equal(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).before_each_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).disabled_flag).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).before_test_list.count).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).after_test_list.count).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).before_each_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).disabled_flag).to_equal(0); ut.expect(l_test1_suite.items(2).name).to_equal('test2'); ut.expect(l_test1_suite.items(2).description).to_equal('Test2 from test package 1'); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).before_test_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).after_test_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).before_each_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).disabled_flag).to_equal(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).before_test_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).after_test_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).before_each_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).disabled_flag).to_equal(0); end; procedure test_top_pack_by_name_cu is c_path varchar2(100) := 'test_package_1'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_suite; - l_test2_suite ut3.ut_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_suite; + l_test2_suite ut3_develop.ut_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(2); ut.expect(l_test1_suite.items(1).name).to_equal('test1'); ut.expect(l_test1_suite.items(1).description).to_equal('Test1 from test package 1'); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).before_test_list.count).to_equal(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).after_test_list.count).to_equal(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).before_each_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(1) as ut3.ut_test).disabled_flag).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).before_test_list.count).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).after_test_list.count).to_equal(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).before_each_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(1) as ut3_develop.ut_test).disabled_flag).to_equal(0); ut.expect(l_test1_suite.items(2).name).to_equal('test2'); ut.expect(l_test1_suite.items(2).description).to_equal('Test2 from test package 1'); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).before_test_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).after_test_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).before_each_list.count).to_be_greater_than(0); - ut.expect(treat(l_test1_suite.items(2) as ut3.ut_test).disabled_flag).to_equal(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).before_test_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).after_test_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).before_each_list.count).to_be_greater_than(0); + ut.expect(treat(l_test1_suite.items(2) as ut3_develop.ut_test).disabled_flag).to_equal(0); end; procedure test_top_pack_by_path is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':tests'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(3); @@ -623,26 +623,26 @@ end test_package_with_ctx;]'; procedure test_top_pack_by_path_cu is c_path varchar2(100) := ':tests'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test2_suite := treat(l_test1_suite.items(1) as ut3.ut_logical_suite); + l_test2_suite := treat(l_test1_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test2_suite.name).to_equal('test_package_2'); ut.expect(l_test2_suite.items.count).to_equal(3); @@ -650,27 +650,27 @@ end test_package_with_ctx;]'; procedure test_top_pck_proc_by_path is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':tests.test_package_1.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test_proc := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); ut.expect(l_test_proc.description).to_equal('Test2 from test package 1'); @@ -680,27 +680,27 @@ end test_package_with_ctx;]'; procedure test_top_pck_proc_by_path_cu is c_path varchar2(100) := ':tests.test_package_1.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test2_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test2_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test_proc := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); ut.expect(l_test_proc.description).to_equal('Test2 from test package 1'); @@ -710,27 +710,27 @@ end test_package_with_ctx;]'; procedure test_top_pkc_proc_by_name is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||'.test_package_1.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test_proc := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); ut.expect(l_test_proc.before_test_list.count).to_be_greater_than(0); ut.expect(l_test_proc.after_test_list.count).to_be_greater_than(0); @@ -738,27 +738,27 @@ end test_package_with_ctx;]'; procedure test_top_pkc_proc_by_name_cu is c_path varchar2(100) := 'test_package_1.test2'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_1'); ut.expect(l_test1_suite.items.count).to_equal(1); - l_test_proc := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test2'); ut.expect(l_test_proc.before_test_list.count).to_be_greater_than(0); ut.expect(l_test_proc.after_test_list.count).to_be_greater_than(0); @@ -766,139 +766,139 @@ end test_package_with_ctx;]'; procedure test_top_pkc_nosub_by_name is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||'.test_package_3'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test1 ut3.ut_test; - l_test3 ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test1 ut3_develop.ut_test; + l_test3 ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests2'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_3'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test1 := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test1 := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test1.name).to_equal('test1'); ut.expect(l_test1.DISABLED_FLAG).to_equal(0); - l_test3 := treat(l_test1_suite.items(3) as ut3.ut_test); + l_test3 := treat(l_test1_suite.items(3) as ut3_develop.ut_test); ut.expect(l_test3.name).to_equal('disabled_test'); ut.expect(l_test3.DISABLED_FLAG).to_equal(1); end; procedure test_top_pkc_nosub_by_name_cu is c_path varchar2(100) := 'test_package_3'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test1 ut3.ut_test; - l_test3 ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test1 ut3_develop.ut_test; + l_test3 ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests2'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_3'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test1 := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test1 := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test1.name).to_equal('test1'); ut.expect(l_test1.DISABLED_FLAG).to_equal(0); - l_test3 := treat(l_test1_suite.items(3) as ut3.ut_test); + l_test3 := treat(l_test1_suite.items(3) as ut3_develop.ut_test); ut.expect(l_test3.name).to_equal('disabled_test'); ut.expect(l_test3.DISABLED_FLAG).to_equal(1); end; procedure test_top_subpck_by_path is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':tests2.test_package_3'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test1 ut3.ut_test; - l_test3 ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test1 ut3_develop.ut_test; + l_test3 ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests2'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_3'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test1 := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test1 := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test1.name).to_equal('test1'); ut.expect(l_test1.DISABLED_FLAG).to_equal(0); - l_test3 := treat(l_test1_suite.items(3) as ut3.ut_test); + l_test3 := treat(l_test1_suite.items(3) as ut3_develop.ut_test); ut.expect(l_test3.name).to_equal('disabled_test'); ut.expect(l_test3.DISABLED_FLAG).to_equal(1); end; procedure test_top_subpck_by_path_cu is c_path varchar2(100) := ':tests2.test_package_3'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test0_suite ut3.ut_logical_suite; - l_test1_suite ut3.ut_logical_suite; - l_test1 ut3.ut_test; - l_test3 ut3.ut_test; + l_test0_suite ut3_develop.ut_logical_suite; + l_test1_suite ut3_develop.ut_logical_suite; + l_test1 ut3_develop.ut_test; + l_test3 ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test0_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test0_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test0_suite.name).to_equal('tests2'); ut.expect(l_test0_suite.items.count).to_equal(1); - l_test1_suite := treat(l_test0_suite.items(1) as ut3.ut_logical_suite); + l_test1_suite := treat(l_test0_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_test1_suite.name).to_equal('test_package_3'); ut.expect(l_test1_suite.items.count).to_equal(3); - l_test1 := treat(l_test1_suite.items(1) as ut3.ut_test); + l_test1 := treat(l_test1_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test1.name).to_equal('test1'); ut.expect(l_test1.DISABLED_FLAG).to_equal(0); - l_test3 := treat(l_test1_suite.items(3) as ut3.ut_test); + l_test3 := treat(l_test1_suite.items(3) as ut3_develop.ut_test); ut.expect(l_test3.name).to_equal('disabled_test'); ut.expect(l_test3.DISABLED_FLAG).to_equal(1); end; procedure test_search_invalid_pck is - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; begin - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('failing_invalid_spec')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('failing_invalid_spec')); - ut3.ut.expect(l_objects_to_run.count).to_be_greater_than(0); - ut3.ut.expect(l_objects_to_run(l_objects_to_run.first).object_name).to_equal('failing_invalid_spec'); + ut3_develop.ut.expect(l_objects_to_run.count).to_be_greater_than(0); + ut3_develop.ut.expect(l_objects_to_run(l_objects_to_run.first).object_name).to_equal('failing_invalid_spec'); end; procedure compile_invalid_package is @@ -936,9 +936,9 @@ end;]'; end; procedure test_search_nonexisting_pck is - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; begin - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('ut3.failing_non_existing')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('ut3_develop.failing_non_existing')); ut.fail('Non existing package did not raise exception'); exception when others then @@ -946,9 +946,9 @@ end;]'; end; procedure test_search_nonexist_sch_pck is - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; begin - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('failing_non_existing')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('failing_non_existing')); ut.fail('Non existing package without schema did not raise exception'); exception when others then @@ -956,27 +956,27 @@ end;]'; end; procedure test_desc_with_comma is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_package_to_be_dropped')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_package_to_be_dropped')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_package_to_be_dropped'); ut.expect(l_suite.description).to_equal('A suite description, though with comma, is assigned by suite_manager'); ut.expect(l_suite.items.count).to_equal(2); - l_test := treat(l_suite.items(1) as ut3.ut_test); + l_test := treat(l_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test.name).to_equal('test1'); ut.expect(l_test.description).to_equal('A test description, though with comma, is assigned by suite_manager'); --- l_test := treat(l_suite.items(2) as ut3.ut_test); +-- l_test := treat(l_suite.items(2) as ut3_develop.ut_test); -- -- ut.expect(l_test.name).to_equal('test2'); -- ut.expect(l_test.description).to_equal('A test description, though with comma, is assigned by suite_manager'); @@ -1013,16 +1013,16 @@ end;'; end; procedure test_inv_cache_on_drop is - l_test_report ut3.ut_varchar2_list; + l_test_report ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_test_report from table(ut3.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.tst_package_to_be_dropped')); + select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.tst_package_to_be_dropped')); -- drop package clean_inv_cache_on_drop; begin - select * bulk collect into l_test_report from table(ut3.ut.run(sys_context('USERENV', 'CURRENT_USER') || '.tst_package_to_be_dropped')); + select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER') || '.tst_package_to_be_dropped')); ut.fail('Cache not invalidated on package drop'); exception when others then @@ -1056,15 +1056,15 @@ end;'; end; procedure test_inv_pck_bodies is - l_test_report ut3.ut_varchar2_list; + l_test_report ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_test_report from table(ut3.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.test_dependencies')); + select * bulk collect into l_test_report from table(ut3_develop.ut.run(sys_context('USERENV', 'CURRENT_USER')||'.test_dependencies')); ut.expect(l_test_report(l_test_report.count-1)).to_be_like('1 test_, 0 failed, 0 errored, 0 disabled, 0 warning(s)'); - --execute immediate 'select * from table(ut3.ut.run(''UT3.test_dependencies'', ut3.utplsql_test_reporter()))' into l_result; + --execute immediate 'select * from table(ut3_develop.ut.run(''UT3_DEVELOP.test_dependencies'', ut3_develop.utplsql_test_reporter()))' into l_result; --- ut.expect(l_result).to_equal(ut3.ut_utils.gc_success); +-- ut.expect(l_result).to_equal(ut3_develop.ut_utils.gc_success); end; procedure setup_inv_pck_bodies is pragma autonomous_transaction; @@ -1092,16 +1092,16 @@ end;'; end; procedure test_pck_with_dollar is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; begin --act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_package_with$dollar')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_package_with$dollar')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_package_with$dollar'); end; procedure setup_pck_with_dollar is @@ -1127,16 +1127,16 @@ end;'; procedure test_pck_with_hash is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; begin --act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_package_with#hash')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_package_with#hash')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_package_with#hash'); end; procedure setup_pck_with_hash is @@ -1162,22 +1162,22 @@ end;'; procedure test_test_with_dollar is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_package_with_dollar_test.test$1')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_package_with_dollar_test.test$1')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_package_with_dollar_test'); ut.expect(l_suite.items.count).to_equal(1); - l_test := treat(l_suite.items(1) as ut3.ut_test); + l_test := treat(l_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test.name).to_equal('test$1'); @@ -1203,22 +1203,22 @@ end;'; end; procedure test_test_with_hash is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_package_with_hash_test.test#1')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_package_with_hash_test.test#1')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_package_with_hash_test'); ut.expect(l_suite.items.count).to_equal(1); - l_test := treat(l_suite.items(1) as ut3.ut_test); + l_test := treat(l_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test.name).to_equal('test#1'); @@ -1244,17 +1244,17 @@ end;'; end; procedure test_empty_suite_path is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; begin --act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('tst_empty_suite_path')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('tst_empty_suite_path')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('tst_empty_suite_path'); end; @@ -1281,25 +1281,25 @@ end;'; end; procedure test_pck_with_same_path is - l_objects_to_run ut3.ut_suite_items; - l_suite1 ut3.ut_logical_suite; - l_suite2 ut3.ut_logical_suite; - l_suite3 ut3.ut_suite; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite1 ut3_develop.ut_logical_suite; + l_suite2 ut3_develop.ut_logical_suite; + l_suite3 ut3_develop.ut_suite; begin - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(':test1.test2$.test_package_same_1')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(':test1.test2$.test_package_same_1')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite1 := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_suite1 := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_suite1.name).to_equal('test1'); ut.expect(l_suite1.items.count).to_equal(1); - l_suite2 := treat(l_suite1.items(1) as ut3.ut_logical_suite); + l_suite2 := treat(l_suite1.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_suite2.name).to_equal('test2$'); ut.expect(l_suite2.items.count).to_equal(1); - l_suite3 := treat(l_suite2.items(1) as ut3.ut_suite); + l_suite3 := treat(l_suite2.items(1) as ut3_develop.ut_suite); ut.expect(l_suite3.name).to_equal('test_package_same_1'); end; @@ -1359,17 +1359,17 @@ end;]'; end; procedure disable_suite_floating_annot is - l_objects_to_run ut3.ut_suite_items; - l_suite ut3.ut_suite; + l_objects_to_run ut3_develop.ut_suite_items; + l_suite ut3_develop.ut_suite; begin --Arrange setup_disabled_pck; --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list('test_disabled_floating')); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list('test_disabled_floating')); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_suite := treat(l_objects_to_run(1) as ut3.ut_suite); + l_suite := treat(l_objects_to_run(1) as ut3_develop.ut_suite); ut.expect(l_suite.name).to_equal('test_disabled_floating'); ut.expect(l_suite.get_disabled_flag()).to_be_true(); @@ -1378,66 +1378,66 @@ end;]'; procedure pck_proc_in_ctx_by_name is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||'.test_package_with_ctx.test1'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test_suite ut3.ut_logical_suite; - l_ctx_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test_suite ut3_develop.ut_logical_suite; + l_ctx_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test_suite.name).to_equal('test_package_with_ctx'); ut.expect(l_test_suite.items.count).to_equal(1); - l_ctx_suite := treat(l_test_suite.items(1) as ut3.ut_logical_suite); + l_ctx_suite := treat(l_test_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_ctx_suite.name).to_equal('some_context'); ut.expect(l_ctx_suite.description).to_equal('Some context description'); ut.expect(l_ctx_suite.items.count).to_equal(1); - l_test_proc := treat(l_ctx_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_ctx_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test1'); end; procedure pck_proc_in_ctx_by_path is c_path varchar2(100) := sys_context('USERENV', 'CURRENT_USER')||':test_package_with_ctx.some_context.test1'; - l_objects_to_run ut3.ut_suite_items; + l_objects_to_run ut3_develop.ut_suite_items; - l_test_suite ut3.ut_logical_suite; - l_ctx_suite ut3.ut_logical_suite; - l_test_proc ut3.ut_test; + l_test_suite ut3_develop.ut_logical_suite; + l_ctx_suite ut3_develop.ut_logical_suite; + l_test_proc ut3_develop.ut_test; begin --Act - l_objects_to_run := ut3.ut_suite_manager.configure_execution_by_path(ut3.ut_varchar2_list(c_path)); + l_objects_to_run := ut3_develop.ut_suite_manager.configure_execution_by_path(ut3_develop.ut_varchar2_list(c_path)); --Assert ut.expect(l_objects_to_run.count).to_equal(1); - l_test_suite := treat(l_objects_to_run(1) as ut3.ut_logical_suite); + l_test_suite := treat(l_objects_to_run(1) as ut3_develop.ut_logical_suite); ut.expect(l_test_suite.name).to_equal('test_package_with_ctx'); ut.expect(l_test_suite.items.count).to_equal(1); - l_ctx_suite := treat(l_test_suite.items(1) as ut3.ut_logical_suite); + l_ctx_suite := treat(l_test_suite.items(1) as ut3_develop.ut_logical_suite); ut.expect(l_ctx_suite.name).to_equal('some_context'); ut.expect(l_ctx_suite.description).to_equal('Some context description'); ut.expect(l_ctx_suite.items.count).to_equal(1); - l_test_proc := treat(l_ctx_suite.items(1) as ut3.ut_test); + l_test_proc := treat(l_ctx_suite.items(1) as ut3_develop.ut_test); ut.expect(l_test_proc.name).to_equal('test1'); end; procedure test_get_schema_ut_packages is - l_expected ut3.ut_object_names; - l_actual ut3.ut_object_names; + l_expected ut3_develop.ut_object_names; + l_actual ut3_develop.ut_object_names; begin - l_expected := ut3.ut_object_names( - ut3.ut_object_name('UT3','SOME_TEST_PACKAGE') + l_expected := ut3_develop.ut_object_names( + ut3_develop.ut_object_name('UT3_DEVELOP','SOME_TEST_PACKAGE') ); - l_actual := ut3_tester_helper.run_helper.get_schema_ut_packages('UT3'); + l_actual := ut3_tester_helper.run_helper.get_schema_ut_packages('UT3_DEVELOP'); ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); end; @@ -1454,16 +1454,16 @@ end;]'; end; procedure add_new_long_test_package is - l_actual ut3.ut_object_names; + l_actual ut3_develop.ut_object_names; l_expected_message varchar2(500); begin - l_expected_message := q'[ORA-20217: 'Suitepath exceeds 1000 CHAR on: UT3.DUMMY_LONG_TEST_PACKAGE,UT3.DUMMY_LONG_TEST_PACKAGE1'%]'; - l_actual := ut3_tester_helper.run_helper.get_schema_ut_packages('UT3'); + l_expected_message := q'[ORA-20217: 'Suitepath exceeds 1000 CHAR on: UT3_DEVELOP.DUMMY_LONG_TEST_PACKAGE,UT3_DEVELOP.DUMMY_LONG_TEST_PACKAGE1'%]'; + l_actual := ut3_tester_helper.run_helper.get_schema_ut_packages('UT3_DEVELOP'); ut.fail('Expected exception for suitpaths over 1k for two packages'); exception when others then ut.expect(dbms_utility.format_error_stack()).to_be_like(l_expected_message); - ut.expect(SQLCODE).to_equal(ut3.ut_utils.gc_value_too_large); + ut.expect(SQLCODE).to_equal(ut3_develop.ut_utils.gc_value_too_large); end; end test_suite_manager; diff --git a/test/ut3_tester/core/test_suite_manager.pks b/test/ut3_tester/core/test_suite_manager.pks index ed318b890..90b589b9e 100644 --- a/test/ut3_tester/core/test_suite_manager.pks +++ b/test/ut3_tester/core/test_suite_manager.pks @@ -3,9 +3,6 @@ create or replace package test_suite_manager is --%suite(suite_manager) --%suitepath(utplsql.ut3_tester.core) - procedure create_dummy_long_test_package; - - procedure drop_dummy_long_test_package; --%beforeall procedure compile_dummy_packages; @@ -170,6 +167,8 @@ create or replace package test_suite_manager is --%beforetest(create_dummy_long_test_package) --%aftertest(drop_dummy_long_test_package) procedure add_new_long_test_package; + procedure create_dummy_long_test_package; + procedure drop_dummy_long_test_package; end test_suite_manager; / diff --git a/test/ut3_tester/core/test_ut_executable.pkb b/test/ut3_tester/core/test_ut_executable.pkb index 92420de47..e27a2e432 100644 --- a/test/ut3_tester/core/test_ut_executable.pkb +++ b/test/ut3_tester/core/test_ut_executable.pkb @@ -3,13 +3,13 @@ create or replace package body test_ut_executable is g_dbms_output_text varchar2(30) := 'Some output from procedure'; procedure exec_schema_package_proc is - l_executable ut3.ut_executable; - l_test ut3.ut_test; + l_executable ut3_develop.ut_executable; + l_test ut3_develop.ut_test; l_result boolean; begin --Arrange - l_test := ut3.ut_test(a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); - l_executable := ut3.ut_executable_test( null, 'test_ut_executable', 'passing_proc', ut3.ut_utils.gc_test_execute ); + l_test := ut3_develop.ut_test(a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); + l_executable := ut3_develop.ut_executable_test( null, 'test_ut_executable', 'passing_proc', ut3_develop.ut_utils.gc_test_execute ); --Act l_result := l_executable.do_execute(l_test); --Assert @@ -19,14 +19,14 @@ create or replace package body test_ut_executable is end; procedure exec_package_proc_output is - l_executable ut3.ut_executable; - l_test ut3.ut_test; + l_executable ut3_develop.ut_executable; + l_test ut3_develop.ut_test; l_result boolean; begin --Arrange - l_test := ut3.ut_test(a_object_owner => 'ut3_tester', a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); - l_executable := ut3.ut_executable_test( a_owner => 'ut3_tester', a_package => 'test_ut_executable', - a_procedure_name => 'output_proc', a_executable_type => ut3.ut_utils.gc_test_execute ); + l_test := ut3_develop.ut_test(a_object_owner => 'ut3_tester', a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); + l_executable := ut3_develop.ut_executable_test( a_owner => 'ut3_tester', a_package => 'test_ut_executable', + a_procedure_name => 'output_proc', a_executable_type => ut3_develop.ut_utils.gc_test_execute ); --Act l_result := l_executable.do_execute(l_test); --Assert @@ -36,13 +36,13 @@ create or replace package body test_ut_executable is end; procedure exec_failing_proc is - l_executable ut3.ut_executable; - l_test ut3.ut_test; + l_executable ut3_develop.ut_executable; + l_test ut3_develop.ut_test; l_result boolean; begin --Arrange - l_test := ut3.ut_test(a_object_owner => 'ut3_tester', a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); - l_executable := ut3.ut_executable_test( 'ut3_tester', 'test_ut_executable', 'throwing_proc', ut3.ut_utils.gc_test_execute ); + l_test := ut3_develop.ut_test(a_object_owner => 'ut3_tester', a_object_name => 'test_ut_executable',a_name => 'test_ut_executable', a_line_no=> 1); + l_executable := ut3_develop.ut_executable_test( 'ut3_tester', 'test_ut_executable', 'throwing_proc', ut3_develop.ut_utils.gc_test_execute ); --Act l_result := l_executable.do_execute(l_test); --Assert @@ -51,42 +51,12 @@ create or replace package body test_ut_executable is ut.expect(l_executable.get_error_stack_trace()).to_be_like('ORA-06501: PL/SQL: program error%'); end; - procedure modify_stateful_package is - l_job_name varchar2(30) := 'recreate_stateful_package'; - l_cnt integer := 1; - pragma autonomous_transaction; - begin - dbms_scheduler.create_job( - job_name => l_job_name, - job_type => 'PLSQL_BLOCK', - job_action => q'/ - begin - execute immediate q'[ - create or replace package stateful_package as - g_state varchar2(3) := 'abc'; - end;]'; - end;/', - start_date => localtimestamp, - enabled => TRUE, - auto_drop => TRUE, - comments => 'one-time job' - ); - $if dbms_db_version.version >= 18 $then - dbms_session.sleep(0.4); - $else - dbms_lock.sleep(0.4); - $end - while l_cnt > 0 loop - l_cnt:=ut3_tester_helper.main_helper.get_job_count(l_job_name); - end loop; - end; - procedure form_name is begin - ut.expect(ut3.ut_executable_test( user, ' package ', 'proc', null ).form_name()).to_equal(user||'.package.proc'); - ut.expect(ut3.ut_executable_test( null, 'package', ' proc ', null ).form_name()).to_equal('package.proc'); - ut.expect(ut3.ut_executable_test( null, 'proc', null, null ).form_name()).to_equal('proc'); - ut.expect(ut3.ut_executable_test( ' '||user||' ', 'proc', null, null ).form_name()).to_equal(user||'.proc'); + ut.expect(ut3_develop.ut_executable_test( user, ' package ', 'proc', null ).form_name()).to_equal(user||'.package.proc'); + ut.expect(ut3_develop.ut_executable_test( null, 'package', ' proc ', null ).form_name()).to_equal('package.proc'); + ut.expect(ut3_develop.ut_executable_test( null, 'proc', null, null ).form_name()).to_equal('proc'); + ut.expect(ut3_develop.ut_executable_test( ' '||user||' ', 'proc', null, null ).form_name()).to_equal(user||'.proc'); end; procedure passing_proc is diff --git a/test/ut3_tester/core/test_ut_suite.pkb b/test/ut3_tester/core/test_ut_suite.pkb index 9c52df9e5..7cb9121f6 100644 --- a/test/ut3_tester/core/test_ut_suite.pkb +++ b/test/ut3_tester/core/test_ut_suite.pkb @@ -16,23 +16,23 @@ create or replace package body test_ut_suite is end; procedure disabled_suite is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_example_tests'; - l_suite.disabled_flag := ut3.ut_utils.boolean_to_int(true); - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'set_g_number_0', ut3.ut_utils.gc_before_all)); - l_suite.after_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'add_1_to_g_number', ut3.ut_utils.gc_before_all)); + l_suite.disabled_flag := ut3_develop.ut_utils.boolean_to_int(true); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); + l_suite.after_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'add_1_to_g_number', ut3_develop.ut_utils.gc_before_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_disabled); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_disabled); ut.expect(l_suite.results_count.disabled_count).to_equal(2); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(0); @@ -41,19 +41,19 @@ create or replace package body test_ut_suite is end; procedure beforeall_errors is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_example_tests'; - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'failing_procedure', ut3.ut_utils.gc_before_all)); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'failing_procedure', ut3_develop.ut_utils.gc_before_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'set_g_number_0', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'set_g_number_0', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(0); @@ -62,22 +62,22 @@ create or replace package body test_ut_suite is end; procedure aftereall_errors is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_example_tests'; - l_suite.after_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'failing_procedure', ut3.ut_utils.gc_after_all)); + l_suite.after_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'UT_EXAMPLE_TESTS', 'failing_procedure', ut3_develop.ut_utils.gc_after_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'set_g_number_0', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'set_g_number_0', a_line_no=> 1); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_EXAMPLE_TESTS',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(1); ut.expect(l_suite.results_count.success_count).to_equal(2); @@ -86,42 +86,42 @@ create or replace package body test_ut_suite is end; procedure package_without_body is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin - l_suite := ut3.ut_suite(a_object_owner => USER, a_object_name => 'UT_WITHOUT_BODY', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => USER, a_object_name => 'UT_WITHOUT_BODY', a_line_no=> 1); l_suite.path := 'UT_WITHOUT_BODY'; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_name => 'ut_without_body',a_name => 'test1', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_name => 'ut_without_body',a_name => 'test1', a_line_no=> 1); --Act l_suite.do_execute(); --Assert - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure package_with_invalid_body is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin - l_suite := ut3.ut_suite(a_object_owner => USER, a_object_name => 'UT_WITH_INVALID_BODY', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => USER, a_object_name => 'UT_WITH_INVALID_BODY', a_line_no=> 1); l_suite.path := 'UT_WITH_INVALID_BODY'; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_name => 'ut_with_invalid_body',a_name => 'test1', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_name => 'ut_with_invalid_body',a_name => 'test1', a_line_no=> 1); --Act l_suite.do_execute(); --Assert - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure rollback_auto is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin --Arrange execute immediate 'delete from ut3_tester_helper.ut$test_table'; - l_suite := ut3.ut_suite(a_object_owner => USER, a_object_name => 'UT_TRANSACTION_CONTROL', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => USER, a_object_name => 'UT_TRANSACTION_CONTROL', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_transaction_control'; - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable(USER, 'UT_TRANSACTION_CONTROL', 'setup', ut3.ut_utils.gc_before_all)); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable(USER, 'UT_TRANSACTION_CONTROL', 'setup', ut3_develop.ut_utils.gc_before_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => USER, a_object_name => 'ut_transaction_control',a_name => 'test', a_line_no=> 1); - l_suite.set_rollback_type(ut3.ut_utils.gc_rollback_auto); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => USER, a_object_name => 'ut_transaction_control',a_name => 'test', a_line_no=> 1); + l_suite.set_rollback_type(ut3_develop.ut_utils.gc_rollback_auto); --Act l_suite.do_execute(); @@ -133,24 +133,24 @@ create or replace package body test_ut_suite is procedure rollback_auto_on_failure is begin - ut3_tester_helper.run_helper.test_rollback_type('test_failure', ut3.ut_utils.gc_rollback_auto, equal(0) ); + ut3_tester_helper.run_helper.test_rollback_type('test_failure', ut3_develop.ut_utils.gc_rollback_auto, equal(0) ); end; procedure rollback_manual is begin - ut3_tester_helper.run_helper.test_rollback_type('test', ut3.ut_utils.gc_rollback_manual, be_greater_than(0) ); + ut3_tester_helper.run_helper.test_rollback_type('test', ut3_develop.ut_utils.gc_rollback_manual, be_greater_than(0) ); end; procedure rollback_manual_on_failure is begin - ut3_tester_helper.run_helper.test_rollback_type('test_failure', ut3.ut_utils.gc_rollback_manual, be_greater_than(0) ); + ut3_tester_helper.run_helper.test_rollback_type('test_failure', ut3_develop.ut_utils.gc_rollback_manual, be_greater_than(0) ); end; procedure trim_transaction_invalidators is - l_suite ut3.ut_suite; + l_suite ut3_develop.ut_suite; begin --arrange - l_suite := ut3.ut_suite(a_object_owner => USER, a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => USER, a_object_name => 'UT_EXAMPLE_TESTS', a_line_no=> 1); for i in 1 .. 100 loop l_suite.add_transaction_invalidator('schema_name.package_name.procedure_name'||i); end loop; diff --git a/test/ut3_tester/core/test_ut_test.pkb b/test/ut3_tester/core/test_ut_test.pkb index b4dcc2536..f6f59df08 100644 --- a/test/ut3_tester/core/test_ut_test.pkb +++ b/test/ut3_tester/core/test_ut_test.pkb @@ -6,24 +6,24 @@ create or replace package body test_ut_test is end; procedure disabled_test is - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_example_tests'; - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_all)); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 2); - l_suite.items(l_suite.items.last).disabled_flag := ut3.ut_utils.boolean_to_int(true); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 2); + l_suite.items(l_suite.items.last).disabled_flag := ut3_develop.ut_utils.boolean_to_int(true); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(l_suite.results_count.disabled_count).to_equal(1); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(1); @@ -32,26 +32,26 @@ create or replace package body test_ut_test is end; procedure aftertest_errors is - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); l_suite.path := 'ut3_tester_helper.ut_example_tests'; - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_all)); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); - l_test := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); - l_test.before_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3.ut_utils.gc_before_test)); - l_test.after_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3.ut_utils.gc_after_test)); + l_test := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_test.before_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3_develop.ut_utils.gc_before_test)); + l_test.after_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3_develop.ut_utils.gc_after_test)); l_suite.items.extend; l_suite.items(l_suite.items.last) := l_test; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(3); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(1); @@ -60,24 +60,24 @@ create or replace package body test_ut_test is end; procedure aftereach_errors is - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_all)); - l_test := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); - l_test.before_each_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3.ut_utils.gc_before_each)); - l_test.after_each_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3.ut_utils.gc_after_each)); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); + l_test := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_test.before_each_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3_develop.ut_utils.gc_before_each)); + l_test.after_each_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3_develop.ut_utils.gc_after_each)); l_suite.items.extend; l_suite.items(l_suite.items.last) := l_test; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(3); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(1); @@ -86,24 +86,24 @@ create or replace package body test_ut_test is end; procedure beforetest_errors is - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_all)); - l_test := ut3.ut_test(a_object_owner =>'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); - l_test.before_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3.ut_utils.gc_before_test)); - l_test.after_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3.ut_utils.gc_after_test)); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); + l_test := ut3_develop.ut_test(a_object_owner =>'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_test.before_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3_develop.ut_utils.gc_before_test)); + l_test.after_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3_develop.ut_utils.gc_after_test)); l_suite.items.extend; l_suite.items(l_suite.items.last) := l_test; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner =>'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner =>'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(2); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(1); @@ -112,24 +112,24 @@ create or replace package body test_ut_test is end; procedure beforeeach_errors is - l_suite ut3.ut_suite; - l_test ut3.ut_test; + l_suite ut3_develop.ut_suite; + l_test ut3_develop.ut_test; begin --Arrange - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_all)); - l_test := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); - l_test.before_each_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3.ut_utils.gc_before_each)); - l_test.after_each_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3.ut_utils.gc_after_each)); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_line_no=> 1); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_all)); + l_test := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_test.before_each_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'failing_procedure', ut3_develop.ut_utils.gc_before_each)); + l_test.after_each_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3_develop.ut_utils.gc_after_each)); l_suite.items.extend; l_suite.items(l_suite.items.last) := l_test; l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper',a_object_name => 'ut_example_tests',a_name => 'add_1_to_g_number', a_line_no=> 1); --Act l_suite.do_execute(); --Assert ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(2); - ut.expect(l_suite.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_suite.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(l_suite.results_count.disabled_count).to_equal(0); ut.expect(l_suite.results_count.warnings_count).to_equal(0); ut.expect(l_suite.results_count.success_count).to_equal(1); @@ -139,63 +139,63 @@ create or replace package body test_ut_test is procedure after_each_executed is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_each_list := ut3.ut_executables( - ut3.ut_executable( + l_test.after_each_list := ut3_develop.ut_executables( + ut3_develop.ut_executable( 'ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', - ut3.ut_utils.gc_after_each + ut3_develop.ut_utils.gc_after_each ) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); end; procedure after_each_proc_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_each_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3.ut_utils.gc_after_each) + l_test.after_each_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3_develop.ut_utils.gc_after_each) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(0); end; procedure after_each_procedure_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_each_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3.ut_utils.gc_after_each) + l_test.after_each_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3_develop.ut_utils.gc_after_each) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(0); end; @@ -292,7 +292,7 @@ create or replace package body test_ut_test is end; procedure application_info_on_execution is - l_output_data ut3.ut_varchar2_list; + l_output_data ut3_develop.ut_varchar2_list; l_output clob; function get_test_value(a_variable_name varchar2) return varchar2 is l_result varchar2(4000); @@ -303,8 +303,8 @@ create or replace package body test_ut_test is begin --act select * bulk collect into l_output_data - from table(ut3.ut.run('ut_output_tests')); - l_output := ut3.ut_utils.table_to_clob(l_output_data); + from table(ut3_develop.ut.run('ut_output_tests')); + l_output := ut3_develop.ut_utils.table_to_clob(l_output_data); --assert ut.expect(get_test_value('gv_before_all_client_info')).to_equal('beforeall'); @@ -318,80 +318,80 @@ create or replace package body test_ut_test is procedure before_each_executed is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'add_1_to_g_number', a_line_no => null ); begin - l_test.before_each_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_each)); + l_test.before_each_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_each)); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); end; procedure before_each_proc_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.before_each_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3.ut_utils.gc_before_each) + l_test.before_each_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3_develop.ut_utils.gc_before_each) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; end; procedure before_each_proc_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.before_each_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3.ut_utils.gc_before_each) + l_test.before_each_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3_develop.ut_utils.gc_before_each) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; end; procedure ignore_savepoint_exception is pragma autonomous_transaction; --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'ut_commit_test', a_line_no => null ); begin - l_test.rollback_type := ut3.ut_utils.gc_rollback_auto; + l_test.rollback_type := ut3_develop.ut_utils.gc_rollback_auto; --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); end; procedure owner_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'invalid owner name', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', @@ -401,7 +401,7 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure create_synonym is @@ -416,7 +416,7 @@ create or replace package body test_ut_test is procedure owner_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null @@ -425,7 +425,7 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(0); end; @@ -450,7 +450,7 @@ create or replace package body test_ut_test is procedure package_in_invalid_state is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_name => 'invalid_package', a_name => 'ut_exampletest', a_line_no => null @@ -459,12 +459,12 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure package_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_name => 'invalid package name', a_name => 'set_g_number_0', a_line_no => null @@ -473,12 +473,12 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure package_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_name => null, a_name => 'set_g_number_0', a_line_no => null @@ -487,12 +487,12 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure procedure_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'invalid procedure name', @@ -502,12 +502,12 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure procedure_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => null, @@ -517,116 +517,116 @@ create or replace package body test_ut_test is --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); end; procedure before_test_executed is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'add_1_to_g_number', a_line_no => null ); begin - l_test.before_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3.ut_utils.gc_before_test)); + l_test.before_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'set_g_number_0', ut3_develop.ut_utils.gc_before_test)); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); end; procedure before_test_proc_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.before_test_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3.ut_utils.gc_before_test) + l_test.before_test_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid setup name', ut3_develop.ut_utils.gc_before_test) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; end; procedure before_test_proc_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.before_test_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3.ut_utils.gc_before_test) + l_test.before_test_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3_develop.ut_utils.gc_before_test) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_be_null; end; procedure after_test_executed is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_test_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3.ut_utils.gc_after_test)); + l_test.after_test_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'add_1_to_g_number', ut3_develop.ut_utils.gc_after_test)); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_success); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_success); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(1); end; procedure after_test_proce_name_invalid is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_test_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid procedure name', ut3.ut_utils.gc_after_test) + l_test.after_test_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', 'invalid procedure name', ut3_develop.ut_utils.gc_after_test) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(0); end; procedure after_test_proc_name_null is --Arrange - l_test ut3.ut_test := ut3.ut_test( + l_test ut3_develop.ut_test := ut3_develop.ut_test( a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_example_tests', a_name => 'set_g_number_0', a_line_no => null ); begin - l_test.after_test_list := ut3.ut_executables( - ut3.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3.ut_utils.gc_after_test) + l_test.after_test_list := ut3_develop.ut_executables( + ut3_develop.ut_executable('ut3_tester_helper', 'ut_example_tests', null, ut3_develop.ut_utils.gc_after_test) ); --Act l_test.do_execute(); --Assert - ut.expect(l_test.result).to_equal(ut3.ut_utils.gc_error); + ut.expect(l_test.result).to_equal(ut3_develop.ut_utils.gc_error); ut.expect(ut3_tester_helper.ut_example_tests.g_number).to_equal(0); end; @@ -711,12 +711,12 @@ create or replace package body test_ut_test is end; procedure test_output_gathering is - l_output_data ut3.ut_varchar2_list; + l_output_data ut3_develop.ut_varchar2_list; l_output clob; begin select * bulk collect into l_output_data - from table(ut3.ut.run('ut_output_tests')); - l_output := ut3.ut_utils.table_to_clob(l_output_data); + from table(ut3_develop.ut.run('ut_output_tests')); + l_output := ut3_develop.ut_utils.table_to_clob(l_output_data); ut.expect(l_output).to_be_like( '%%%%%%%%1 tests, 0 failed, 0 errored%' ); diff --git a/test/ut3_tester/core/test_ut_test.pks b/test/ut3_tester/core/test_ut_test.pks index 18ea6613f..caf75eb6c 100644 --- a/test/ut3_tester/core/test_ut_test.pks +++ b/test/ut3_tester/core/test_ut_test.pks @@ -29,7 +29,7 @@ create or replace package test_ut_test is --%test(Fails test when aftereach procedure name invalid) procedure after_each_proc_name_invalid; - --%test(Tails test when aftereach procedure name null) + --%test(Fails test when aftereach procedure name null) procedure after_each_procedure_name_null; procedure create_app_info_package; diff --git a/test/ut3_tester/core/test_ut_utils.pkb b/test/ut3_tester/core/test_ut_utils.pkb index 31e1520d2..a3ed605f9 100644 --- a/test/ut3_tester/core/test_ut_utils.pkb +++ b/test/ut3_tester/core/test_ut_utils.pkb @@ -33,17 +33,17 @@ create or replace package body test_ut_utils is end; - procedure common_clob_to_table_exec(p_clob varchar2, p_delimiter varchar2, p_expected_list ut3.ut_varchar2_list, p_limit number) is + procedure common_clob_to_table_exec(p_clob varchar2, p_delimiter varchar2, p_expected_list ut3_develop.ut_varchar2_list, p_limit number) is begin execute immediate 'declare l_clob clob := '''||p_clob||'''; l_delimiter varchar2(1) := '''||p_delimiter||'''; - l_expected ut3.ut_varchar2_list := :p_expected_list; - l_result ut3.ut_varchar2_list; + l_expected ut3_develop.ut_varchar2_list := :p_expected_list; + l_result ut3_develop.ut_varchar2_list; l_limit integer := '||p_limit||q'[; l_result_str varchar2(32767); l_errors integer := 0; - function compare_element(a_element_id integer, a_expected ut3.ut_varchar2_list, a_actual ut3.ut_varchar2_list) return integer is + function compare_element(a_element_id integer, a_expected ut3_develop.ut_varchar2_list, a_actual ut3_develop.ut_varchar2_list) return integer is begin if a_expected.exists(a_element_id) and a_actual.exists(a_element_id) then if a_expected(a_element_id) = a_actual(a_element_id) or a_expected(a_element_id) is null and a_actual(a_element_id) is null then @@ -63,7 +63,7 @@ create or replace package body test_ut_utils is end; begin --Act - select column_value bulk collect into l_result from table( ut3.ut_utils.clob_to_table(l_clob, l_limit, l_delimiter) ); + select column_value bulk collect into l_result from table( ut3_develop.ut_utils.clob_to_table(l_clob, l_limit, l_delimiter) ); for i in 1 .. l_result.count loop l_result_str := l_result_str||''''||l_result(i)||''''||l_delimiter; end loop; @@ -78,68 +78,68 @@ end;]' using p_expected_list; procedure test_clob_to_table is begin - common_clob_to_table_exec('a,b,c,d', ',', ut3.ut_varchar2_list('a','b','c','d'), 1000); - common_clob_to_table_exec( '', ',', ut3.ut_varchar2_list(), 1000); - common_clob_to_table_exec( '1,b,c,d', '', ut3.ut_varchar2_list('1,b,','c,d'), 4); - common_clob_to_table_exec( 'abcdefg,hijk,axa,a', ',', ut3.ut_varchar2_list('abc','def','g','hij','k','axa','a'), 3); - common_clob_to_table_exec( ',a,,c,d,', ',', ut3.ut_varchar2_list('','a','','c','d',''), 1000); + common_clob_to_table_exec('a,b,c,d', ',', ut3_develop.ut_varchar2_list('a','b','c','d'), 1000); + common_clob_to_table_exec( '', ',', ut3_develop.ut_varchar2_list(), 1000); + common_clob_to_table_exec( '1,b,c,d', '', ut3_develop.ut_varchar2_list('1,b,','c,d'), 4); + common_clob_to_table_exec( 'abcdefg,hijk,axa,a', ',', ut3_develop.ut_varchar2_list('abc','def','g','hij','k','axa','a'), 3); + common_clob_to_table_exec( ',a,,c,d,', ',', ut3_develop.ut_varchar2_list('','a','','c','d',''), 1000); end; procedure test_test_result_to_char is begin - ut.expect(ut3.ut_utils.test_result_to_char(-1),'test unknown').to_equal('Unknown(-1)'); - ut.expect(ut3.ut_utils.test_result_to_char(null),'test unknown').to_equal('Unknown(NULL)'); - ut.expect(ut3.ut_utils.test_result_to_char(ut3.ut_utils.gc_success),'test unknown').to_equal(ut3.ut_utils.gc_success_char); + ut.expect(ut3_develop.ut_utils.test_result_to_char(-1),'test unknown').to_equal('Unknown(-1)'); + ut.expect(ut3_develop.ut_utils.test_result_to_char(null),'test unknown').to_equal('Unknown(NULL)'); + ut.expect(ut3_develop.ut_utils.test_result_to_char(ut3_develop.ut_utils.gc_success),'test unknown').to_equal(ut3_develop.ut_utils.gc_success_char); end; procedure to_string_emptyblob is begin - ut.expect(ut3.ut_data_value_blob(empty_blob()).to_string()).to_equal('EMPTY'); + ut.expect(ut3_develop.ut_data_value_blob(empty_blob()).to_string()).to_equal('EMPTY'); end; procedure to_string_emptyclob is begin - ut.expect(ut3.ut_data_value_clob(empty_clob()).to_string()).to_equal('EMPTY'); + ut.expect(ut3_develop.ut_data_value_clob(empty_clob()).to_string()).to_equal('EMPTY'); end; procedure to_string_nullblob is begin - ut.expect(ut3.ut_data_value_blob(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_blob(null).to_string()).to_equal('NULL'); end; procedure to_string_nullclob is begin - ut.expect(ut3.ut_data_value_clob(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_clob(null).to_string()).to_equal('NULL'); end; procedure to_string_nulldate is begin - ut.expect(ut3.ut_data_value_date(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_date(null).to_string()).to_equal('NULL'); end; procedure to_string_nullnumber is begin - ut.expect(ut3.ut_data_value_number(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_number(null).to_string()).to_equal('NULL'); end; procedure to_string_nulltimestamp is begin - ut.expect(ut3.ut_data_value_timestamp(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_timestamp(null).to_string()).to_equal('NULL'); end; procedure to_string_nulltimestamp_ltz is begin - ut.expect(ut3.ut_data_value_timestamp_ltz(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_timestamp_ltz(null).to_string()).to_equal('NULL'); end; procedure to_string_nulltimestamp_tz is begin - ut.expect(ut3.ut_data_value_timestamp_tz(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_timestamp_tz(null).to_string()).to_equal('NULL'); end; procedure to_string_nullvarchar2 is begin - ut.expect(ut3.ut_data_value_varchar2(null).to_string()).to_equal('NULL'); + ut.expect(ut3_develop.ut_data_value_varchar2(null).to_string()).to_equal('NULL'); end; procedure to_string_blob is @@ -147,49 +147,49 @@ end;]' using p_expected_list; l_value blob := utl_raw.cast_to_raw(l_text); l_expected varchar2(32767) := ''''||rawtohex(l_value)||''''; begin - ut.expect(ut3.ut_data_value_blob(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_blob(l_value).to_string()).to_equal(l_expected); end; procedure to_string_clob is l_value clob := 'A test char'; l_expected varchar2(32767) := ''''||l_value||''''; begin - ut.expect(ut3.ut_data_value_clob(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_clob(l_value).to_string()).to_equal(l_expected); end; procedure to_string_date is l_value date := to_date('2016-12-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss'); l_expected varchar2(100) := '2016-12-31T23:59:59'; begin - ut.expect(ut3.ut_data_value_date(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_date(l_value).to_string()).to_equal(l_expected); end; procedure to_string_timestamp is l_value timestamp(9) := to_timestamp('2016-12-31 23:59:59.123456789', 'yyyy-mm-dd hh24:mi:ss.ff'); l_expected varchar2(100) := '2016-12-31T23:59:59'||gc_delimiter||'123456789'; begin - ut.expect(ut3.ut_data_value_timestamp(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_timestamp(l_value).to_string()).to_equal(l_expected); end; procedure to_string_timestamp_ltz is l_value timestamp(9) with local time zone := to_timestamp('2016-12-31 23:59:59.123456789', 'yyyy-mm-dd hh24:mi:ss.ff'); l_expected varchar2(100) := '2016-12-31T23:59:59'||gc_delimiter||'123456789'; begin - ut.expect(ut3.ut_data_value_timestamp_ltz(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_timestamp_ltz(l_value).to_string()).to_equal(l_expected); end; procedure to_string_timestamp_tz is l_value timestamp(9) with time zone := to_timestamp_tz('2016-12-31 23:59:59.123456789 -8:00', 'yyyy-mm-dd hh24:mi:ss.ff tzh:tzm'); l_expected varchar2(100) := '2016-12-31T23:59:59'||gc_delimiter||'123456789 -08:00'; begin - ut.expect(ut3.ut_data_value_timestamp_tz(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_timestamp_tz(l_value).to_string()).to_equal(l_expected); end; procedure to_string_varchar2 is l_value varchar2(20) := 'A test char'; l_expected varchar2(100) := ''''||l_value||''''; begin - ut.expect(ut3.ut_data_value_varchar2(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_varchar2(l_value).to_string()).to_equal(l_expected); end; procedure to_string_verybigblob is @@ -197,53 +197,53 @@ end;]' using p_expected_list; l_value blob; begin l_value := clob_to_blob(l_text); - ut.expect(length(ut3.ut_data_value_blob(l_value).to_string())).to_equal(ut3.ut_utils.gc_max_output_string_length); - ut.expect(ut3.ut_data_value_blob(l_value).to_string()).to_be_like('%'||ut3.ut_utils.gc_more_data_string); + ut.expect(length(ut3_develop.ut_data_value_blob(l_value).to_string())).to_equal(ut3_develop.ut_utils.gc_max_output_string_length); + ut.expect(ut3_develop.ut_data_value_blob(l_value).to_string()).to_be_like('%'||ut3_develop.ut_utils.gc_more_data_string); end; procedure to_string_verybigclob is l_value clob := lpad('A test char',32767,'1')||lpad('1',32767,'1'); begin - ut.expect(length(ut3.ut_data_value_clob(l_value).to_string())).to_equal(ut3.ut_utils.gc_max_output_string_length); - ut.expect(ut3.ut_data_value_clob(l_value).to_string()).to_be_like('%'||ut3.ut_utils.gc_more_data_string); + ut.expect(length(ut3_develop.ut_data_value_clob(l_value).to_string())).to_equal(ut3_develop.ut_utils.gc_max_output_string_length); + ut.expect(ut3_develop.ut_data_value_clob(l_value).to_string()).to_be_like('%'||ut3_develop.ut_utils.gc_more_data_string); end; procedure to_string_verybignumber is l_value number := 1234567890123456789012345678901234567890; l_expected varchar2(100) := '1234567890123456789012345678901234567890'; begin - ut.expect(ut3.ut_data_value_number(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_number(l_value).to_string()).to_equal(l_expected); end; procedure to_string_verybigvarchar2 is l_value varchar2(32767) := lpad('A test char',32767,'1'); l_result varchar2(32767); begin - ut.expect(length(ut3.ut_data_value_varchar2(l_value).to_string())).to_equal(ut3.ut_utils.gc_max_output_string_length); - ut.expect(ut3.ut_data_value_varchar2(l_value).to_string()).to_be_like('%'||ut3.ut_utils.gc_more_data_string); + ut.expect(length(ut3_develop.ut_data_value_varchar2(l_value).to_string())).to_equal(ut3_develop.ut_utils.gc_max_output_string_length); + ut.expect(ut3_develop.ut_data_value_varchar2(l_value).to_string()).to_be_like('%'||ut3_develop.ut_utils.gc_more_data_string); end; procedure to_string_verysmallnumber is l_value number := 0.123456789012345678901234567890123456789; l_expected varchar2(100) := gc_delimiter||'123456789012345678901234567890123456789'; begin - ut.expect(ut3.ut_data_value_number(l_value).to_string()).to_equal(l_expected); + ut.expect(ut3_develop.ut_data_value_number(l_value).to_string()).to_equal(l_expected); end; procedure test_table_to_clob is - procedure exec_table_to_clob(a_list ut3.ut_varchar2_list, a_delimiter varchar2, a_expected clob) is + procedure exec_table_to_clob(a_list ut3_develop.ut_varchar2_list, a_delimiter varchar2, a_expected clob) is l_result clob; begin - l_result := ut3.ut_utils.table_to_clob(a_list, a_delimiter); + l_result := ut3_develop.ut_utils.table_to_clob(a_list, a_delimiter); ut.expect(l_result).to_equal(a_expected, a_nulls_are_equal => true); end; begin exec_table_to_clob(null, ',', ''); - exec_table_to_clob(ut3.ut_varchar2_list(), ',', ''); - exec_table_to_clob(ut3.ut_varchar2_list('a', 'b', 'c', 'd'), ',', 'a,b,c,d'); - exec_table_to_clob(ut3.ut_varchar2_list('1,b,', 'c,d'), ',', '1,b,,c,d'); - exec_table_to_clob(ut3.ut_varchar2_list('', 'a', '', 'c', 'd', ''), ',', ',a,,c,d,'); + exec_table_to_clob(ut3_develop.ut_varchar2_list(), ',', ''); + exec_table_to_clob(ut3_develop.ut_varchar2_list('a', 'b', 'c', 'd'), ',', 'a,b,c,d'); + exec_table_to_clob(ut3_develop.ut_varchar2_list('1,b,', 'c,d'), ',', '1,b,,c,d'); + exec_table_to_clob(ut3_develop.ut_varchar2_list('', 'a', '', 'c', 'd', ''), ',', ',a,,c,d,'); end; procedure test_append_with_multibyte is @@ -258,7 +258,7 @@ end;]' using p_expected_list; for i in 1..l_lines.count loop l_result := null; - ut3.ut_utils.append_to_clob(l_result, l_lines(i)); + ut3_develop.ut_utils.append_to_clob(l_result, l_lines(i)); --Assert ut.expect(dbms_lob.getlength(l_result),'Error for index '||i).to_equal(dbms_lob.getlength(l_lines(i))); @@ -289,21 +289,21 @@ end;'; l_singlebyte_string_max_size varchar2(32767 char) := rpad('x',l_varchar2_byte_limit,'x'); l_twobyte_character char(1 char) := '�?'; l_clob_multibyte clob := l_twobyte_character||l_singlebyte_string_max_size; --here we have 32769(2+32767) bytes and 32768 chars - l_expected ut3.ut_varchar2_list := ut3.ut_varchar2_list(); - l_result ut3.ut_varchar2_list; + l_expected ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list(); + l_result ut3_develop.ut_varchar2_list; begin l_expected.extend(1); l_expected(1) := l_twobyte_character||substr(l_singlebyte_string_max_size,1,l_workaround_byte_limit-1); --Act - l_result := ut3.ut_utils.clob_to_table(l_clob_multibyte); + l_result := ut3_develop.ut_utils.clob_to_table(l_clob_multibyte); --Assert ut.expect(l_result(1)).to_equal(l_expected(1)); end; procedure test_to_version_split is - l_version ut3.ut_utils.t_version; + l_version ut3_develop.ut_utils.t_version; begin - l_version := ut3.ut_utils.to_version('v034.0.0456.0333'); + l_version := ut3_develop.ut_utils.to_version('v034.0.0456.0333'); ut.expect(l_version.major).to_equal(34); ut.expect(l_version.minor).to_equal(0); ut.expect(l_version.bugfix).to_equal(456); @@ -312,62 +312,62 @@ end;'; procedure test_trim_list_elements is - l_list_to_be_equal ut3.ut_varchar2_list := ut3.ut_varchar2_list('hello', 'world', 'okay'); - l_list ut3.ut_varchar2_list := ut3.ut_varchar2_list(' hello ', chr(9)||'world ', 'okay'); + l_list_to_be_equal ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list('hello', 'world', 'okay'); + l_list ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list(' hello ', chr(9)||'world ', 'okay'); begin --Act - l_list := ut3.ut_utils.trim_list_elements(l_list); + l_list := ut3_develop.ut_utils.trim_list_elements(l_list); --Assert ut.expect(anydata.convertcollection(l_list)).to_equal(anydata.convertcollection(l_list_to_be_equal)); end; procedure trim_list_elemts_null_collect is - l_list_to_be_null ut3.ut_varchar2_list; + l_list_to_be_null ut3_develop.ut_varchar2_list; begin --Act - l_list_to_be_null := ut3.ut_utils.trim_list_elements(l_list_to_be_null); + l_list_to_be_null := ut3_develop.ut_utils.trim_list_elements(l_list_to_be_null); --Assert ut.expect(anydata.convertcollection(l_list_to_be_null)).to_be_null; end; procedure trim_list_elemts_empty_collect is - l_list_to_be_empty ut3.ut_varchar2_list := ut3.ut_varchar2_list(); + l_list_to_be_empty ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list(); begin --Act - l_list_to_be_empty := ut3.ut_utils.trim_list_elements(l_list_to_be_empty); + l_list_to_be_empty := ut3_develop.ut_utils.trim_list_elements(l_list_to_be_empty); --Assert ut.expect(anydata.convertcollection(l_list_to_be_empty)).to_be_empty; end; procedure test_filter_list is - l_list_to_be_equal ut3.ut_varchar2_list := ut3.ut_varchar2_list('-12458', '8956', '789'); - l_list ut3.ut_varchar2_list := ut3.ut_varchar2_list('-12458', '8956', 'okay', null,'458963', '789'); + l_list_to_be_equal ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list('-12458', '8956', '789'); + l_list ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list('-12458', '8956', 'okay', null,'458963', '789'); begin --Act - l_list := ut3.ut_utils.filter_list(l_list, '^-?[[:digit:]]{1,5}$'); + l_list := ut3_develop.ut_utils.filter_list(l_list, '^-?[[:digit:]]{1,5}$'); --Assert ut.expect(anydata.convertcollection(l_list)).to_equal(anydata.convertcollection(l_list_to_be_equal)); end; procedure filter_list_null_collection is - l_list_to_be_null ut3.ut_varchar2_list; + l_list_to_be_null ut3_develop.ut_varchar2_list; begin --Act - l_list_to_be_null := ut3.ut_utils.filter_list(l_list_to_be_null, '^-?[[:digit:]]{1,5}$'); + l_list_to_be_null := ut3_develop.ut_utils.filter_list(l_list_to_be_null, '^-?[[:digit:]]{1,5}$'); --Assert ut.expect(anydata.convertcollection(l_list_to_be_null)).to_be_null; end; procedure filter_list_empty_collection is - l_list_to_be_empty ut3.ut_varchar2_list := ut3.ut_varchar2_list(); + l_list_to_be_empty ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list(); begin --Act - l_list_to_be_empty := ut3.ut_utils.filter_list(l_list_to_be_empty, '^-?[[:digit:]]{1,5}$'); + l_list_to_be_empty := ut3_develop.ut_utils.filter_list(l_list_to_be_empty, '^-?[[:digit:]]{1,5}$'); --Assert ut.expect(anydata.convertcollection(l_list_to_be_empty)).to_be_empty; end; @@ -428,7 +428,7 @@ create or replace package dummy as end; ]'; --Act - l_actual := ut3.ut_utils.replace_multiline_comments(l_source); + l_actual := ut3_develop.ut_utils.replace_multiline_comments(l_source); --Assert ut.expect(l_actual).to_equal(l_expected); end; diff --git a/test/ut3_tester_helper/annotation_cache_helper.pkb b/test/ut3_tester_helper/annotation_cache_helper.pkb index 0d56823df..0715b6af1 100644 --- a/test/ut3_tester_helper/annotation_cache_helper.pkb +++ b/test/ut3_tester_helper/annotation_cache_helper.pkb @@ -4,7 +4,7 @@ create or replace package body annotation_cache_helper as pragma autonomous_transaction; begin execute immediate - 'create or replace package ut3_cache_test_owner.granted_test_suite is + 'create or replace package ut3_cache_test_owner.granted_test_suite authid definer is --%suite --%test @@ -15,11 +15,11 @@ create or replace package body annotation_cache_helper as execute immediate 'create or replace package body ut3_cache_test_owner.granted_test_suite is - procedure test1 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; - procedure test2 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; + procedure test1 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; + procedure test2 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; end;'; execute immediate - 'create or replace package ut3_cache_test_owner.not_granted_test_suite is + 'create or replace package ut3_cache_test_owner.not_granted_test_suite authid definer is --%suite --%test @@ -29,8 +29,8 @@ create or replace package body annotation_cache_helper as end;'; execute immediate 'create or replace package body ut3_cache_test_owner.not_granted_test_suite is - procedure test1 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; - procedure test2 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; + procedure test1 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; + procedure test2 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; end;'; execute immediate @@ -54,7 +54,7 @@ create or replace package body annotation_cache_helper as pragma autonomous_transaction; begin execute immediate - 'create or replace package ut3_cache_test_owner.new_suite is + 'create or replace package ut3_cache_test_owner.new_suite authid definer is --%suite --%test @@ -65,8 +65,8 @@ create or replace package body annotation_cache_helper as execute immediate 'create or replace package body ut3_cache_test_owner.new_suite is - procedure test1 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; - procedure test2 is begin ut3.ut.expect( 1 ).to_equal( 1 ); end; + procedure test1 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; + procedure test2 is begin ut3_develop.ut.expect( 1 ).to_equal( 1 ); end; end;'; execute immediate 'grant execute on ut3_cache_test_owner.new_suite to @@ -101,42 +101,42 @@ create or replace package body annotation_cache_helper as procedure purge_annotation_cache is begin - ut3.ut_runner.purge_cache( 'UT3_CACHE_TEST_OWNER' ); + ut3_develop.ut_runner.purge_cache( 'UT3_CACHE_TEST_OWNER' ); end; procedure disable_ddl_trigger is pragma autonomous_transaction; begin - execute immediate 'alter trigger ut3.ut_trigger_annotation_parsing disable'; - execute immediate 'begin ut3.ut_trigger_check.is_alive( ); end;'; + execute immediate 'alter trigger ut3_develop.ut_trigger_annotation_parsing disable'; + execute immediate 'begin ut3_develop.ut_trigger_check.is_alive( ); end;'; end; procedure enable_ddl_trigger is pragma autonomous_transaction; begin - execute immediate 'alter trigger ut3.ut_trigger_annotation_parsing enable'; + execute immediate 'alter trigger ut3_develop.ut_trigger_annotation_parsing enable'; end; procedure create_run_function_for_user(a_user varchar2) is pragma autonomous_transaction; begin execute immediate - 'create or replace function ' || a_user || '.ut_run return clob is - l_data ut3.ut_varchar2_list; + 'create or replace function ' || a_user || '.call_ut_run return clob is + l_data ut3_develop.ut_varchar2_list; l_results clob; begin - select * bulk collect into l_data from table (ut3.ut.run( ''ut3_cache_test_owner'' )); + select * bulk collect into l_data from table (ut3_develop.ut.run( ''ut3_cache_test_owner'' )); return ut3_tester_helper.main_helper.table_to_clob( l_data ); end; '; - execute immediate 'grant execute on ' || a_user || '.ut_run to public '; + execute immediate 'grant execute on ' || a_user || '.call_ut_run to public '; end; procedure drop_run_function_for_user(a_user varchar2) is pragma autonomous_transaction; begin - execute immediate 'drop function ' || a_user || '.ut_run'; + execute immediate 'drop function ' || a_user || '.call_ut_run'; end; procedure create_run_function_for_users is @@ -146,6 +146,7 @@ create or replace package body annotation_cache_helper as create_run_function_for_user( 'ut3_select_any_table_user' ); create_run_function_for_user( 'ut3_execute_any_proc_user' ); create_run_function_for_user( 'ut3_cache_test_owner' ); + create_run_function_for_user( 'ut3_develop' ); end; procedure drop_run_function_for_users is @@ -155,12 +156,13 @@ create or replace package body annotation_cache_helper as drop_run_function_for_user( 'ut3_select_any_table_user' ); drop_run_function_for_user( 'ut3_execute_any_proc_user' ); drop_run_function_for_user( 'ut3_cache_test_owner' ); + drop_run_function_for_user( 'ut3_develop' ); end; function run_tests_as(a_user varchar2) return clob is l_results clob; begin - execute immediate 'begin :x := '||a_user||'.ut_run; end;' using out l_results; + execute immediate 'begin :x := '||a_user||'.call_ut_run; end;' using out l_results; return l_results; end; end; diff --git a/test/ut3_tester_helper/coverage_helper.pkb b/test/ut3_tester_helper/coverage_helper.pkb index 1db078a8b..e9385d7d9 100644 --- a/test/ut3_tester_helper/coverage_helper.pkb +++ b/test/ut3_tester_helper/coverage_helper.pkb @@ -1,175 +1,94 @@ create or replace package body coverage_helper is - g_run_ids ut3.ut_coverage.tt_coverage_id_arr; - g_profiler_run_id integer; - g_block_run_id integer; + g_job_no integer := 0; - function get_mock_proftab_run_id return integer is - v_result integer; + function block_coverage_available return boolean is begin - select nvl(min(runid),0) - 1 into v_result - from ut3.plsql_profiler_runs; - return v_result; - end; - - function get_mock_block_run_id return integer is - v_result integer; - begin - select nvl(min(run_id),0) - 1 into v_result - from ut3.dbmspcc_runs; - return v_result; - end; - - procedure setup_mock_coverage_ids(a_profiler_run_id integer, a_block_run_id integer) is - l_coverage_ids ut3.ut_coverage.tt_coverage_id_arr; - begin - l_coverage_ids(ut3.ut_coverage.gc_proftab_coverage) := a_profiler_run_id; - l_coverage_ids(ut3.ut_coverage.gc_block_coverage) := a_block_run_id; - ut3.ut_coverage.mock_coverage_id(l_coverage_ids); - end; - - procedure setup_mock_coverage_id is - begin - g_profiler_run_id := get_mock_proftab_run_id(); - g_block_run_id := get_mock_block_run_id(); - setup_mock_coverage_ids(g_profiler_run_id, g_block_run_id); + $if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then + return true; + $else + return false; + $end end; - procedure setup_dummy_coverage is - pragma autonomous_transaction; + function covered_package_name return varchar2 is begin - create_dummy_12_2_cov_pck(); - create_dummy_12_2_cov_test(); - grant_exec_on_12_2_cov(); - - g_profiler_run_id := get_mock_proftab_run_id(); - g_block_run_id := get_mock_block_run_id(); - setup_mock_coverage_ids(g_profiler_run_id, g_block_run_id); - - mock_block_coverage_data(g_block_run_id, user); - mock_profiler_coverage_data(g_profiler_run_id, user); - commit; + $if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then + return 'dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long'; + $else + return 'dummy_coverage'; + $end end; - procedure mock_coverage_data(a_user in varchar2) is - c_unit_id constant integer := 1; + function substitute_covered_package( a_text varchar2, a_substitution varchar2 ) return varchar2 is begin - insert into ut3.plsql_profiler_runs ( runid, run_owner, run_date, run_comment) - values(g_profiler_run_id, a_user, sysdate, 'unit testing utPLSQL'); - - insert into ut3.plsql_profiler_units ( runid, unit_number, unit_type, unit_owner, unit_name) - values(g_profiler_run_id, c_unit_id, 'PACKAGE BODY', 'UT3', 'DUMMY_COVERAGE'); - - insert into ut3.plsql_profiler_data ( runid, unit_number, line#, total_occur, total_time) - select g_profiler_run_id, c_unit_id, 4, 1, 1 from dual union all - select g_profiler_run_id, c_unit_id, 5, 0, 0 from dual union all - select g_profiler_run_id, c_unit_id, 7, 1, 1 from dual; + return replace( replace( a_text, a_substitution, covered_package_name() ), upper(a_substitution), upper(covered_package_name()) ); end; - procedure cleanup_dummy_coverage(a_run_id in integer) is - pragma autonomous_transaction; - begin - delete from ut3.plsql_profiler_data where runid = a_run_id; - delete from ut3.plsql_profiler_units where runid = a_run_id; - delete from ut3.plsql_profiler_runs where runid = a_run_id; - commit; - end; - - procedure cleanup_dummy_coverage(a_block_id in integer, a_prof_id in integer) is - pragma autonomous_transaction; + procedure set_develop_mode is begin - begin execute immediate q'[drop package ut3.test_block_dummy_coverage]'; exception when others then null; end; - begin execute immediate q'[drop package ut3.dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long]'; exception when others then null; end; - delete from dbmspcc_blocks where run_id = a_block_id; - delete from dbmspcc_units where run_id = a_block_id; - delete from dbmspcc_runs where run_id = a_block_id; - cleanup_dummy_coverage(a_prof_id); - commit; + ut3_develop.ut_coverage.set_develop_mode(true); end; - procedure cleanup_dummy_coverage is - begin - cleanup_dummy_coverage( - g_block_run_id, - g_profiler_run_id - ); - end; - procedure create_dummy_coverage_package is + procedure create_dummy_coverage is pragma autonomous_transaction; begin - execute immediate q'[create or replace package UT3.DUMMY_COVERAGE is - procedure do_stuff; - - procedure grant_myself; + execute immediate q'[create or replace package ut3_develop.]'||covered_package_name||q'[ is + procedure do_stuff(i_input in number); end;]'; - execute immediate q'[create or replace package body UT3.DUMMY_COVERAGE is - procedure do_stuff is + + execute immediate q'[create or replace package body ut3_develop.]'||covered_package_name||q'[ is + procedure do_stuff(i_input in number) is begin - if 1 = 2 then - dbms_output.put_line('should not get here'); + if i_input = 2 then dbms_output.put_line('should not get here'); elsif i_input = 1 then dbms_output.put_line('should get here'); else - dbms_output.put_line('should get here'); + dbms_output.put_line('should not get here'); end if; end; - - procedure grant_myself is - begin - execute immediate 'grant debug,execute on UT3.DUMMY_COVERAGE to ut3$user#'; - end; end;]'; - - end; - procedure create_dummy_coverage_test is - pragma autonomous_transaction; - begin - execute immediate q'[create or replace package UT3.TEST_DUMMY_COVERAGE is + execute immediate q'[create or replace package ut3_develop.test_dummy_coverage is --%suite(dummy coverage test) --%suitepath(coverage_testing) --%test procedure test_do_stuff; - - procedure grant_myself; + + --%test + procedure zero_coverage; end;]'; - execute immediate q'[create or replace package body UT3.TEST_DUMMY_COVERAGE is + + execute immediate q'[create or replace package body ut3_develop.test_dummy_coverage is procedure test_do_stuff is begin - dummy_coverage.do_stuff; + ]'||covered_package_name||q'[.do_stuff(1); + ut.expect(1).to_equal(1); end; - - procedure grant_myself is + procedure zero_coverage is begin - execute immediate 'grant debug,execute on UT3.TEST_DUMMY_COVERAGE to ut3$user#'; + null; end; end;]'; - - end; - - procedure grant_exec_on_cov is - pragma autonomous_transaction; - begin - execute immediate 'begin UT3.DUMMY_COVERAGE.grant_myself(); end;'; - execute immediate 'begin UT3.TEST_DUMMY_COVERAGE.grant_myself(); end;'; + end; - - procedure drop_dummy_coverage_pkg is + + procedure drop_dummy_coverage is pragma autonomous_transaction; begin - begin execute immediate q'[drop package ut3.test_dummy_coverage]'; exception when others then null; end; - begin execute immediate q'[drop package ut3.dummy_coverage]'; exception when others then null; end; + begin execute immediate q'[drop package ut3_develop.test_dummy_coverage]'; exception when others then null; end; + begin execute immediate q'[drop package ut3_develop.]'||covered_package_name; exception when others then null; end; end; - procedure create_dummy_coverage_test_1 is + procedure create_dummy_coverage_1 is pragma autonomous_transaction; begin - execute immediate q'[create or replace package UT3.DUMMY_COVERAGE_1 is + execute immediate q'[create or replace package ut3_develop.dummy_coverage_1 is procedure do_stuff; - procedure grant_myself; end;]'; - execute immediate q'[create or replace package body UT3.DUMMY_COVERAGE_1 is + + execute immediate q'[create or replace package body ut3_develop.dummy_coverage_1 is procedure do_stuff is begin if 1 = 2 then @@ -178,141 +97,206 @@ create or replace package body coverage_helper is dbms_output.put_line('should get here'); end if; end; - - procedure grant_myself is - begin - execute immediate 'grant debug,execute on UT3.DUMMY_COVERAGE_1 to ut3$user#'; - end; - end;]'; - execute immediate q'[create or replace package UT3.TEST_DUMMY_COVERAGE_1 is + + execute immediate q'[create or replace package ut3_develop.test_dummy_coverage_1 is --%suite(dummy coverage test 1) --%suitepath(coverage_testing) --%test procedure test_do_stuff; - - procedure grant_myself; end;]'; - execute immediate q'[create or replace package body UT3.TEST_DUMMY_COVERAGE_1 is + + execute immediate q'[create or replace package body ut3_develop.test_dummy_coverage_1 is procedure test_do_stuff is begin dummy_coverage_1.do_stuff; end; - procedure grant_myself is - begin - execute immediate 'grant debug,execute on UT3.TEST_DUMMY_COVERAGE_1 to ut3$user#'; - end; - end;]'; - execute immediate 'begin UT3.DUMMY_COVERAGE_1.grant_myself(); end;'; - execute immediate 'begin UT3.TEST_DUMMY_COVERAGE_1.grant_myself(); end;'; end; - procedure drop_dummy_coverage_test_1 is + procedure drop_dummy_coverage_1 is pragma autonomous_transaction; begin - execute immediate q'[drop package UT3.DUMMY_COVERAGE_1]'; - execute immediate q'[drop package UT3.TEST_DUMMY_COVERAGE_1]'; + begin execute immediate q'[drop package ut3_develop.dummy_coverage_1]'; exception when others then null; end; + begin execute immediate q'[drop package ut3_develop.test_dummy_coverage_1]'; exception when others then null; end; end; - --12.2 Setup - procedure create_dummy_12_2_cov_pck is - pragma autonomous_transaction; + procedure run_standalone_coverage(a_coverage_run_id raw, a_input integer) is begin - execute immediate q'[create or replace package UT3.DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG is - procedure do_stuff(i_input in number); - - procedure grant_myself; - end;]'; - execute immediate q'[create or replace package body UT3.DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG is - procedure do_stuff(i_input in number) is - begin - if i_input = 2 then - dbms_output.put_line('should not get here'); - else - dbms_output.put_line('should get here'); - end if; - end; - - procedure grant_myself is - begin - execute immediate 'grant debug,execute on UT3.DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG to ut3$user#'; - end; - - end;]'; + ut3_develop.ut_runner.coverage_start(a_coverage_run_id); + execute immediate 'begin ut3_develop.'||covered_package_name||'.do_stuff(:a_input); end;' using in a_input; + ut3_develop.ut_runner.coverage_stop(); end; - procedure create_dummy_12_2_cov_test is - pragma autonomous_transaction; + function get_job_status(a_job_name varchar2, a_job_started_after timestamp with time zone) return varchar2 is + l_status varchar2(1000); begin - execute immediate q'[create or replace package UT3.TEST_BLOCK_DUMMY_COVERAGE is - --%suite(dummy coverage test) - --%suitepath(coverage_testing) + begin + select status into l_status + from user_scheduler_job_run_details + where job_name = upper(a_job_name) + and req_start_date >= a_job_started_after; + exception + when no_data_found then + null; + end; + return l_status; + end; - --%test - procedure test_do_stuff; - - procedure grant_myself; - - end;]'; - execute immediate q'[create or replace package body UT3.TEST_BLOCK_DUMMY_COVERAGE is - procedure test_do_stuff is - begin - dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long.do_stuff(1); - ut.expect(1).to_equal(1); - end; - - procedure grant_myself is - begin - execute immediate 'grant debug,execute on UT3.TEST_BLOCK_DUMMY_COVERAGE to ut3$user#'; - end; - end;]'; + procedure sleep(a_time number) is + begin + $if dbms_db_version.version >= 18 $then + dbms_session.sleep(a_time); + $else + dbms_lock.sleep(a_time ); + $end end; - procedure mock_block_coverage_data(a_run_id integer,a_user in varchar2) is - c_unit_id constant integer := 1; + procedure run_job_and_wait_for_finish(a_job_action varchar2) is + l_status varchar2(1000); + l_job_name varchar2(30); + l_timestamp timestamp with time zone := current_timestamp; + i integer := 0; + pragma autonomous_transaction; begin - insert into dbmspcc_runs ( run_id, run_owner, run_timestamp, run_comment) - values(a_run_id, a_user, sysdate, 'unit testing utPLSQL'); + g_job_no := g_job_no + 1; + l_job_name := 'utPLSQL_selftest_job_'||g_job_no; + sleep(0.15); + dbms_scheduler.create_job( + job_name => l_job_name, + job_type => 'PLSQL_BLOCK', + job_action => a_job_action, + start_date => l_timestamp, + enabled => TRUE, + auto_drop => TRUE, + comments => 'one-time-job' + ); + while (l_status is null or l_status not in ('SUCCEEDED','FAILED')) and i < 30 loop + l_status := get_job_status( l_job_name, l_timestamp ); + sleep(0.1); + i := i + 1; + end loop; + commit; + if l_status = 'FAILED' then + raise_application_error(-20000, 'Running a scheduler job failed'); + end if; + end; - insert into dbmspcc_units ( run_id, object_id, type, owner, name,last_ddl_time) - values(a_run_id, c_unit_id, 'PACKAGE BODY', 'UT3', 'DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG',sysdate); + procedure run_coverage_job(a_coverage_run_id raw, a_input integer) is + begin + run_job_and_wait_for_finish( + 'begin coverage_helper.run_standalone_coverage('''||a_coverage_run_id||''', '||a_input||'); end;' + ); + end; - insert into dbmspcc_blocks ( run_id, object_id, line,block,col,covered,not_feasible) - select a_run_id, c_unit_id,4,1,1,1,0 from dual union all - select a_run_id, c_unit_id,4,2,2,0,0 from dual union all - select a_run_id, c_unit_id,5,3,0,1,0 from dual union all - select a_run_id, c_unit_id,7,4,1,1,0 from dual; + procedure create_test_results_table is + pragma autonomous_transaction; + e_exists exception; + pragma exception_init ( e_exists, -955 ); + begin + execute immediate 'create table test_results (text varchar2(4000))'; + exception + when e_exists then + null; end; - procedure mock_profiler_coverage_data(a_run_id integer,a_user in varchar2) is - c_unit_id constant integer := 1; + procedure drop_test_results_table is + pragma autonomous_transaction; + e_not_exists exception; + pragma exception_init ( e_not_exists, -942 ); begin - insert into ut3.plsql_profiler_runs ( runid, run_owner, run_date, run_comment) - values(a_run_id, a_user, sysdate, 'unit testing utPLSQL'); + execute immediate 'drop table test_results'; + exception + when e_not_exists then + null; + end; + + function run_code_as_job( a_plsql_block varchar2 ) return clob is + l_result_clob clob; + pragma autonomous_transaction; + begin + run_job_and_wait_for_finish( a_plsql_block ); + + execute immediate q'[ + declare + l_results ut3_develop.ut_varchar2_list; + begin + select * + bulk collect into l_results + from test_results; + delete from test_results; + commit; + :clob_results := ut3_tester_helper.main_helper.table_to_clob(l_results); + end; + ]' + using out l_result_clob; - insert into ut3.plsql_profiler_units ( runid, unit_number, unit_type, unit_owner, unit_name) - values(a_run_id, c_unit_id, 'PACKAGE BODY', 'UT3', 'DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG'); + return l_result_clob; + end; - insert into ut3.plsql_profiler_data ( runid, unit_number, line#, total_occur, total_time) - select a_run_id, c_unit_id, 4, 1, 1 from dual union all - select a_run_id, c_unit_id, 5, 0, 0 from dual union all - select a_run_id, c_unit_id, 6, 1, 0 from dual union all - select a_run_id, c_unit_id, 7, 1, 1 from dual; + function run_tests_as_job( a_run_command varchar2 ) return clob is + l_plsql_block varchar2(32767); + l_result_clob clob; + pragma autonomous_transaction; + begin + l_plsql_block := 'begin insert into test_results select * from table( {a_run_command} ); commit; end;'; + l_plsql_block := replace(l_plsql_block,'{a_run_command}',a_run_command); + return run_code_as_job( l_plsql_block ); end; - procedure grant_exec_on_12_2_cov is - pragma autonomous_transaction; + procedure create_dup_object_name is + pragma autonomous_transaction; begin - execute immediate 'begin UT3.DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG.grant_myself(); end;'; - execute immediate 'begin UT3.TEST_BLOCK_DUMMY_COVERAGE.grant_myself(); end;'; + execute immediate 'create table ut3_develop.test_table(id integer)'; + execute immediate q'[ + create or replace trigger ut3_develop.duplicate_name + before insert on ut3_develop.test_table + begin + + dbms_output.put_line('A'); + end; + ]'; + execute immediate q'[ + create or replace package ut3_develop.duplicate_name is + procedure some_procedure; + end; + ]'; + execute immediate q'[ + create or replace package body ut3_develop.duplicate_name is + procedure some_procedure is + begin + insert into test_table(id) values(1); + end; + end; + ]'; + execute immediate q'[ + create or replace package ut3_develop.test_duplicate_name is + --%suite + + --%test + procedure run_duplicate_name; + end; + ]'; + execute immediate q'[ + create or replace package body ut3_develop.test_duplicate_name is + procedure run_duplicate_name is + l_actual sys_refcursor; + begin + ut3_develop.duplicate_name.some_procedure; + ut.expect(l_actual).to_have_count(1); + end; + end; + ]'; end; - procedure set_develop_mode is + procedure drop_dup_object_name is + pragma autonomous_transaction; begin - ut3.ut_coverage.set_develop_mode(true); + execute immediate 'drop table ut3_develop.test_table'; + execute immediate 'drop package ut3_develop.duplicate_name'; + execute immediate 'drop package ut3_develop.test_duplicate_name'; end; end; diff --git a/test/ut3_tester_helper/coverage_helper.pks b/test/ut3_tester_helper/coverage_helper.pks index 9e152707b..9a3bd1db6 100644 --- a/test/ut3_tester_helper/coverage_helper.pks +++ b/test/ut3_tester_helper/coverage_helper.pks @@ -1,34 +1,29 @@ create or replace package coverage_helper is - type prof_runs_tab is table of ut3.plsql_profiler_runs%rowtype; - - function get_mock_proftab_run_id return integer; + function block_coverage_available return boolean; - procedure setup_mock_coverage_id; + function covered_package_name return varchar2; - procedure mock_coverage_data(a_user in varchar2); + function substitute_covered_package( a_text varchar2, a_substitution varchar2 := '{p}' ) return varchar2; - procedure cleanup_dummy_coverage; + procedure set_develop_mode; - procedure setup_dummy_coverage; + procedure create_dummy_coverage; + procedure drop_dummy_coverage; - --Profiler coverage - procedure create_dummy_coverage_package; - procedure create_dummy_coverage_test; - procedure grant_exec_on_cov; - procedure mock_profiler_coverage_data(a_run_id integer,a_user in varchar2); - procedure drop_dummy_coverage_pkg; + procedure create_dummy_coverage_1; + procedure drop_dummy_coverage_1; - procedure create_dummy_coverage_test_1; - procedure drop_dummy_coverage_test_1; + procedure run_standalone_coverage(a_coverage_run_id raw, a_input integer); + procedure run_coverage_job(a_coverage_run_id raw, a_input integer); - --Block coverage - procedure create_dummy_12_2_cov_pck; - procedure create_dummy_12_2_cov_test; - procedure mock_block_coverage_data(a_run_id integer,a_user in varchar2); - procedure grant_exec_on_12_2_cov; + function run_tests_as_job( a_run_command varchar2 ) return clob; + function run_code_as_job( a_plsql_block varchar2 ) return clob; + procedure create_test_results_table; + procedure drop_test_results_table; + + procedure drop_dup_object_name; + procedure create_dup_object_name; - procedure set_develop_mode; - end; / diff --git a/test/ut3_tester_helper/expectations_helper.pkb b/test/ut3_tester_helper/expectations_helper.pkb index cc86f18a6..c5c1f379f 100644 --- a/test/ut3_tester_helper/expectations_helper.pkb +++ b/test/ut3_tester_helper/expectations_helper.pkb @@ -12,7 +12,7 @@ create or replace package body expectations_helper is l_expected '||a_data_type||' := '||a_data_value||'; begin --act - execute the expectation - ut3.ut.expect(l_expected).'||a_matcher_name||'(); + ut3_develop.ut.expect(l_expected).'||a_matcher_name||'(); end;'; return l_execute; end; @@ -28,7 +28,7 @@ create or replace package body expectations_helper is declare l_object '||a_object_name||' := '||a_object_value||'; begin - ut3.ut.expect(anydata.convert'||a_object_type||'(l_object)).'||a_matcher_name||'(); + ut3_develop.ut.expect(anydata.convert'||a_object_type||'(l_object)).'||a_matcher_name||'(); end;'; end; @@ -48,7 +48,7 @@ create or replace package body expectations_helper is l_expected '||a_expected_data_type||' := '||a_expected_data||'; begin --act - execute the expectation - ut3.ut.expect( l_actual ).'||a_matcher_name||'(l_expected); + ut3_develop.ut.expect( l_actual ).'||a_matcher_name||'(l_expected); end;'; return l_execute; end; diff --git a/test/ut3_tester_helper/main_helper.pkb b/test/ut3_tester_helper/main_helper.pkb index c684054a1..76245ea12 100644 --- a/test/ut3_tester_helper/main_helper.pkb +++ b/test/ut3_tester_helper/main_helper.pkb @@ -12,7 +12,7 @@ create or replace package body main_helper is end if; while l_status != 1 loop if l_line is not null then - ut3.ut_utils.append_to_clob(l_result, l_line||chr(10)); + ut3_develop.ut_utils.append_to_clob(l_result, l_line||chr(10)); end if; dbms_output.get_line(line => l_line, status => l_status); end loop; @@ -29,10 +29,10 @@ create or replace package body main_helper is end; function run_test(a_path varchar2) return clob is - l_lines ut3.ut_varchar2_list; + l_lines ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_lines from table(ut3.ut.run(a_path)); - return ut3.ut_utils.table_to_clob(l_lines); + select * bulk collect into l_lines from table(ut3_develop.ut.run(a_path)); + return ut3_develop.ut_utils.table_to_clob(l_lines); end; function get_value(a_variable varchar2) return integer is @@ -42,9 +42,9 @@ create or replace package body main_helper is return l_glob_val; end; - function get_failed_expectations return ut3.ut_varchar2_list is - l_expectations_result ut3.ut_expectation_results := ut3.ut_expectation_processor.get_failed_expectations(); - l_result ut3.ut_varchar2_list := ut3.ut_varchar2_list(); + function get_failed_expectations return ut3_develop.ut_varchar2_list is + l_expectations_result ut3_develop.ut_expectation_results := ut3_develop.ut_expectation_processor.get_failed_expectations(); + l_result ut3_develop.ut_varchar2_list := ut3_develop.ut_varchar2_list(); begin for i in 1..l_expectations_result.count loop l_result := l_result multiset union l_expectations_result(i).get_result_lines(); @@ -53,19 +53,19 @@ create or replace package body main_helper is end; function get_failed_expectations(a_pos in number) return varchar2 is - l_result varchar2(32767) := ut3.ut_expectation_processor.get_failed_expectations()(a_pos).message; + l_result varchar2(32767) := ut3_develop.ut_expectation_processor.get_failed_expectations()(a_pos).message; begin return l_result; end; function failed_expectations_data return anydata is begin - return anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations()); + return anydata.convertCollection(ut3_develop.ut_expectation_processor.get_failed_expectations()); end; function get_failed_expectations_num return number is l_num_failed number; - l_results ut3.ut_expectation_results := ut3.ut_expectation_processor.get_failed_expectations(); + l_results ut3_develop.ut_expectation_results := ut3_develop.ut_expectation_processor.get_failed_expectations(); begin l_num_failed := l_results.count; return l_num_failed; @@ -73,33 +73,33 @@ create or replace package body main_helper is procedure clear_expectations is begin - ut3.ut_expectation_processor.clear_expectations(); + ut3_develop.ut_expectation_processor.clear_expectations(); end; - function table_to_clob(a_results in ut3.ut_varchar2_list) return clob is + function table_to_clob(a_results in ut3_develop.ut_varchar2_list) return clob is begin - return ut3.ut_utils.table_to_clob(a_results); + return ut3_develop.ut_utils.table_to_clob(a_results); end; - function get_warnings return ut3.ut_varchar2_rows is + function get_warnings return ut3_develop.ut_varchar2_rows is begin - return ut3.ut_expectation_processor.get_warnings(); + return ut3_develop.ut_expectation_processor.get_warnings(); end; procedure reset_nulls_equal is begin - ut3.ut_expectation_processor.nulls_Are_equal(ut3.ut_expectation_processor.gc_default_nulls_are_equal); + ut3_develop.ut_expectation_processor.nulls_Are_equal(ut3_develop.ut_expectation_processor.gc_default_nulls_are_equal); end; procedure nulls_are_equal(a_nulls_equal boolean := true) is begin - ut3.ut_expectation_processor.nulls_Are_equal(a_nulls_equal); + ut3_develop.ut_expectation_processor.nulls_Are_equal(a_nulls_equal); end; procedure cleanup_annotation_cache is pragma autonomous_transaction; begin - delete from ut3.ut_annotation_cache_info + delete from ut3_develop.ut_annotation_cache_info where object_owner = 'UT3_TESTER' and object_type = 'PACKAGE' and object_name in ('DUMMY_PACKAGE','DUMMY_TEST_PACKAGE'); commit; end; @@ -110,7 +110,7 @@ create or replace package body main_helper is execute immediate q'[ create or replace procedure ut3$user#.parse_annotations is begin - ut3.ut_runner.rebuild_annotation_cache('UT3_TESTER','PACKAGE'); + ut3_develop.ut_runner.rebuild_annotation_cache('UT3_TESTER','PACKAGE'); end;]'; end; @@ -126,42 +126,34 @@ create or replace package body main_helper is execute immediate 'begin ut3$user#.parse_annotations; end;'; end; - function get_job_count(a_job_name varchar2) return number is - l_cnt number; + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_list, a_item varchar2) is begin - select count(1) into l_cnt - from dba_scheduler_running_jobs srj - where srj.job_name = a_job_name; - end; - - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_list, a_item varchar2) is - begin - ut3.ut_utils.append_to_list(a_list,a_item); + ut3_develop.ut_utils.append_to_list(a_list,a_item); end; - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_item varchar2) is + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_item varchar2) is begin - ut3.ut_utils.append_to_list(a_list,a_item); + ut3_develop.ut_utils.append_to_list(a_list,a_item); end; - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_item clob) is + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_item clob) is begin - ut3.ut_utils.append_to_list(a_list,a_item); + ut3_develop.ut_utils.append_to_list(a_list,a_item); end; - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_items ut3.ut_varchar2_rows) is + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_items ut3_develop.ut_varchar2_rows) is begin - ut3.ut_utils.append_to_list(a_list,a_items); + ut3_develop.ut_utils.append_to_list(a_list,a_items); end; procedure set_ut_run_context is begin - ut3.ut_session_context.set_context('RUN_PATHS',' '); + ut3_develop.ut_session_context.set_context('RUN_PATHS',' '); end; procedure clear_ut_run_context is begin - ut3.ut_session_context.clear_all_context; + ut3_develop.ut_session_context.clear_all_context; end; end; diff --git a/test/ut3_tester_helper/main_helper.pks b/test/ut3_tester_helper/main_helper.pks index 63c99936c..6dd453446 100644 --- a/test/ut3_tester_helper/main_helper.pks +++ b/test/ut3_tester_helper/main_helper.pks @@ -1,7 +1,7 @@ create or replace package main_helper is - gc_success number := ut3.ut_utils.gc_success; - gc_failure number := ut3.ut_utils.gc_failure; + gc_success number := ut3_develop.ut_utils.gc_success; + gc_failure number := ut3_develop.ut_utils.gc_failure; procedure execute_autonomous(a_sql varchar2); @@ -11,7 +11,7 @@ create or replace package main_helper is function get_dbms_output_as_clob return clob; - function get_failed_expectations return ut3.ut_varchar2_list; + function get_failed_expectations return ut3_develop.ut_varchar2_list; function get_failed_expectations(a_pos in number) return varchar2; @@ -19,9 +19,9 @@ create or replace package main_helper is procedure clear_expectations; - function table_to_clob(a_results in ut3.ut_varchar2_list) return clob; + function table_to_clob(a_results in ut3_develop.ut_varchar2_list) return clob; - function get_warnings return ut3.ut_varchar2_rows; + function get_warnings return ut3_develop.ut_varchar2_rows; procedure reset_nulls_equal; @@ -35,15 +35,13 @@ create or replace package main_helper is procedure parse_dummy_test_as_ut3$user#; - function get_job_count(a_job_name varchar2) return number; - - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_list, a_item varchar2); + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_list, a_item varchar2); - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_item varchar2); + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_item varchar2); - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_item clob); + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_item clob); - procedure append_to_list(a_list in out nocopy ut3.ut_varchar2_rows, a_items ut3.ut_varchar2_rows); + procedure append_to_list(a_list in out nocopy ut3_develop.ut_varchar2_rows, a_items ut3_develop.ut_varchar2_rows); procedure set_ut_run_context; diff --git a/test/ut3_tester_helper/run_helper.pkb b/test/ut3_tester_helper/run_helper.pkb index 70695977b..c2a50170e 100644 --- a/test/ut3_tester_helper/run_helper.pkb +++ b/test/ut3_tester_helper/run_helper.pkb @@ -141,15 +141,15 @@ create or replace package body run_helper is pragma autonomous_transaction; begin setup_cache_objects(); - ut3.ut_annotation_manager.rebuild_annotation_cache('UT3$USER#','PACKAGE'); - ut3.ut_annotation_manager.rebuild_annotation_cache('UT3$USER#','PROCEDURE'); - ut3.ut_annotation_manager.rebuild_annotation_cache('UT3_TESTER_HELPER','PROCEDURE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache('UT3$USER#','PACKAGE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache('UT3$USER#','PROCEDURE'); + ut3_develop.ut_annotation_manager.rebuild_annotation_cache('UT3_TESTER_HELPER','PROCEDURE'); end; procedure cleanup_cache is pragma autonomous_transaction; begin - delete from ut3.ut_annotation_cache_info + delete from ut3_develop.ut_annotation_cache_info where object_type = 'PROCEDURE' and object_owner in ('UT3$USER#','UT3_TESTER_HELPER') or object_type = 'PACKAGE' and object_owner = user and object_name = 'DUMMY_TEST_PACKAGE'; execute immediate q'[drop package ut3$user#.dummy_test_package]'; @@ -199,7 +199,7 @@ create or replace package body run_helper is begin select 1 into a_value from dual@db_loopback; - ut3.ut.expect(a_value).to_be_null(); + ut3_develop.ut.expect(a_value).to_be_null(); end; end;]'; @@ -390,7 +390,7 @@ create or replace package body run_helper is procedure failing_stateful_test is begin - ut3.ut.expect(stateful_package.get_state@db_loopback).to_equal('abc'); + ut3_develop.ut.expect(stateful_package.get_state@db_loopback).to_equal('abc'); end; procedure rebuild_stateful_package is @@ -435,126 +435,126 @@ create or replace package body run_helper is execute immediate 'drop package ut_without_body'; end; - procedure run(a_reporter ut3.ut_reporter_base := null) is + procedure run(a_reporter ut3_develop.ut_reporter_base := null) is begin - ut3.ut.run(a_reporter); + ut3_develop.ut.run(a_reporter); end; - procedure run(a_path varchar2, a_reporter ut3.ut_reporter_base := null) is + procedure run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null) is begin - ut3.ut.run(a_path, a_reporter); + ut3_develop.ut.run(a_path, a_reporter); end; - procedure run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null) is + procedure run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null) is begin - ut3.ut.run(a_paths, a_reporter); + ut3_develop.ut.run(a_paths, a_reporter); end; - procedure run(a_paths ut3.ut_varchar2_list, a_test_files ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base) is + procedure run(a_paths ut3_develop.ut_varchar2_list, a_test_files ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base) is begin - ut3.ut.run( + ut3_develop.ut.run( a_paths, a_reporter, - a_source_files => ut3.ut_varchar2_list(), + a_source_files => ut3_develop.ut_varchar2_list(), a_test_files => a_test_files ); end; - function run(a_reporter ut3.ut_reporter_base := null) return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_reporter ut3_develop.ut_reporter_base := null) return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_reporter)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_reporter)); return l_results; end; - function run(a_paths ut3.ut_varchar2_list, a_test_files ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base) return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_test_files ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base) return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin select * bulk collect into l_results from table ( - ut3.ut.run( + ut3_develop.ut.run( a_paths, - a_reporter, a_source_files => ut3.ut_varchar2_list(), + a_reporter, a_source_files => ut3_develop.ut_varchar2_list(), a_test_files => a_test_files )); return l_results; end; - function run(a_path varchar2, a_reporter ut3.ut_reporter_base := null) - return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null) + return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_path, a_reporter)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_path, a_reporter)); return l_results; end; - function run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null) - return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null) + return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_paths, a_reporter)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_paths, a_reporter)); return l_results; end; - function run(a_test_files ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base) - return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_test_files ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base) + return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin select * bulk collect into l_results from table ( - ut3.ut.run( - a_reporter, a_source_files => ut3.ut_varchar2_list(), + ut3_develop.ut.run( + a_reporter, a_source_files => ut3_develop.ut_varchar2_list(), a_test_files => a_test_files )); return l_results; end; - procedure run(a_reporter ut3.ut_reporter_base := null,a_tags varchar2) is + procedure run(a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2) is begin - ut3.ut.run(a_reporter,a_tags => a_tags); + ut3_develop.ut.run(a_reporter,a_tags => a_tags); end; - procedure run(a_path varchar2, a_reporter ut3.ut_reporter_base := null,a_tags varchar2) is + procedure run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2) is begin - ut3.ut.run(a_path, a_reporter,a_tags => a_tags); + ut3_develop.ut.run(a_path, a_reporter,a_tags => a_tags); end; - procedure run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null, a_tags varchar2) is + procedure run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2) is begin - ut3.ut.run(a_paths, a_reporter,a_tags => a_tags); + ut3_develop.ut.run(a_paths, a_reporter,a_tags => a_tags); end; - function run(a_reporter ut3.ut_reporter_base := null,a_tags varchar2) return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2) return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_reporter, a_tags => a_tags)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_reporter, a_tags => a_tags)); return l_results; end; - function run(a_path varchar2, a_reporter ut3.ut_reporter_base := null, a_tags varchar2) - return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2) + return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_path, a_reporter,a_tags => a_tags)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_path, a_reporter,a_tags => a_tags)); return l_results; end; - function run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null, a_tags varchar2) - return ut3.ut_varchar2_list is - l_results ut3.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2) + return ut3_develop.ut_varchar2_list is + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run(a_paths, a_reporter, a_tags => a_tags)); + select * bulk collect into l_results from table (ut3_develop.ut.run(a_paths, a_reporter, a_tags => a_tags)); return l_results; end; - procedure test_rollback_type(a_procedure_name varchar2, a_rollback_type integer, a_expectation ut3_latest_release.ut_matcher) is - l_suite ut3.ut_suite; + procedure test_rollback_type(a_procedure_name varchar2, a_rollback_type integer, a_expectation ut_matcher) is + l_suite ut3_develop.ut_suite; begin --Arrange execute immediate 'delete from ut$test_table'; - l_suite := ut3.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_TRANSACTION_CONTROL', a_line_no=> 1); + l_suite := ut3_develop.ut_suite(a_object_owner => 'ut3_tester_helper', a_object_name => 'UT_TRANSACTION_CONTROL', a_line_no=> 1); l_suite.path := 'ut_transaction_control'; - l_suite.before_all_list := ut3.ut_executables(ut3.ut_executable('ut3_tester_helper', 'UT_TRANSACTION_CONTROL', 'setup', ut3.ut_utils.gc_before_all)); + l_suite.before_all_list := ut3_develop.ut_executables(ut3_develop.ut_executable('ut3_tester_helper', 'UT_TRANSACTION_CONTROL', 'setup', ut3_develop.ut_utils.gc_before_all)); l_suite.items.extend; - l_suite.items(l_suite.items.last) := ut3.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_transaction_control',a_name => a_procedure_name, a_line_no=> 1); + l_suite.items(l_suite.items.last) := ut3_develop.ut_test(a_object_owner => 'ut3_tester_helper', a_object_name => 'ut_transaction_control',a_name => a_procedure_name, a_line_no=> 1); l_suite.set_rollback_type(a_rollback_type); --Act @@ -568,7 +568,7 @@ create or replace package body run_helper is procedure create_dummy_long_test_package is pragma autonomous_transaction; begin - execute immediate q'[create or replace package ut3.dummy_long_test_package as + execute immediate q'[create or replace package ut3_develop.dummy_long_test_package as --%suitepath(verylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtext) --%suite(dummy_test_suite) @@ -577,7 +577,7 @@ create or replace package body run_helper is procedure some_dummy_test_procedure; end;]'; - execute immediate q'[create or replace package ut3.dummy_long_test_package1 as + execute immediate q'[create or replace package ut3_develop.dummy_long_test_package1 as --%suitepath(verylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtextverylongtext) --%suite(dummy_test_suite1) @@ -590,15 +590,15 @@ create or replace package body run_helper is procedure drop_dummy_long_test_package is pragma autonomous_transaction; begin - execute immediate q'[drop package ut3.dummy_long_test_package]'; - execute immediate q'[drop package ut3.dummy_long_test_package1]'; + execute immediate q'[drop package ut3_develop.dummy_long_test_package]'; + execute immediate q'[drop package ut3_develop.dummy_long_test_package1]'; end; procedure create_ut3_suite is pragma autonomous_transaction; begin execute immediate q'[ - create or replace package ut3.some_test_package + create or replace package ut3_develop.some_test_package as --%suite @@ -611,18 +611,18 @@ create or replace package body run_helper is procedure drop_ut3_suite is pragma autonomous_transaction; begin - execute immediate q'[drop package ut3.some_test_package]'; + execute immediate q'[drop package ut3_develop.some_test_package]'; end; - function get_schema_ut_packages(a_owner in varchar2) return ut3.ut_object_names is + function get_schema_ut_packages(a_owner in varchar2) return ut3_develop.ut_object_names is begin - return ut3.ut_suite_manager.get_schema_ut_packages(ut3.ut_varchar2_rows(a_owner)); + return ut3_develop.ut_suite_manager.get_schema_ut_packages(ut3_develop.ut_varchar2_rows(a_owner)); end; function ut_output_buffer_tmp return t_out_buff_tab pipelined is l_buffer_tab t_out_buff_tab; cursor get_buffer is - select * from ut3.ut_output_buffer_tmp; + select * from ut3_develop.ut_output_buffer_tmp; begin open get_buffer; fetch get_buffer bulk collect into l_buffer_tab; @@ -633,7 +633,7 @@ create or replace package body run_helper is procedure delete_buffer is begin - delete from ut3.ut_output_buffer_tmp; + delete from ut3_develop.ut_output_buffer_tmp; end; function get_annotation_cache_info_cur( @@ -643,7 +643,7 @@ create or replace package body run_helper is l_result sys_refcursor; begin open l_result for - select * from ut3.ut_annotation_cache_info + select * from ut3_develop.ut_annotation_cache_info where object_owner = a_owner and object_type = a_type; return l_result; @@ -658,8 +658,8 @@ create or replace package body run_helper is begin open l_result for select * - from ut3.ut_annotation_cache_info i - join ut3.ut_annotation_cache c on c.cache_id = i.cache_id + from ut3_develop.ut_annotation_cache_info i + join ut3_develop.ut_annotation_cache c on c.cache_id = i.cache_id where object_owner = a_owner and object_type = a_type and object_name = nvl( a_name, object_name ); return l_result; diff --git a/test/ut3_tester_helper/run_helper.pks b/test/ut3_tester_helper/run_helper.pks index 03eb314a7..0657c1a51 100644 --- a/test/ut3_tester_helper/run_helper.pks +++ b/test/ut3_tester_helper/run_helper.pks @@ -2,8 +2,7 @@ create or replace package run_helper is g_run_id integer; - type t_out_buff_tab is table of ut3.ut_output_buffer_tmp%rowtype; - type prof_runs_tab is table of ut3.plsql_profiler_runs%rowtype; + type t_out_buff_tab is table of ut3_develop.ut_output_buffer_tmp%rowtype; procedure setup_cache_objects; procedure setup_cache_objectstag; @@ -29,37 +28,37 @@ create or replace package run_helper is procedure create_trans_control; procedure drop_trans_control; - procedure run(a_reporter ut3.ut_reporter_base := null); - procedure run(a_path varchar2, a_reporter ut3.ut_reporter_base := null); - procedure run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null); - procedure run(a_paths ut3.ut_varchar2_list, a_test_files ut3.ut_varchar2_list, - a_reporter ut3.ut_reporter_base); - function run(a_reporter ut3.ut_reporter_base := null) return ut3.ut_varchar2_list; - function run(a_paths ut3.ut_varchar2_list, a_test_files ut3.ut_varchar2_list, - a_reporter ut3.ut_reporter_base) return ut3.ut_varchar2_list; - function run(a_path varchar2, a_reporter ut3.ut_reporter_base := null) - return ut3.ut_varchar2_list; - function run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null) - return ut3.ut_varchar2_list; - function run(a_test_files ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base) - return ut3.ut_varchar2_list; + procedure run(a_reporter ut3_develop.ut_reporter_base := null); + procedure run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null); + procedure run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null); + procedure run(a_paths ut3_develop.ut_varchar2_list, a_test_files ut3_develop.ut_varchar2_list, + a_reporter ut3_develop.ut_reporter_base); + function run(a_reporter ut3_develop.ut_reporter_base := null) return ut3_develop.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_test_files ut3_develop.ut_varchar2_list, + a_reporter ut3_develop.ut_reporter_base) return ut3_develop.ut_varchar2_list; + function run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null) + return ut3_develop.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null) + return ut3_develop.ut_varchar2_list; + function run(a_test_files ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base) + return ut3_develop.ut_varchar2_list; - procedure run(a_reporter ut3.ut_reporter_base := null,a_tags varchar2); - procedure run(a_path varchar2, a_reporter ut3.ut_reporter_base := null,a_tags varchar2); - procedure run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null, a_tags varchar2); - function run(a_reporter ut3.ut_reporter_base := null,a_tags varchar2) return ut3.ut_varchar2_list; - function run(a_path varchar2, a_reporter ut3.ut_reporter_base := null, a_tags varchar2) - return ut3.ut_varchar2_list; - function run(a_paths ut3.ut_varchar2_list, a_reporter ut3.ut_reporter_base := null, a_tags varchar2) - return ut3.ut_varchar2_list; + procedure run(a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2); + procedure run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2); + procedure run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2); + function run(a_reporter ut3_develop.ut_reporter_base := null,a_tags varchar2) return ut3_develop.ut_varchar2_list; + function run(a_path varchar2, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2) + return ut3_develop.ut_varchar2_list; + function run(a_paths ut3_develop.ut_varchar2_list, a_reporter ut3_develop.ut_reporter_base := null, a_tags varchar2) + return ut3_develop.ut_varchar2_list; - procedure test_rollback_type(a_procedure_name varchar2, a_rollback_type integer, a_expectation ut3_latest_release.ut_matcher); + procedure test_rollback_type(a_procedure_name varchar2, a_rollback_type integer, a_expectation ut_matcher); procedure create_dummy_long_test_package; procedure drop_dummy_long_test_package; procedure create_ut3_suite; procedure drop_ut3_suite; - function get_schema_ut_packages(a_owner in varchar2) return ut3.ut_object_names; + function get_schema_ut_packages(a_owner in varchar2) return ut3_develop.ut_object_names; function ut_output_buffer_tmp return t_out_buff_tab pipelined; procedure delete_buffer; diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index feac3fe6e..e3af7c5ad 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -24,13 +24,13 @@ create or replace package body test_ut_run is procedure ut_version is begin - ut.expect(ut3.ut.version()).to_match('^v\d+\.\d+\.\d+\.\d+(-\w+)?$'); + ut.expect(ut3_develop.ut.version()).to_match('^v\d+\.\d+\.\d+\.\d+(-\w+)?$'); end; procedure ut_fail is begin --Act - ut3.ut.fail('Testing failure message'); + ut3_develop.ut.fail('Testing failure message'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations(1)) .to_be_like('%Testing failure message%'); @@ -49,7 +49,7 @@ create or replace package body test_ut_run is l_results clob; begin --Act - ut3.ut.run('ut3_tester_helper',a_reporter => ut3.ut_documentation_reporter() ); + ut3_develop.ut.run('ut3_tester_helper',a_reporter => ut3_develop.ut_documentation_reporter() ); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%test_package_2%test_package_3%' ); @@ -59,11 +59,11 @@ create or replace package body test_ut_run is l_results clob; begin --Act - ut3.ut.run( + ut3_develop.ut.run( 'ut3_tester_helper', - a_reporter => ut3.ut_sonar_test_reporter(), - a_source_files => ut3.ut_varchar2_list(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + a_reporter => ut3_develop.ut_sonar_test_reporter(), + a_source_files => ut3_develop.ut_varchar2_list(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') ); @@ -78,7 +78,7 @@ create or replace package body test_ut_run is procedure run_proc_pkg_name is l_results clob; begin - ut3.ut.run('ut3_tester_helper.test_package_1'); + ut3_develop.ut.run('ut3_tester_helper.test_package_1'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%' ); @@ -89,10 +89,10 @@ create or replace package body test_ut_run is procedure run_proc_pkg_name_file_list is l_results clob; begin - ut3.ut.run( + ut3_develop.ut.run( 'ut3_tester_helper.test_package_3', - ut3.ut_sonar_test_reporter(), a_source_files => ut3.ut_varchar2_list(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + ut3_develop.ut_sonar_test_reporter(), a_source_files => ut3_develop.ut_varchar2_list(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') ); @@ -106,7 +106,7 @@ create or replace package body test_ut_run is procedure run_proc_path_list is l_results clob; begin - ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests.test_package_1',':tests')); + ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests')); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%' ); @@ -118,9 +118,9 @@ create or replace package body test_ut_run is l_results clob; begin ut3_tester_helper.run_helper.run( - a_paths => ut3.ut_varchar2_list(':tests.test_package_1',':tests'), - a_reporter => ut3.ut_sonar_test_reporter(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + a_paths => ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests'), + a_reporter => ut3_develop.ut_sonar_test_reporter(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') ); @@ -135,7 +135,7 @@ create or replace package body test_ut_run is l_results clob; begin --Act - ut3.ut.run('ut3_tester_helper', cast(null as ut3.ut_reporter_base)); + ut3_develop.ut.run('ut3_tester_helper', cast(null as ut3_develop.ut_reporter_base)); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%tests%test_package_1%test_package_2%tests2%test_package_3%' ); @@ -153,7 +153,7 @@ create or replace package body test_ut_run is procedure run_proc_null_path_list is l_results clob; - l_paths ut3.ut_varchar2_list; + l_paths ut3_develop.ut_varchar2_list; begin --Act ut3_tester_helper.run_helper.run(l_paths); @@ -166,7 +166,7 @@ create or replace package body test_ut_run is l_results clob; begin --Act - ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list()); + ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list()); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%test_package_2%test_package_3%' ); @@ -185,7 +185,7 @@ create or replace package body test_ut_run is execute immediate 'create or replace package body test_commit_warning is procedure does_commit is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); commit; end; end;'; @@ -200,7 +200,7 @@ create or replace package body test_ut_run is procedure run_proc_warn_on_commit is l_results clob; begin - ut3.ut.run('test_commit_warning'); + ut3_develop.ut.run('test_commit_warning'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); ut.expect(l_results).to_be_like( '%Unable to perform automatic rollback after test%'|| @@ -236,7 +236,7 @@ create or replace package body test_ut_run is execute immediate 'create or replace package body child_suite is procedure does_stuff is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; end;'; end; @@ -251,7 +251,7 @@ create or replace package body test_ut_run is procedure run_proc_fail_child_suites is l_results clob; begin - ut3.ut.run('child_suite'); + ut3_develop.ut.run('child_suite'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); ut.expect(l_results).to_be_like( '%1) does_stuff%' || @@ -314,7 +314,7 @@ create or replace package body test_ut_run is insert into transaction_test_table values (''1 - inside the test_ut_run.run_proc_keep_test_changes test'')'; --Act - ut3.ut.run('test_transaction.insert_row', a_force_manual_rollback => true); + ut3_develop.ut.run('test_transaction.insert_row', a_force_manual_rollback => true); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert @@ -339,7 +339,7 @@ create or replace package body test_ut_run is insert into transaction_test_table values (''1 - inside the test_ut_run.run_proc_keep_test_changes test'')'; --Act - ut3.ut.run('test_transaction.insert_and_raise', a_force_manual_rollback => true); + ut3_develop.ut.run('test_transaction.insert_and_raise', a_force_manual_rollback => true); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert @@ -364,7 +364,7 @@ create or replace package body test_ut_run is insert into transaction_test_table values (''1 - inside the test_ut_run.run_proc_keep_test_changes test'')'; --Act - ut3.ut.run('test_transaction.insert_row'); + ut3_develop.ut.run('test_transaction.insert_row'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert @@ -377,7 +377,7 @@ create or replace package body test_ut_run is end; procedure run_func_no_params is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin l_results := ut3_tester_helper.run_helper.run(); --Assert @@ -385,23 +385,23 @@ create or replace package body test_ut_run is end; procedure run_func_specific_reporter is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act - l_results := ut3_tester_helper.run_helper.run(ut3.ut_documentation_reporter()); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_documentation_reporter()); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%test_package_2%test_package_3%' ); end; procedure run_func_cov_file_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act select * bulk collect into l_results from table ( - ut3.ut.run('ut3_tester_helper', - ut3.ut_sonar_test_reporter(), - a_source_files => ut3.ut_varchar2_list(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + ut3_develop.ut.run('ut3_tester_helper', + ut3_develop.ut_sonar_test_reporter(), + a_source_files => ut3_develop.ut_varchar2_list(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') )); @@ -410,9 +410,9 @@ create or replace package body test_ut_run is end; procedure run_func_pkg_name is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run('ut3_tester_helper.test_package_1')); + select * bulk collect into l_results from table (ut3_develop.ut.run('ut3_tester_helper.test_package_1')); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_2%' ); @@ -420,13 +420,13 @@ create or replace package body test_ut_run is end; procedure run_func_pkg_name_file_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin select * bulk collect into l_results from table ( - ut3.ut.run('ut3_tester_helper.test_package_3', - ut3.ut_sonar_test_reporter(), - a_source_files => ut3.ut_varchar2_list(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + ut3_develop.ut.run('ut3_tester_helper.test_package_3', + ut3_develop.ut_sonar_test_reporter(), + a_source_files => ut3_develop.ut_varchar2_list(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') )); @@ -437,9 +437,9 @@ create or replace package body test_ut_run is end; procedure run_func_path_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests.test_package_1',':tests')); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests')); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2%' ); @@ -447,12 +447,12 @@ create or replace package body test_ut_run is end; procedure run_func_path_list_file_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin l_results := ut3_tester_helper.run_helper.run( - a_paths => ut3.ut_varchar2_list(':tests.test_package_1',':tests'), - a_reporter => ut3.ut_sonar_test_reporter(), - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + a_paths => ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests'), + a_reporter => ut3_develop.ut_sonar_test_reporter(), + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') ); @@ -463,16 +463,16 @@ create or replace package body test_ut_run is end; procedure run_func_null_reporter is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act - select * bulk collect into l_results from table (ut3.ut.run('ut3_tester_helper',cast(null as ut3.ut_reporter_base))); + select * bulk collect into l_results from table (ut3_develop.ut.run('ut3_tester_helper',cast(null as ut3_develop.ut_reporter_base))); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%tests%test_package_1%test_package_2%tests2%test_package_3%' ); end; procedure run_func_null_path is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act l_results := ut3_tester_helper.run_helper.run(cast(null as varchar2)); @@ -481,8 +481,8 @@ create or replace package body test_ut_run is end; procedure run_func_null_path_list is - l_results ut3.ut_varchar2_list; - l_paths ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; + l_paths ut3_develop.ut_varchar2_list; begin --Act l_results := ut3_tester_helper.run_helper.run(l_paths); @@ -491,29 +491,29 @@ create or replace package body test_ut_run is end; procedure run_func_empty_path_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act - l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list()); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list()); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%test_package_2%test_package_3%' ); end; procedure run_func_cov_file_lst_null_rep is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin --Act l_results := ut3_tester_helper.run_helper.run( - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb'), - a_reporter => cast(null as ut3.ut_reporter_base)); + a_reporter => cast(null as ut3_develop.ut_reporter_base)); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%test_package_2%test_package_3%' ); end; procedure run_func_empty_suite is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_expected varchar2(32767); pragma autonomous_transaction; begin @@ -528,7 +528,7 @@ create or replace package body test_ut_run is end;]'; l_expected := '%empty_suite%0 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%'; --Act - select * bulk collect into l_results from table(ut3.ut.run('empty_suite')); + select * bulk collect into l_results from table(ut3_develop.ut.run('empty_suite')); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( l_expected ); @@ -538,7 +538,7 @@ create or replace package body test_ut_run is end; procedure raise_in_invalid_state is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_expected varchar2(32767); begin --Arrange @@ -554,7 +554,7 @@ Failures:% 1 tests, 0 failed, 1 errored, 0 disabled, 0 warning(s)%'; --Act - select * bulk collect into l_results from table(ut3.ut.run('ut3_tester_helper.test_stateful')); + select * bulk collect into l_results from table(ut3_develop.ut.run('ut3_tester_helper.test_stateful')); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( l_expected ); @@ -576,11 +576,11 @@ Failures:% end; procedure run_in_invalid_state is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767); begin - select * bulk collect into l_results from table(ut3.ut.run('failing_invalid_spec')); + select * bulk collect into l_results from table(ut3_develop.ut.run('failing_invalid_spec')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Call params for % are not valid: package %FAILING_INVALID_SPEC% does not exist or is invalid.%'); @@ -618,7 +618,7 @@ Failures:% end; procedure run_and_revalidate_specs is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_is_invalid number; begin @@ -626,7 +626,7 @@ Failures:% and o.status = 'INVALID' and o.object_name= :object_name]' into l_is_invalid using 'UT3$USER#','INVALID_PCKAG_THAT_REVALIDATES'; - select * bulk collect into l_results from table(ut3.ut.run('invalid_pckag_that_revalidates')); + select * bulk collect into l_results from table(ut3_develop.ut.run('invalid_pckag_that_revalidates')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(1).to_equal(l_is_invalid); @@ -681,11 +681,11 @@ Failures:% end; procedure run_and_report_warnings is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin - select * bulk collect into l_results from table(ut3.ut.run('bad_annotations')); + select * bulk collect into l_results from table(ut3_develop.ut.run('bad_annotations')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Missing "--%endcontext" annotation for a "--%context" annotation. The end of package is considered end of context.% @@ -733,12 +733,12 @@ Failures:% procedure savepoints_on_db_links is l_results clob; begin - ut3.ut.run('ut3_tester_helper.test_distributed_savepoint'); + ut3_develop.ut.run('ut3_tester_helper.test_distributed_savepoint'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); ut.expect(l_results).to_be_like('%1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%'); end; - procedure remove_time_from_results(a_results in out nocopy ut3.ut_varchar2_list) is + procedure remove_time_from_results(a_results in out nocopy ut3_develop.ut_varchar2_list) is begin for i in 1 .. a_results.count loop a_results(i) := regexp_replace(a_results(i),'\[[0-9]*[\.,][0-9]+ sec\]',''); @@ -747,11 +747,11 @@ Failures:% end; procedure run_schema_name_test is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_expected clob; begin select * bulk collect into l_results - from table ( ut3.ut.run( gc_owner||'.'||gc_owner ) ); + from table ( ut3_develop.ut.run( gc_owner||'.'||gc_owner ) ); l_expected := '%1 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)%'; ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( l_expected ); end; @@ -780,17 +780,85 @@ Failures:% execute immediate 'drop package '||gc_owner||'.'||gc_owner; end; + procedure create_suites_with_path is + pragma autonomous_transaction; + begin + execute immediate q'[create or replace package ut_abc is + -- %suite + -- %suitepath(main.abc) + + -- %test + procedure ut_test_01; + end ut_abc;]'; + + execute immediate q'[create or replace package body ut_abc + is + procedure ut_test_01 as begin ut.expect(true).to_be_true(); end; + end;]'; + + execute immediate q'[create or replace package ut_abc_def + is + -- %suite + -- %suitepath(main.abc_def) + + -- %test + procedure ut_test_01; + end ut_abc_def;]'; + + execute immediate q'[create or replace package body ut_abc_def + is + procedure ut_test_01 as begin ut.expect(true).to_be_true(); end; + end;]'; + + end; + + procedure drop_suites_with_path is + pragma autonomous_transaction; + begin + execute immediate q'[drop package ut_abc]'; + execute immediate q'[drop package ut_abc_def]'; + end; + + procedure run_suite_with_nls_sort is + L_current_sort varchar2(2000); + l_results ut3_develop.ut_varchar2_list; + l_expected clob; + begin + --Arrange + select value + into l_current_sort + from nls_session_parameters where parameter = 'NLS_SORT'; + + execute immediate 'alter session set nls_sort=GERMAN'; + + --Act + select * + bulk collect into l_results + from table ( ut3_develop.ut.run( gc_owner||':main' ) ); + --Assert + l_expected := q'[main% + abc_def% + ut_abc_def% + ut_test_01% + abc% + ut_abc% + ut_test_01%]'; + ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( l_expected ); + + execute immediate 'alter session set nls_sort='||l_current_sort; + end; + procedure run_with_random_order is - l_random_results ut3.ut_varchar2_list; - l_results ut3.ut_varchar2_list; + l_random_results ut3_develop.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin select * bulk collect into l_random_results - from table ( ut3.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ) + from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ) where trim(column_value) is not null and column_value not like 'Finished in %' and column_value not like '%Tests were executed with random order %'; select * bulk collect into l_results - from table ( ut3.ut.run( 'ut3_tester_helper.test_package_1' ) ) + from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1' ) ) --TODO this condition should be removed once issues with unordered compare and 'blank text rows' are resolved. where trim(column_value) is not null and column_value not like 'Finished in %'; @@ -802,23 +870,23 @@ Failures:% end; procedure run_and_report_random_ord_seed is - l_actual ut3.ut_varchar2_list; + l_actual ut3_develop.ut_varchar2_list; begin select * bulk collect into l_actual - from table ( ut3.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 123456789 ) ); + from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 123456789 ) ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_actual) ).to_be_like( q'[%Tests were executed with random order seed '123456789'.%]' ); end; procedure run_with_random_order_seed is - l_expected ut3.ut_varchar2_list; - l_actual ut3.ut_varchar2_list; + l_expected ut3_develop.ut_varchar2_list; + l_actual ut3_develop.ut_varchar2_list; begin select * bulk collect into l_expected - from table ( ut3.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ); + from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ); select * bulk collect into l_actual - from table ( ut3.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ); + from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) ); remove_time_from_results(l_actual); remove_time_from_results(l_expected); @@ -948,7 +1016,7 @@ Failures:% procedure run_proc_pkg_name_tag is l_results clob; begin - ut3.ut.run('ut3_tester_helper.test_package_1',a_tags => 'suite1test1'); + ut3_develop.ut.run('ut3_tester_helper.test_package_1',a_tags => 'suite1test1'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%' ); @@ -961,7 +1029,7 @@ Failures:% procedure run_pkg_name_file_list_tag is l_results clob; begin - ut3.ut.run('ut3_tester_helper.test_package_1',a_tags => 'suite1test1'); + ut3_develop.ut.run('ut3_tester_helper.test_package_1',a_tags => 'suite1test1'); l_results := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); --Assert ut.expect( l_results ).to_be_like( '%test_package_1%' ); @@ -974,10 +1042,10 @@ Failures:% procedure run_proc_path_list_tag is l_results clob; begin - ut3.ut.run( + ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', - ut3.ut_sonar_test_reporter(), a_source_files => ut3.ut_varchar2_list(),a_tags => 'suite1', - a_test_files => ut3.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', + ut3_develop.ut_sonar_test_reporter(), a_source_files => ut3_develop.ut_varchar2_list(),a_tags => 'suite1', + a_test_files => ut3_develop.ut_varchar2_list('tests/ut3_tester_helper.test_package_1.pkb', 'tests/ut3_tester_helper.test_package_2.pkb', 'tests/ut3_tester_helper.test_package_3.pkb') ); @@ -989,7 +1057,7 @@ Failures:% end; procedure tag_run_func_no_params is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin l_results := ut3_tester_helper.run_helper.run(a_tags => 'helper'); --Assert @@ -997,9 +1065,9 @@ Failures:% end; procedure tag_run_func_pkg_name is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_results from table (ut3.ut.run('ut3_tester_helper.test_package_1', a_tags => 'suite1test1')); + select * bulk collect into l_results from table (ut3_develop.ut.run('ut3_tester_helper.test_package_1', a_tags => 'suite1test1')); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1.test1%executed%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_1.test2%executed%' ); @@ -1008,9 +1076,9 @@ Failures:% end; procedure tag_run_func_path_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests.test_package_1',':tests'),a_tags => 'suite1test1,suite2test1'); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests'),a_tags => 'suite1test1,suite2test1'); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2%' ); @@ -1022,9 +1090,9 @@ Failures:% end; procedure tag_inc_exc_run_func_path_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests.test_package_1',':tests'),a_tags => 'suite1test1,suite2test1,-suite2'); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list(':tests.test_package_1',':tests'),a_tags => 'suite1test1,suite2test1,-suite2'); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_2%' ); @@ -1034,9 +1102,9 @@ Failures:% end; procedure tag_exclude_run_func_path_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin - l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests,:tests2'),a_tags => '-suite1test2,-suite2test1,-test1suite3'); + l_results := ut3_tester_helper.run_helper.run(ut3_develop.ut_varchar2_list(':tests,:tests2'),a_tags => '-suite1test2,-suite2test1,-test1suite3'); --Assert ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2%' ); @@ -1050,7 +1118,7 @@ Failures:% end; procedure tag_include_exclude_run_func is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin l_results := ut3_tester_helper.run_helper.run(a_tags => 'suite1,-suite1test2,-suite2test1,-test1suite3'); --Assert @@ -1120,7 +1188,7 @@ Failures:% begin select attribute||'='||value bulk collect into l_results - from session_context where namespace = 'UT3_INFO' + from session_context where namespace = 'UT3_DEVELOP_INFO' order by attribute; for i in 1 .. l_results.count loop dbms_output.put_line( upper(a_procedure_name) ||':'|| l_results(i) ); @@ -1188,9 +1256,9 @@ Failures:% end; procedure run_context_test_suite is - l_lines ut3.ut_varchar2_list; + l_lines ut3_develop.ut_varchar2_list; begin - select * bulk collect into l_lines from table(ut3.ut.run('check_context')); + select * bulk collect into l_lines from table(ut3_develop.ut.run('check_context')); g_context_test_results := ut3_tester_helper.main_helper.table_to_clob(l_lines); end; @@ -1393,7 +1461,7 @@ Failures:% begin open l_actual for select attribute||'='||value - from session_context where namespace = 'UT3_INFO'; + from session_context where namespace = 'UT3_DEVELOP_INFO'; ut.expect(l_actual).to_be_empty(); end; diff --git a/test/ut3_user/api/test_ut_run.pks b/test/ut3_user/api/test_ut_run.pks index ac2e50e25..753af79da 100644 --- a/test/ut3_user/api/test_ut_run.pks +++ b/test/ut3_user/api/test_ut_run.pks @@ -155,6 +155,13 @@ create or replace package test_ut_run is procedure create_schema_name_package; procedure drop_schema_name_package; + --%test(Runs properly formed suite hierarchy regardless of NLS_SORT settings - Issue #1060) + --%beforetest(create_suites_with_path) + --%aftertest(drop_suites_with_path) + procedure run_suite_with_nls_sort; + procedure create_suites_with_path; + procedure drop_suites_with_path; + --%endcontext --%context(random_order) diff --git a/test/ut3_user/api/test_ut_runner.pkb b/test/ut3_user/api/test_ut_runner.pkb index e29bada11..2aa624ed8 100644 --- a/test/ut3_user/api/test_ut_runner.pkb +++ b/test/ut3_user/api/test_ut_runner.pkb @@ -45,7 +45,7 @@ end; execute immediate 'create or replace package body test_cache as procedure failing_test is begin - ut3.ut.expect('||a_number||').to_be_null; + ut3_develop.ut.expect('||a_number||').to_be_null; end; end;'; end; @@ -69,7 +69,7 @@ end;'; create_test_body(0); l_expected := dbms_transaction.local_transaction_id(true); --Act - ut3.ut.run('test_cache'); + ut3_develop.ut.run('test_cache'); dbms_output.get_lines( l_output_data, l_num_lines); --Assert ut.expect(dbms_transaction.local_transaction_id()).to_equal(l_expected); @@ -86,7 +86,7 @@ end;'; create_test_body(0); rollback; --Act - ut3.ut.run('test_cache'); + ut3_develop.ut.run('test_cache'); dbms_output.get_lines( l_output_data, l_num_lines); --Assert ut.expect(dbms_transaction.local_transaction_id()).to_be_null(); @@ -95,35 +95,35 @@ end;'; procedure version_comp_check_compare is begin - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.123.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v3.123.0.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v3.13.31.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.1.0','v3.0.0.0') ).to_equal(0); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.1.0.0','v3.0.0.0') ).to_equal(0); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v2.0.0.0') ).to_equal(0); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v4.0.0.0') ).to_equal(0); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.123.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.123.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.13.31.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.1.0','v3.0.0.0') ).to_equal(0); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.1.0.0','v3.0.0.0') ).to_equal(0); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v2.0.0.0') ).to_equal(0); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v4.0.0.0') ).to_equal(0); end; procedure version_comp_check_ignore is begin - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.123','v3.0.0.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.123') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.123','v3.0.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0.0','v3.0.0.123') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1); end; procedure version_comp_check_short is begin - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3.0','v3.0.123.0') ).to_equal(1); - ut.expect( ut3.ut_runner.version_compatibility_check('v3','v3.123.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0.0','v3.0.0.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3.0','v3.0.123.0') ).to_equal(1); + ut.expect( ut3_develop.ut_runner.version_compatibility_check('v3','v3.123.0.0') ).to_equal(1); end; procedure version_comp_check_exception is procedure throws(a_requested varchar2, a_current varchar2) is l_compatible integer; begin - l_compatible := ut3.ut_runner.version_compatibility_check(a_requested,a_current); + l_compatible := ut3_develop.ut_runner.version_compatibility_check(a_requested,a_current); ut.fail('Expected exception but nothing was raised'); exception when others then @@ -135,7 +135,7 @@ end;'; end; procedure run_reset_package_body_cache is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_expected clob; l_actual clob; begin @@ -144,16 +144,16 @@ end;'; create_test_body(0); select * bulk collect into l_results - from table(ut3.ut.run('test_cache')); + from table(ut3_develop.ut.run('test_cache')); --Act create_test_body(1); select * bulk collect into l_results - from table(ut3.ut.run('test_cache')); + from table(ut3_develop.ut.run('test_cache')); --Assert l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - l_expected := '%ut3.ut.expect(1).to_be_null;%'; + l_expected := '%ut3_develop.ut.expect(1).to_be_null;%'; ut.expect(l_actual).to_be_like(l_expected); drop_test_package(); end; @@ -161,7 +161,7 @@ end;'; procedure run_keep_dbms_output_buffer is l_expected dbmsoutput_linesarray; l_actual dbmsoutput_linesarray; - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_lines number := 10000; begin --Arrange @@ -185,7 +185,7 @@ end;'; --Act select * bulk collect into l_results - from table(ut3.ut.run('test_cache')); + from table(ut3_develop.ut.run('test_cache')); --Assert dbms_output.get_lines(lines => l_actual, numlines => l_lines); @@ -207,7 +207,7 @@ end;'; ut.expect(l_actual).not_to_be_empty(); --Act - ut3.ut_runner.purge_cache(sys_context('USERENV', 'CURRENT_USER'),'PROCEDURE'); + ut3_develop.ut_runner.purge_cache(sys_context('USERENV', 'CURRENT_USER'),'PROCEDURE'); --Assert @@ -238,7 +238,7 @@ end;'; l_actual sys_refcursor; begin --Act - ut3.ut_runner.rebuild_annotation_cache( sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE' ); + ut3_develop.ut_runner.rebuild_annotation_cache( sys_context('USERENV', 'CURRENT_USER'), 'PACKAGE' ); --Assert l_actual := ut3_tester_helper.run_helper.get_annotation_cache_cursor( a_owner => sys_context('USERENV', 'CURRENT_USER'), @@ -254,7 +254,7 @@ end;'; a_type => 'PACKAGE' ); - --Did not rebuild cache for ut3/procedures + --Did not rebuild cache for ut3_develop/procedures ut.expect(l_actual).to_have_count(0); end; @@ -285,7 +285,7 @@ end;'; 'some' path, 0 disabled_flag, null tags from dual; --Act - open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); + open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); --Assert ut.expect(l_actual).to_equal(l_expected); end; @@ -317,7 +317,7 @@ end;'; 'some' path, 0 disabled_flag, null tags from dual; --Act - open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); + open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); --Assert ut.expect(l_actual).to_equal(l_expected); end; @@ -339,7 +339,7 @@ end;'; 'dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag,'testtag1,testtag2' tags from dual; --Act - open l_actual for select * from table(ut3.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); + open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('UT3$USER#','DUMMY_TEST_PACKAGE')); --Assert ut.expect(l_actual).to_equal(l_expected); end; @@ -350,21 +350,21 @@ end;'; begin --Arrange open l_expected for - select 'UT3.UT_COVERAGE_COBERTURA_REPORTER' reporter_object_name, 'Y' is_output_reporter from dual union all - select 'UT3.UT_DEBUG_REPORTER', 'Y' from dual union all - select 'UT3.UT_COVERAGE_HTML_REPORTER', 'Y' from dual union all - select 'UT3.UT_COVERAGE_SONAR_REPORTER', 'Y' from dual union all - select 'UT3.UT_COVERALLS_REPORTER', 'Y' from dual union all - select 'UT3.UT_DOCUMENTATION_REPORTER', 'Y' from dual union all - select 'UT3.UT_JUNIT_REPORTER', 'Y' from dual union all - select 'UT3.UT_REALTIME_REPORTER', 'Y' from dual union all - select 'UT3.UT_SONAR_TEST_REPORTER', 'Y' from dual union all - select 'UT3.UT_TEAMCITY_REPORTER', 'Y' from dual union all - select 'UT3.UT_TFS_JUNIT_REPORTER', 'Y' from dual union all - select 'UT3.UT_XUNIT_REPORTER', 'Y' from dual + select 'UT3_DEVELOP.UT_COVERAGE_COBERTURA_REPORTER' reporter_object_name, 'Y' is_output_reporter from dual union all + select 'UT3_DEVELOP.UT_DEBUG_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_COVERAGE_HTML_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_COVERAGE_SONAR_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_COVERALLS_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_DOCUMENTATION_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_JUNIT_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_REALTIME_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_SONAR_TEST_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_TEAMCITY_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_TFS_JUNIT_REPORTER', 'Y' from dual union all + select 'UT3_DEVELOP.UT_XUNIT_REPORTER', 'Y' from dual order by 1; --Act - open l_actual for select * from table(ut3.ut_runner.GET_REPORTERS_LIST()) order by 1; + open l_actual for select * from table(ut3_develop.ut_runner.GET_REPORTERS_LIST()) order by 1; --Assert ut.expect(l_actual).to_equal(l_expected); end; @@ -382,13 +382,13 @@ end;'; end; procedure raises_20213_on_fail_link is - l_reporter ut3.ut_documentation_reporter := ut3.ut_documentation_reporter(); - l_lines ut3.ut_varchar2_list; + l_reporter ut3_develop.ut_documentation_reporter := ut3_develop.ut_documentation_reporter(); + l_lines ut3_develop.ut_varchar2_list; pragma autonomous_transaction; begin --Arrange --Act - ut3.ut_runner.run(ut3.ut_varchar2_list('test_db_link'), ut3.ut_reporters(l_reporter), a_fail_on_errors=> true); + ut3_develop.ut_runner.run(ut3_develop.ut_varchar2_list('test_db_link'), ut3_develop.ut_reporters(l_reporter), a_fail_on_errors=> true); ut.fail('Expected exception but nothing was raised'); exception when others then @@ -419,12 +419,12 @@ end;'; procedure one_is_one is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; procedure two_is_two is begin - ut3.ut.expect(2).to_equal(2); + ut3_develop.ut.expect(2).to_equal(2); end; end; @@ -449,12 +449,12 @@ end;'; procedure one_is_one is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; procedure two_is_two is begin - ut3.ut.expect(2).to_equal(2); + ut3_develop.ut.expect(2).to_equal(2); end; end; @@ -470,12 +470,12 @@ end;'; end; procedure pass_varchar2_name_list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run(ut3.ut_varchar2_list('test_csl_names1','test_csl_names2'))); + from table(ut3_develop.ut.run(ut3_develop.ut_varchar2_list('test_csl_names1','test_csl_names2'))); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -483,12 +483,12 @@ end;'; end; procedure pass_varchar2_name is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run('test_csl_names1')); + from table(ut3_develop.ut.run('test_csl_names1')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -496,12 +496,12 @@ end;'; end; procedure pass_varchar2_suite_csl is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run('test_csl_names1,test_csl_names2')); + from table(ut3_develop.ut.run('test_csl_names1,test_csl_names2')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -509,12 +509,12 @@ end;'; end; procedure pass_varchar2_test_csl is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run('test_csl_names1.one_is_one,test_csl_names2.one_is_one')); + from table(ut3_develop.ut.run('test_csl_names1.one_is_one,test_csl_names2.one_is_one')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -522,12 +522,12 @@ end;'; end; procedure pass_varch_test_csl_spc is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run('test_csl_names1.one_is_one, test_csl_names2.one_is_one')); + from table(ut3_develop.ut.run('test_csl_names1.one_is_one, test_csl_names2.one_is_one')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -535,17 +535,17 @@ end;'; end; procedure pass_csl_with_srcfile is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results from table( - ut3.ut.run( + ut3_develop.ut.run( a_path => 'test_csl_names1.one_is_one,test_csl_names2.one_is_one', - a_source_files => ut3.ut_varchar2_list('ut3.ut'), - a_test_files => ut3.ut_varchar2_list('ut3_tester.test_csl_names2') + a_source_files => ut3_develop.ut_varchar2_list('ut3_develop.ut'), + a_test_files => ut3_develop.ut_varchar2_list('ut3_tester.test_csl_names2') ) ); @@ -555,12 +555,12 @@ end;'; end; procedure pass_csl_within_var2list is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin select * bulk collect into l_results - from table(ut3.ut.run(ut3.ut_varchar2_list('test_csl_names1.one_is_one,test_csl_names2.one_is_one'))); + from table(ut3_develop.ut.run(ut3_develop.ut_varchar2_list('test_csl_names1.one_is_one,test_csl_names2.one_is_one'))); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like('%Finished in % seconds @@ -570,55 +570,55 @@ end;'; procedure is_test_true is begin ut.expect( - ut3.ut_runner.is_test( + ut3_develop.ut_runner.is_test( a_owner => 'UT3$USER#', a_package_name => 'DUMMY_TEST_PACKAGE', a_procedure_name => 'SOME_DUMMY_TEST_PROCEDURE' ) ).to_be_true(); - ut.expect( ut3.ut_runner.is_test( 'ut3$user#','dummy_test_package','some_dummy_test_procedure' ) ).to_be_true(); + ut.expect( ut3_develop.ut_runner.is_test( 'ut3$user#','dummy_test_package','some_dummy_test_procedure' ) ).to_be_true(); end; procedure is_test_false is begin - ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', 'BAD' ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','BAD_TEST_PACKAGE', 'some_dummy_test_procedure' ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_test( 'UT3$USER#',null,'some_dummy_test_procedure' ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_test( null,'DUMMY_TEST_PACKAGE','some_dummy_test_procedure' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', 'BAD' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_test( 'UT3$USER#','BAD_TEST_PACKAGE', 'some_dummy_test_procedure' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_test( 'UT3$USER#','DUMMY_TEST_PACKAGE', null ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_test( 'UT3$USER#',null,'some_dummy_test_procedure' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_test( null,'DUMMY_TEST_PACKAGE','some_dummy_test_procedure' ) ).to_be_false(); end; procedure is_suite_true is begin ut.expect( - ut3.ut_runner.is_suite( + ut3_develop.ut_runner.is_suite( a_owner => 'UT3$USER#', a_package_name => 'DUMMY_TEST_PACKAGE' ) ).to_be_true(); - ut.expect( ut3.ut_runner.is_suite( 'ut3$user#','dummy_test_package' ) ).to_be_true(); + ut.expect( ut3_develop.ut_runner.is_suite( 'ut3$user#','dummy_test_package' ) ).to_be_true(); end; procedure is_suite_false is begin - ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','BAD' ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#', null ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_suite( null,'DUMMY_TEST_PACKAGE' ) ).to_be_false(); - ut.expect( ut3.ut_runner.is_suite( 'UT3$USER#','bad_test_package' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_suite( 'UT3$USER#','BAD' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_suite( 'UT3$USER#', null ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_suite( null,'DUMMY_TEST_PACKAGE' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.is_suite( 'UT3$USER#','bad_test_package' ) ).to_be_false(); end; procedure has_suites_true is begin - ut.expect( ut3.ut_runner.has_suites( a_owner => 'UT3$USER#' ) ).to_be_true(); - ut.expect( ut3.ut_runner.has_suites( 'ut3$user#' ) ).to_be_true(); + ut.expect( ut3_develop.ut_runner.has_suites( a_owner => 'UT3$USER#' ) ).to_be_true(); + ut.expect( ut3_develop.ut_runner.has_suites( 'ut3$user#' ) ).to_be_true(); end; procedure has_suites_false is begin - ut.expect( ut3.ut_runner.has_suites( 'UT3_LATEST_RELEASE' ) ).to_be_false(); - ut.expect( ut3.ut_runner.has_suites( 'BAD' ) ).to_be_false(); - ut.expect( ut3.ut_runner.has_suites( null ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.has_suites( 'UT3' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.has_suites( 'BAD' ) ).to_be_false(); + ut.expect( ut3_develop.ut_runner.has_suites( null ) ).to_be_false(); end; end; diff --git a/test/ut3_user/expectations.pkb b/test/ut3_user/expectations.pkb index 3f2ae543d..30af48a44 100644 --- a/test/ut3_user/expectations.pkb +++ b/test/ut3_user/expectations.pkb @@ -8,22 +8,22 @@ create or replace package body expectations as --Arrange --Act execute immediate 'begin some_pkg.some_procedure; end;'; - ut3.ut.expect(1).to_equal(0); - ut3.ut.expect(0).to_equal(0); + ut3_develop.ut.expect(1).to_equal(0); + ut3_develop.ut.expect(0).to_equal(0); --Assert l_actual := ut3_tester_helper.main_helper.get_dbms_output_as_clob(); l_expected := q'[FAILURE Actual: 1 (number) was expected to equal: 0 (number) - at "UT3$USER#.SOME_PKG%", line 4 ut3.ut.expect(1).to_equal(0); + at "UT3$USER#.SOME_PKG%", line 4 ut3_develop.ut.expect(1).to_equal(0); at "anonymous block", line 1 at "UT3$USER#.EXPECTATIONS%", line 10 SUCCESS Actual: 0 (number) was expected to equal: 0 (number) FAILURE Actual: 1 (number) was expected to equal: 0 (number) - at "UT3$USER#.EXPECTATIONS%", line 11 ut3.ut.expect(1).to_equal(0); + at "UT3$USER#.EXPECTATIONS%", line 11 ut3_develop.ut.expect(1).to_equal(0); SUCCESS Actual: 0 (number) was expected to equal: 0 (number) ]'; @@ -44,8 +44,8 @@ SUCCESS create or replace package body some_pkg is procedure some_procedure is begin - ut3.ut.expect(1).to_equal(0); - ut3.ut.expect(0).to_equal(0); + ut3_develop.ut.expect(1).to_equal(0); + ut3_develop.ut.expect(0).to_equal(0); end; end;]'; end; diff --git a/test/ut3_user/expectations/binary/test_be_greater_or_equal.pkb b/test/ut3_user/expectations/binary/test_be_greater_or_equal.pkb index 5d99d07b6..3f92c84c7 100644 --- a/test/ut3_user/expectations/binary/test_be_greater_or_equal.pkb +++ b/test/ut3_user/expectations/binary/test_be_greater_or_equal.pkb @@ -254,7 +254,7 @@ create or replace package body test_be_greater_or_equal is procedure actual_clob is begin --Act - ut3.ut.expect(to_clob('3')).to_( ut3.be_greater_or_equal(3) ); + ut3_develop.ut.expect(to_clob('3')).to_( ut3_develop.be_greater_or_equal(3) ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/expectations/binary/test_be_greater_than.pkb b/test/ut3_user/expectations/binary/test_be_greater_than.pkb index 37e15f633..6724b5c41 100644 --- a/test/ut3_user/expectations/binary/test_be_greater_than.pkb +++ b/test/ut3_user/expectations/binary/test_be_greater_than.pkb @@ -254,7 +254,7 @@ create or replace package body test_be_greater_than is procedure actual_clob is begin --Act - ut3.ut.expect(to_clob('3')).to_( ut3.be_greater_than(2) ); + ut3_develop.ut.expect(to_clob('3')).to_( ut3_develop.be_greater_than(2) ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/expectations/binary/test_be_less_or_equal.pkb b/test/ut3_user/expectations/binary/test_be_less_or_equal.pkb index bf7632cc4..aefb58849 100644 --- a/test/ut3_user/expectations/binary/test_be_less_or_equal.pkb +++ b/test/ut3_user/expectations/binary/test_be_less_or_equal.pkb @@ -254,7 +254,7 @@ create or replace package body test_be_less_or_equal is procedure actual_clob is begin --Act - ut3.ut.expect(to_clob('3')).to_( ut3.be_less_or_equal(3) ); + ut3_develop.ut.expect(to_clob('3')).to_( ut3_develop.be_less_or_equal(3) ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/expectations/binary/test_equal.pkb b/test/ut3_user/expectations/binary/test_equal.pkb index 95fd594c7..735915348 100644 --- a/test/ut3_user/expectations/binary/test_equal.pkb +++ b/test/ut3_user/expectations/binary/test_equal.pkb @@ -26,7 +26,7 @@ create or replace package body test_equal is l_actual '||a_actual_type||' := '||a_actual||'; l_expected '||a_expected_type||' := '||a_expected||'; begin - ut3.ut.expect( l_actual ).'||a_matcher_name||'(l_expected, a_nulls_are_equal=>'||l_nulls_equal||'); + ut3_develop.ut.expect( l_actual ).'||a_matcher_name||'(l_expected, a_nulls_are_equal=>'||l_nulls_equal||'); end;'; end; diff --git a/test/ut3_user/expectations/binary/test_expect_to_be_less_than.pkb b/test/ut3_user/expectations/binary/test_expect_to_be_less_than.pkb index d7bf5533b..dbf6e30a4 100644 --- a/test/ut3_user/expectations/binary/test_expect_to_be_less_than.pkb +++ b/test/ut3_user/expectations/binary/test_expect_to_be_less_than.pkb @@ -254,7 +254,7 @@ create or replace package body test_expect_to_be_less_than is procedure actual_clob is begin --Act - ut3.ut.expect(to_clob('3')).to_( ut3.be_less_than(4) ); + ut3_develop.ut.expect(to_clob('3')).to_( ut3_develop.be_less_than(4) ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/expectations/test_expectation_anydata.pkb b/test/ut3_user/expectations/test_expectation_anydata.pkb index ece5457a7..be666b284 100644 --- a/test/ut3_user/expectations/test_expectation_anydata.pkb +++ b/test/ut3_user/expectations/test_expectation_anydata.pkb @@ -23,7 +23,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( cast(null as ut3_tester_helper.test_dummy_object) ); g_test_actual := anydata.convertObject( cast(null as ut3_tester_helper.other_dummy_object) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual (ut3_tester_helper.other_dummy_object) cannot be compared to Expected (ut3_tester_helper.test_dummy_object) using matcher 'equal'.]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -39,7 +39,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.other_dummy_object(1, 'A', '0') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual (ut3_tester_helper.other_dummy_object) cannot be compared to Expected (ut3_tester_helper.test_dummy_object) using matcher 'equal'.]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -53,7 +53,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, null, '0') ); --Act - ut3.ut.expect( g_test_actual ).not_to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).not_to_equal( g_test_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -66,7 +66,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); g_test_actual := anydata.convertObject( cast(null as ut3_tester_helper.test_dummy_object) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object was expected to equal: ut3_tester_helper.test_dummy_object %Diff: @@ -86,7 +86,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(ut3_tester_helper.test_dummy_object(1, 'A', '0')) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual (ut3_tester_helper.test_dummy_object_list) cannot be compared to Expected (ut3_tester_helper.test_dummy_object) using matcher 'equal'.]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -103,7 +103,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list() ); g_test_actual := anydata.convertCollection( l_null_list ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ null ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 0 ]]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -121,7 +121,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(ut3_tester_helper.test_dummy_object(1, 'A', '0')) ); g_test_actual := anydata.convertCollection( l_null_list ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ null ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 1 ] %Diff: @@ -140,7 +140,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(ut3_tester_helper.test_dummy_object(1, 'A', '0')) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list() ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ count = 0 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 1 ] %Diff: @@ -161,7 +161,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(l_obj) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(l_obj, l_obj) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ count = 2 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 1 ] %Diff: @@ -178,7 +178,7 @@ create or replace package body test_expectation_anydata is l_null_anydata anydata; begin --Act - ut3.ut.expect( l_null_anydata ).to_equal( l_null_anydata ); + ut3_develop.ut.expect( l_null_anydata ).to_equal( l_null_anydata ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -189,7 +189,7 @@ create or replace package body test_expectation_anydata is l_anydata anydata := anydata.convertObject(l_null_object); begin --Act - ut3.ut.expect( l_anydata ).to_equal( l_anydata ); + ut3_develop.ut.expect( l_anydata ).to_equal( l_anydata ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -200,7 +200,7 @@ create or replace package body test_expectation_anydata is l_anydata anydata := anydata.convertCollection(l_null_collection); begin --Act - ut3.ut.expect( l_anydata ).to_equal( l_anydata ); + ut3_develop.ut.expect( l_anydata ).to_equal( l_anydata ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -211,7 +211,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(ut3_tester_helper.test_dummy_object(1, 'A', '0')) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(ut3_tester_helper.test_dummy_object(1, 'A', '0')) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -226,7 +226,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(l_first_obj, l_second_obj) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list(l_second_obj, l_first_obj) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -237,20 +237,20 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; procedure exclude_attributes_as_list is - l_list ut3.ut_varchar2_list; + l_list ut3_develop.ut_varchar2_list; begin --Arrange - l_list := ut3.ut_varchar2_list('Value','/ID'); + l_list := ut3_develop.ut_varchar2_list('Value','/ID'); g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>3, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_list ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_list ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -263,7 +263,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>2, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_list ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_list ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -276,7 +276,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>2, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_xpath ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_xpath ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -289,20 +289,20 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_exclude ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected, a_exclude=> l_exclude ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; procedure include_attributes_as_list is - l_list ut3.ut_varchar2_list; + l_list ut3_develop.ut_varchar2_list; begin --Arrange - l_list := ut3.ut_varchar2_list('Value','ID'); + l_list := ut3_develop.ut_varchar2_list('Value','ID'); g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'b',"Value"=>'0') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_list ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_list ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -315,7 +315,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_xpath ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_xpath ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -328,7 +328,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_xpath ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_xpath ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -341,7 +341,7 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'B',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_include ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).include( l_include ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -356,24 +356,24 @@ create or replace package body test_expectation_anydata is g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'B',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).exclude( l_exclude ).include( l_include ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).exclude( l_exclude ).include( l_include ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; procedure include_exclude_attrib_list is - l_exclude ut3.ut_varchar2_list; - l_include ut3.ut_varchar2_list; + l_exclude ut3_develop.ut_varchar2_list; + l_include ut3_develop.ut_varchar2_list; l_expected varchar2(32767); l_actual varchar2(32767); begin --Arrange - l_include := ut3.ut_varchar2_list('key','ID','Value'); - l_exclude := ut3.ut_varchar2_list('key','Value'); + l_include := ut3_develop.ut_varchar2_list('key','ID','Value'); + l_exclude := ut3_develop.ut_varchar2_list('key','Value'); g_test_expected := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'B',"Value"=>'0') ); g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(id=>1, "name"=>'A',"Value"=>'1') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).exclude( l_exclude ).include( l_include ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).exclude( l_exclude ).include( l_include ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -391,7 +391,7 @@ Rows: [ 1 differences ] Row No. 1 - Actual: Row No. 1 - Expected: A]'; --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_actual := ut3_tester_helper.main_helper.get_failed_expectations(1); ut.expect(l_actual).to_be_like(l_expected); @@ -411,7 +411,7 @@ Diff: Rows: [ 1 differences ] Row No. 2 - Extra: 1A0]'; --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); --Assert l_actual := ut3_tester_helper.main_helper.get_failed_expectations(1); ut.expect(l_actual).to_be_like(l_expected); @@ -425,7 +425,7 @@ Rows: [ 1 differences ] procedure deprec_to_equal_excl_varch is begin --Act - ut3.ut.expect(get_anydata()).to_equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col'); + ut3_develop.ut.expect(get_anydata()).to_equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col'); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -434,7 +434,7 @@ Rows: [ 1 differences ] procedure deprec_to_equal_excl_list is begin --Act - ut3.ut.expect(get_anydata()).to_equal(get_anydata(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col')); + ut3_develop.ut.expect(get_anydata()).to_equal(get_anydata(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -443,7 +443,7 @@ Rows: [ 1 differences ] procedure deprec_not_to_equal_excl_varch is begin --Act - ut3.ut.expect(get_anydata()).not_to_equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col'); + ut3_develop.ut.expect(get_anydata()).not_to_equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col'); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -452,7 +452,7 @@ Rows: [ 1 differences ] procedure deprec_not_to_equal_excl_list is begin --Act - ut3.ut.expect(get_anydata()).not_to_equal(get_anydata(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col')); + ut3_develop.ut.expect(get_anydata()).not_to_equal(get_anydata(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -461,7 +461,7 @@ Rows: [ 1 differences ] procedure deprec_equal_excl_varch is begin --Act - ut3.ut.expect(get_anydata()).to_(ut3.equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col')); + ut3_develop.ut.expect(get_anydata()).to_(ut3_develop.equal(get_anydata(), a_exclude => 'A_COLUMN,Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -470,7 +470,7 @@ Rows: [ 1 differences ] procedure deprec_equal_excl_list is begin --Act - ut3.ut.expect(get_anydata()).to_(ut3.equal(get_anydata(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col'))); + ut3_develop.ut.expect(get_anydata()).to_(ut3_develop.equal(get_anydata(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col'))); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -491,7 +491,7 @@ Rows: [ 1 differences ] from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); l_expected_message := q'[Actual: ut3_tester_helper.test_dummy_object_list [ count = 2 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 2 ] Diff: @@ -521,7 +521,7 @@ Rows: [ 2 differences ] bulk collect into l_expected from dual connect by level <=110; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)); l_expected_message := q'[Actual: ut3_tester_helper.test_dummy_object_list [ count = 100 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 110 ] Diff: @@ -543,9 +543,9 @@ Rows: [ 60 differences, showing first 20 ] procedure collection_include_list is l_actual ut3_tester_helper.test_dummy_object_list; l_expected ut3_tester_helper.test_dummy_object_list; - l_list ut3.ut_varchar2_list; + l_list ut3_develop.ut_varchar2_list; begin - l_list := ut3.ut_varchar2_list('Value','ID'); + l_list := ut3_develop.ut_varchar2_list('Value','ID'); --Arrange select ut3_tester_helper.test_dummy_object( rownum, 'SomethingsDifferent '||rownum, rownum) bulk collect into l_actual @@ -554,7 +554,7 @@ Rows: [ 60 differences, showing first 20 ] bulk collect into l_expected from dual connect by level <=2; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).include( l_list ); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).include( l_list ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -562,9 +562,9 @@ Rows: [ 60 differences, showing first 20 ] procedure collection_exclude_list is l_actual ut3_tester_helper.test_dummy_object_list; l_expected ut3_tester_helper.test_dummy_object_list; - l_list ut3.ut_varchar2_list; + l_list ut3_develop.ut_varchar2_list; begin - l_list := ut3.ut_varchar2_list('Value','ID'); + l_list := ut3_develop.ut_varchar2_list('Value','ID'); --Arrange select ut3_tester_helper.test_dummy_object( rownum*2, 'Something '||rownum, rownum*2) bulk collect into l_actual @@ -573,7 +573,7 @@ Rows: [ 60 differences, showing first 20 ] bulk collect into l_expected from dual connect by level <=2; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).exclude( l_list ); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).exclude( l_list ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -581,11 +581,11 @@ Rows: [ 60 differences, showing first 20 ] procedure collection_include_list_fail is l_actual ut3_tester_helper.test_dummy_object_list; l_expected ut3_tester_helper.test_dummy_object_list; - l_list ut3.ut_varchar2_list; + l_list ut3_develop.ut_varchar2_list; l_actual_message varchar2(32767); l_expected_message varchar2(32767); begin - l_list := ut3.ut_varchar2_list('name'); + l_list := ut3_develop.ut_varchar2_list('name'); --Arrange select ut3_tester_helper.test_dummy_object( rownum, 'SomethingsDifferent '||rownum, rownum) bulk collect into l_actual @@ -594,7 +594,7 @@ Rows: [ 60 differences, showing first 20 ] bulk collect into l_expected from dual connect by level <=2; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).include( l_list ); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).include( l_list ); l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ count = 2 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 2 ] %Diff: @@ -614,7 +614,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('A') ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('A') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -626,7 +626,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('A') ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('B') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_tab_varchar [ count = 1 ] was expected to equal: ut3_tester_helper.t_tab_varchar [ count = 1 ] %Diff: %Rows: [ 1 differences ] @@ -640,7 +640,7 @@ Rows: [ 60 differences, showing first 20 ] procedure array_is_null is l_is_null ut3_tester_helper.t_tab_varchar ; begin - ut3.ut.expect( anydata.convertCollection( l_is_null ) ).to_be_null; + ut3_develop.ut.expect( anydata.convertCollection( l_is_null ) ).to_be_null; ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -648,7 +648,7 @@ Rows: [ 60 differences, showing first 20 ] l_is_null ut3_tester_helper.t_tab_varchar ; l_is_null_bis ut3_tester_helper.t_tab_varchar ; begin - ut3.ut.expect( anydata.convertCollection( l_is_null ) ).to_equal(anydata.convertCollection( l_is_null_bis )); + ut3_develop.ut.expect( anydata.convertCollection( l_is_null ) ).to_equal(anydata.convertCollection( l_is_null_bis )); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -661,7 +661,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( l_is_null ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('A') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_tab_varchar [ count = 1 ] was expected to equal: ut3_tester_helper.t_tab_varchar [ null ] %Diff: %Rows: [ 1 differences ] @@ -673,7 +673,7 @@ Rows: [ 60 differences, showing first 20 ] procedure empty_array_have_zero_elem is begin - ut3.ut.expect( anydata.convertCollection(ut3_tester_helper.t_tab_varchar())).to_have_count(0); + ut3_develop.ut.expect( anydata.convertCollection(ut3_tester_helper.t_tab_varchar())).to_have_count(0); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -683,7 +683,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection(ut3_tester_helper.t_tab_varchar()); g_test_actual := anydata.convertCollection(ut3_tester_helper.t_tab_varchar()); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -696,7 +696,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_tab_varchar() ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_tab_varchar('A') ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_tab_varchar [ count = 1 ] was expected to equal: ut3_tester_helper.t_tab_varchar [ count = 0 ] %Diff: %Rows: [ 1 differences ] @@ -712,7 +712,7 @@ Rows: [ 60 differences, showing first 20 ] --Arrange g_test_actual := anydata.convertCollection( l_null_list ); --Act - ut3.ut.expect( g_test_actual ).to_be_null; + ut3_develop.ut.expect( g_test_actual ).to_be_null; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -722,7 +722,7 @@ Rows: [ 60 differences, showing first 20 ] --Arrange g_test_actual := anydata.convertCollection( ut3_tester_helper.test_dummy_object_list() ); --Act - ut3.ut.expect( g_test_actual ).to_have_count(0); + ut3_develop.ut.expect( g_test_actual ).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -734,7 +734,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_varray(1) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_varray(1) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -746,7 +746,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_varray(1) ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_varray(2) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_varray [ count = 1 ] was expected to equal: ut3_tester_helper.t_varray [ count = 1 ] %Diff: %Rows: [ 1 differences ] @@ -760,7 +760,7 @@ Rows: [ 60 differences, showing first 20 ] procedure varray_is_null is l_is_null ut3_tester_helper.t_varray ; begin - ut3.ut.expect( anydata.convertCollection( l_is_null ) ).to_be_null; + ut3_develop.ut.expect( anydata.convertCollection( l_is_null ) ).to_be_null; ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -768,7 +768,7 @@ Rows: [ 60 differences, showing first 20 ] l_is_null ut3_tester_helper.t_varray ; l_is_null_bis ut3_tester_helper.t_varray ; begin - ut3.ut.expect( anydata.convertCollection( l_is_null ) ).to_equal(anydata.convertCollection( l_is_null_bis )); + ut3_develop.ut.expect( anydata.convertCollection( l_is_null ) ).to_equal(anydata.convertCollection( l_is_null_bis )); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -781,7 +781,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( l_is_null ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_varray(1) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_varray [ count = 1 ] was expected to equal: ut3_tester_helper.t_varray [ null ] %Diff: %Rows: [ 1 differences ] @@ -793,7 +793,7 @@ Rows: [ 60 differences, showing first 20 ] procedure empty_varray_have_zero_elem is begin - ut3.ut.expect( anydata.convertCollection(ut3_tester_helper.t_varray())).to_have_count(0); + ut3_develop.ut.expect( anydata.convertCollection(ut3_tester_helper.t_varray())).to_have_count(0); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -803,7 +803,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection(ut3_tester_helper.t_varray()); g_test_actual := anydata.convertCollection(ut3_tester_helper.t_varray()); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -816,7 +816,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_expected := anydata.convertCollection( ut3_tester_helper.t_varray() ); g_test_actual := anydata.convertCollection( ut3_tester_helper.t_varray(1) ); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ); l_expected_message := q'[%Actual: ut3_tester_helper.t_varray [ count = 1 ] was expected to equal: ut3_tester_helper.t_varray [ count = 0 ] %Diff: %Rows: [ 1 differences ] @@ -841,7 +841,7 @@ Rows: [ 60 differences, showing first 20 ] from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).join_by('ID'); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).join_by('ID'); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -860,7 +860,7 @@ Rows: [ 60 differences, showing first 20 ] from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).join_by('ID'); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).join_by('ID'); l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ count = 2 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 2 ] %Diff: %Rows: [ 3 differences ] @@ -886,7 +886,7 @@ Rows: [ 60 differences, showing first 20 ] from dual connect by level <=3 order by rownum desc; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).unordered; + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).unordered; ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -913,7 +913,7 @@ Rows: [ 60 differences, showing first 20 ] %Missing: 4Something 22 %Missing: 2Something 11]'; - ut3.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).unordered; + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected)).unordered; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); --Assert ut.expect(l_actual_message).to_be_like(l_expected_message); @@ -926,7 +926,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); --Act - ut3.ut.expect(g_test_actual).to_equal(g_test_expected).join_by('ID'); + ut3_develop.ut.expect(g_test_actual).to_equal(g_test_expected).join_by('ID'); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -936,7 +936,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); --Act - ut3.ut.expect(g_test_actual).to_equal(g_test_expected).unordered; + ut3_develop.ut.expect(g_test_actual).to_equal(g_test_expected).unordered; ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -953,7 +953,7 @@ Rows: [ 60 differences, showing first 20 ] from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(anydata.convertCollection(l_actual)).to_contain(anydata.convertCollection(l_expected)); + ut3_develop.ut.expect(anydata.convertCollection(l_actual)).to_contain(anydata.convertCollection(l_expected)); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -964,7 +964,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_actual := anydata.convertObject( ut3_tester_helper.test_dummy_object(1, 'A', '0') ); --Act - ut3.ut.expect(g_test_actual).to_contain(g_test_expected); + ut3_develop.ut.expect(g_test_actual).to_contain(g_test_expected); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -975,7 +975,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_actual := anydata.convertCollection(ut3_tester_helper.t_tab_varchar(null)); --Act - ut3.ut.expect( g_test_actual ).to_equal( g_test_expected ).unordered(); + ut3_develop.ut.expect( g_test_actual ).to_equal( g_test_expected ).unordered(); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -987,7 +987,7 @@ Rows: [ 60 differences, showing first 20 ] g_test_actual := anydata.convertCollection(ut3_tester_helper.t_tab_varchar(' ')); --Act - ut3.ut.expect( g_test_actual ).not_to_equal( g_test_expected ).unordered(); + ut3_develop.ut.expect( g_test_actual ).not_to_equal( g_test_expected ).unordered(); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; diff --git a/test/ut3_user/expectations/test_expectations_cursor.pkb b/test/ut3_user/expectations/test_expectations_cursor.pkb index 5a0b68f2f..f06132009 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pkb +++ b/test/ut3_user/expectations/test_expectations_cursor.pkb @@ -48,7 +48,7 @@ create or replace package body test_expectations_cursor is select 'Other test entry' as value from dual; open l_actual for 'select * from gtt_test_table'; --Act - execute the expectation on cursor opened on GTT - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); --Cleanup @@ -62,7 +62,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin -- Arrange - ut3.ut.set_nls; + ut3_develop.ut.set_nls; open l_expected for select 1 as my_num, 'This is my test string' as my_string, @@ -76,10 +76,10 @@ create or replace package body test_expectations_cursor is to_date('1984-09-05', 'YYYY-MM-DD') as my_date from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); - ut3.ut.reset_nls; + ut3_develop.ut.reset_nls; end; procedure success_on_same_data_float @@ -88,7 +88,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin -- Arrange - ut3.ut.set_nls; + ut3_develop.ut.set_nls; open l_expected for select cast(3.14 as binary_double) as pi_double, cast(3.14 as binary_float) as pi_float @@ -98,10 +98,10 @@ create or replace package body test_expectations_cursor is cast(3.14 as binary_float) as pi_float from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); - ut3.ut.reset_nls; + ut3_develop.ut.reset_nls; end; procedure success_on_empty @@ -113,7 +113,7 @@ create or replace package body test_expectations_cursor is open l_expected for select * from dual where 1=0; open l_actual for select * from dual where 1=0; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -124,7 +124,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -134,7 +134,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin --Act - ut3.ut.expect( l_actual ).to_be_null(); + ut3_develop.ut.expect( l_actual ).to_be_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -144,7 +144,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin --Act - ut3.ut.expect( l_actual ).not_to_be_not_null(); + ut3_develop.ut.expect( l_actual ).not_to_be_not_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -156,7 +156,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual; --Act - ut3.ut.expect( l_actual ).to_be_not_null(); + ut3_develop.ut.expect( l_actual ).to_be_not_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -168,7 +168,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual; --Act - ut3.ut.expect( l_actual ).to_be_not_null(); + ut3_develop.ut.expect( l_actual ).to_be_not_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -180,7 +180,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual where 0=1; --Act - ut3.ut.expect( l_actual ).to_be_empty(); + ut3_develop.ut.expect( l_actual ).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -192,7 +192,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual; --Act - ut3.ut.expect( l_actual ).not_to_be_empty(); + ut3_develop.ut.expect( l_actual ).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -204,7 +204,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual; --Act - ut3.ut.expect( l_actual ).to_be_null(); + ut3_develop.ut.expect( l_actual ).to_be_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -214,7 +214,7 @@ create or replace package body test_expectations_cursor is l_actual sys_refcursor; begin --Act - ut3.ut.expect( l_actual ).not_to_be_null(); + ut3_develop.ut.expect( l_actual ).not_to_be_null(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -226,7 +226,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual; --Act - ut3.ut.expect( l_actual ).to_be_empty(); + ut3_develop.ut.expect( l_actual ).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -238,7 +238,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_actual for select * from dual where 0=1; --Act - ut3.ut.expect( l_actual ).not_to_be_empty(); + ut3_develop.ut.expect( l_actual ).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -251,7 +251,7 @@ create or replace package body test_expectations_cursor is --Arrange open l_expected for select * from dual where 1=0; --Act - ut3.ut.expect( l_actual ).not_to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).not_to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -265,7 +265,7 @@ create or replace package body test_expectations_cursor is open l_expected for select to_clob('This is an even longer test clob') as my_clob from dual; open l_actual for select to_clob('Another totally different story') as my_clob from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -279,7 +279,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as my_num from dual; open l_actual for select 1 as my_num from dual union all select 1 as my_num from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -293,7 +293,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as my_num from dual union all select 1 as my_num from dual; open l_actual for select 1 as my_num from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -307,7 +307,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1 from dual; open l_actual for select 1 as col_2 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -322,7 +322,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1, 2 as col_2 from dual; open l_actual for select 2 as col_2, 1 as col_1 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -336,7 +336,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1, 2 as col_2 from dual; open l_actual for select 2 as col_2, 1 as col_1 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ).unordered_columns; + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).unordered_columns; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -350,7 +350,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1, 2 as col_2 from dual; open l_actual for select 2 as col_2, 1 as col_1 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ).uc; + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).uc; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -366,7 +366,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1, 2 as col_2,3 as col_3, 4 as col_4,5 col_5 from dual; open l_actual for select 2 as col_2, 1 as col_1,40 as col_4, 5 as col_5, 30 col_3 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ).unordered_columns; + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).unordered_columns; --Assert l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] %Diff: @@ -389,7 +389,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as col_1, 2 as col_2,3 as col_3, 4 as col_4,5 col_5 from dual; open l_actual for select 2 as col_2, 1 as col_1,40 as col_4, 5 as col_5, 30 col_3 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ).uc; + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).uc; --Assert l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] %Diff: @@ -410,7 +410,7 @@ create or replace package body test_expectations_cursor is open l_expected for select 1 as my_num from dual union all select 2 as my_num from dual; open l_actual for select 2 as my_num from dual union all select 1 as my_num from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -419,18 +419,17 @@ create or replace package body test_expectations_cursor is as l_expected sys_refcursor; l_actual sys_refcursor; - l_date date := sysdate; - l_second number := 1/24/60/60; + c_second constant number := 1/24/60/60; begin --Arrange - ut3.ut.set_nls; - open l_actual for select l_date as some_date from dual; - open l_expected for select l_date-l_second some_date from dual; + ut3_develop.ut.set_nls; + open l_actual for select gc_date as some_date from dual; + open l_expected for select gc_date - c_second some_date from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); - ut3.ut.reset_nls; + ut3_develop.ut.reset_nls; end; procedure uses_default_nls_for_date @@ -439,10 +438,10 @@ create or replace package body test_expectations_cursor is l_expected sys_refcursor; begin --Arrange - open l_actual for select sysdate as some_date from dual; - open l_expected for select to_date(to_char(sysdate)) as some_date from dual; + open l_actual for select gc_date as some_date from dual; + open l_expected for select to_date(to_char(gc_date)) as some_date from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -456,7 +455,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3.ut_varchar2_list('A_COLUMN','Some_Col')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -470,7 +469,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'A_COLUMN,Some_Col'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'A_COLUMN,Some_Col'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -483,7 +482,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3.ut_varchar2_list('A_COLUMN','/ROW/Some_Col')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3_develop.ut_varchar2_list('A_COLUMN','/ROW/Some_Col')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -496,7 +495,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'A_COLUMN,/ROW/Some_Col'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'A_COLUMN,/ROW/Some_Col'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -512,7 +511,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'/ROW/A_COLUMN,\\//Some_Col'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'/ROW/A_COLUMN,\\//Some_Col'); --Assert l_expected_message := q'[Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ] %Diff: @@ -537,7 +536,7 @@ create or replace package body test_expectations_cursor is open l_actual for select 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual; open l_expected for select 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'/ROW/A_COLUMN|/ROW/Some_Col'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>'/ROW/A_COLUMN|/ROW/Some_Col'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -551,7 +550,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'c' as A_COLUMN from dual a connect by level < 4; open l_expected for select rownum as rn, 'd' as A_COLUMN from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3.ut_varchar2_list('A_COLUMN','non_existing_column')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected, a_exclude=>ut3_develop.ut_varchar2_list('A_COLUMN','non_existing_column')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -565,7 +564,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -579,7 +578,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include('RN,//A_Column, SOME_COL'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include('RN,//A_Column, SOME_COL'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -593,7 +592,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include('/ROW/RN|//A_Column|//SOME_COL'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include('/ROW/RN|//A_Column|//SOME_COL'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -607,7 +606,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'c' as A_COLUMN from dual a connect by level < 4; open l_expected for select rownum as rn, 'd' as A_COLUMN from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list(' RN ',' non_existing_column ')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list(' RN ',' non_existing_column ')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -621,7 +620,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).exclude('Some_Col').include('/ROW/RN|//Some_Col'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).exclude('Some_Col').include('/ROW/RN|//Some_Col'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -635,7 +634,7 @@ create or replace package body test_expectations_cursor is open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).exclude(ut3.ut_varchar2_list('A_COLUMN')).include(ut3.ut_varchar2_list('RN','A_Column','A_COLUMN')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).exclude(ut3_develop.ut_varchar2_list('A_COLUMN')).include(ut3_develop.ut_varchar2_list('RN','A_Column','A_COLUMN')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -651,7 +650,7 @@ create or replace package body test_expectations_cursor is open l_actual for select 1 rn from dual union all select 6 rn from dual; open l_expected for select rownum rn from dual connect by level <=3; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 3 ] Diff: @@ -674,7 +673,7 @@ Rows: [ 2 differences ] open l_actual for select cast('a' as char(1)) a_column, 1 as id from dual; open l_expected for select cast('a' as varchar2(10)) a_column from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] Diff: Columns: @@ -696,7 +695,7 @@ Rows: [ 1 differences ] open l_actual for select to_char(rownum) rn, rownum another_rn from dual connect by level <=2; open l_expected for select rownum rn, rownum another_rn from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] Diff: @@ -719,7 +718,7 @@ Rows: [ all different ] open l_actual for select rownum rn, rownum bad_column_name from dual connect by level <=2; open l_expected for select rownum rn, rownum expected_column_name from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] Diff: @@ -741,7 +740,7 @@ Columns:% open l_actual for select rownum+1 col_1, rownum+2 col_2, rownum+3 col_3, rownum+4 col_4 from dual connect by level <=2; open l_expected for select rownum+1 col_1, rownum+4 col_4, rownum+2 col_2, rownum+3 col_3 from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] Diff: @@ -766,7 +765,7 @@ Rows: [ all different ] open l_actual for select rownum+1 col_1, rownum+2 col_2, rownum+3 col_3, rownum+4 col_4 from dual connect by level <=2; open l_expected for select rownum+1 col_1, rownum+4 col_4, rownum+2 col_2, rownum+3 col_3 from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered_columns; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered_columns; ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -782,7 +781,7 @@ Rows: [ all different ] open l_actual for select rownum good_col, -rownum bad_col from dual connect by level <=2; open l_expected for select rownum good_col, rownum bad_col from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] Diff: @@ -810,7 +809,7 @@ Rows: [ 2 differences ] from dual connect by level <=100; open l_expected for select rownum bad_col, rownum good_col from dual connect by level <=110; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 100 ] was expected to equal: refcursor [ count = 110 ] Diff: @@ -850,7 +849,7 @@ Rows: [ 60 differences, showing first 20 ] select 'F' AS GENDER, 'JESSICA' as FIRST_NAME, 'JONES' AS LAST_NAME, 4 as ID, '2345' AS SALARY from dual union all select 'M' AS GENDER, 'LUKE' as FIRST_NAME, 'SKYWALKER' AS LAST_NAME, 2 as ID, '1000' AS SALARY from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 3 ] Diff: Columns: @@ -887,7 +886,7 @@ Rows: [ 4 differences ] select 'F' AS GENDER, 'JESSICA' as FIRST_NAME, 'JONES' AS LAST_NAME, 4 as ID, '2345' AS SALARY from dual union all select 'M' AS GENDER, 'LUKE' as FIRST_NAME, 'SKYWALKER' AS LAST_NAME, 2 as ID, '1000' AS SALARY from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered_columns; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered_columns; l_expected_message := q'[Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 3 ] Diff: Columns: @@ -957,7 +956,7 @@ Rows: [ 4 differences ] from dual; open l_actual for q'[select * from test_table_for_cursors]'; --Act - ut3.ut.expect(l_expected).to_equal(l_actual); + ut3_develop.ut.expect(l_expected).to_equal(l_actual); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -969,7 +968,7 @@ Rows: [ 4 differences ] --Arrange open l_actual for select 1 as value from dual; --Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(l_actual%isopen).to_be_false(); end; @@ -982,7 +981,7 @@ Rows: [ 4 differences ] open l_actual for select 1/0 as value from dual; --Act begin - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); exception when others then null; @@ -997,7 +996,7 @@ Rows: [ 4 differences ] begin --Act open l_actual for select 1/0 as error_column from dual connect by level < 10; - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); ut.fail('Expected exception on cursor fetch'); exception @@ -1015,7 +1014,7 @@ Rows: [ 4 differences ] open l_actual for select * from dual; close l_actual; --Act - ut3.ut.expect( l_actual ).not_to_be_null; + ut3_develop.ut.expect( l_actual ).not_to_be_null; exception when others then --Assert @@ -1031,7 +1030,7 @@ Rows: [ 4 differences ] open l_actual for select rownum object_name from dual connect by level <=1100; open l_expected for select rownum object_name from dual connect by level <=1100; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -1047,7 +1046,7 @@ Rows: [ 4 differences ] procedure deprec_to_equal_excl_varch is begin --Act - ut3.ut.expect(get_cursor()).to_equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col'); + ut3_develop.ut.expect(get_cursor()).to_equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col'); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1056,7 +1055,7 @@ Rows: [ 4 differences ] procedure deprec_to_equal_excl_list is begin --Act - ut3.ut.expect(get_cursor()).to_equal(get_cursor(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col')); + ut3_develop.ut.expect(get_cursor()).to_equal(get_cursor(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1065,7 +1064,7 @@ Rows: [ 4 differences ] procedure deprec_not_to_equal_excl_varch is begin --Act - ut3.ut.expect(get_cursor()).not_to_equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col'); + ut3_develop.ut.expect(get_cursor()).not_to_equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col'); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1074,7 +1073,7 @@ Rows: [ 4 differences ] procedure deprec_not_to_equal_excl_list is begin --Act - ut3.ut.expect(get_cursor()).not_to_equal(get_cursor(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col')); + ut3_develop.ut.expect(get_cursor()).not_to_equal(get_cursor(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1083,7 +1082,7 @@ Rows: [ 4 differences ] procedure deprec_equal_excl_varch is begin --Act - ut3.ut.expect(get_cursor()).to_(ut3.equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col')); + ut3_develop.ut.expect(get_cursor()).to_(ut3_develop.equal(get_cursor(), a_exclude => 'A_COLUMN,Some_Col')); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1092,7 +1091,7 @@ Rows: [ 4 differences ] procedure deprec_equal_excl_list is begin --Act - ut3.ut.expect(get_cursor()).to_(ut3.equal(get_cursor(), a_exclude => ut3.ut_varchar2_list('A_COLUMN','Some_Col'))); + ut3_develop.ut.expect(get_cursor()).to_(ut3_develop.equal(get_cursor(), a_exclude => ut3_develop.ut_varchar2_list('A_COLUMN','Some_Col'))); --Assert ut.expect(cardinality(ut3_tester_helper.main_helper.get_warnings())).to_equal(1); ut.expect(ut3_tester_helper.main_helper.get_warnings()(1)).to_be_like('The syntax: "%" is deprecated.%'); @@ -1108,7 +1107,7 @@ Rows: [ 4 differences ] open l_actual for select '1' , '2' from dual connect by level <=2; open l_expected for select rownum , rownum expected_column_name from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] %Diff: @@ -1134,7 +1133,7 @@ Rows: [ 4 differences ] open l_actual for select '1' , rownum from dual connect by level <=2; open l_expected for select '1' , rownum from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1147,7 +1146,7 @@ Rows: [ 4 differences ] open l_actual for select username , user_id from all_users order by username asc; open l_expected for select username , user_id from all_users order by username desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1160,7 +1159,7 @@ Rows: [ 4 differences ] open l_actual for select user_id, username from all_users order by username asc; open l_expected for select username , user_id from all_users order by username desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered().uc(); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered().uc(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1182,7 +1181,7 @@ Rows: [ 4 differences ] select 'test' username,-667 user_id from dual order by 1 desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered; l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]% %Diff:% %Rows: [ 2 differences ]% @@ -1202,7 +1201,7 @@ Rows: [ 4 differences ] open l_expected for select object_id, owner, object_name,object_type from all_objects where owner = user; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID').uc(); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID').uc(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1216,7 +1215,7 @@ Rows: [ 4 differences ] open l_expected for select object_id, owner, object_name,object_type from all_objects where owner = user; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1232,7 +1231,7 @@ Rows: [ 4 differences ] open l_expected for select 1 as col_1, 2 as col_2,3 as col_3, 4 as col_4,5 col_5 from dual; open l_actual for select 2 as col_2, 1 as col_1,40 as col_4, 5 as col_5, 30 col_3 from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ).join_by('COL_1').unordered_columns; + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).join_by('COL_1').unordered_columns; --Assert l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] %Diff: @@ -1253,7 +1252,7 @@ Rows: [ 4 differences ] open l_expected for select object_id, owner, object_name,object_type from all_objects where owner = user; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('OBJECT_ID,OBJECT_NAME')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('OBJECT_ID,OBJECT_NAME')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1269,7 +1268,7 @@ Rows: [ 4 differences ] open l_expected for select rownum as rn, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('OWNER'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('OWNER'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1292,7 +1291,7 @@ Diff:% open l_expected for select rownum as rn, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('OWNER,USER_ID')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('OWNER,USER_ID')); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1317,7 +1316,7 @@ Diff:% open l_expected for select rownum as rn, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('SOME_COL').exclude('SOME_COL'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('SOME_COL').exclude('SOME_COL'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1340,7 +1339,7 @@ Diff:% open l_expected for select rownum as rn, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('RN,SOME_COL')).exclude('RN'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('RN,SOME_COL')).exclude('RN'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1363,7 +1362,7 @@ Diff:% open l_expected for select rownum as rn, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('RNI'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('RNI'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1385,7 +1384,7 @@ Diff:% open l_expected for select rownum as rni, 'x' SOME_COL from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('RNI'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('RNI'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 3 ] was expected to equal: refcursor [ count = 3 ]% Diff:% @@ -1404,7 +1403,7 @@ Diff:% open l_actual for select level object_id, level || '_TEST' object_name from dual connect by level <=1100; open l_expected for select level object_id, level || '_TEST' object_name from dual connect by level <=1100; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('OBJECT_ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1417,7 +1416,7 @@ Diff:% open l_actual for select level object_id, level || '_TEST' object_name from dual connect by level <=1100; open l_expected for select level object_id, level || '_TEST' object_name from dual connect by level <=1100; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1436,7 +1435,7 @@ Diff:% select 'TEST' username, -610 user_id from dual order by 1 asc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('USERNAME'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('USERNAME'); --Assert l_expected_message := q'[%Actual: refcursor [ count = % ] was expected to equal: refcursor [ count = % ] %Diff:% @@ -1462,7 +1461,7 @@ Diff:% select 'TEST' username, -610 user_id from dual order by 1 asc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('USERNAME,USER_ID')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('USERNAME,USER_ID')); --Assert l_expected_message := q'[%Actual: refcursor [ count = % ] was expected to equal: refcursor [ count = % ] %Diff:% @@ -1488,7 +1487,7 @@ Diff:% select 'TEST' username, -610 user_id,'Y' is_valid from dual order by 1 asc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('USERNAME,IS_VALID')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('USERNAME,IS_VALID')); --Assert l_expected_message := q'[%Actual: refcursor [ count = % ] was expected to equal: refcursor [ count = % ] %Diff:% @@ -1509,7 +1508,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')).unordered; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1523,7 +1522,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1537,7 +1536,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).exclude(ut3.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).exclude(ut3_develop.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1551,7 +1550,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 4; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).exclude(ut3.ut_varchar2_list('A_COLUMN|//Some_Col')).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).exclude(ut3_develop.ut_varchar2_list('A_COLUMN|//Some_Col')).unordered; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1565,7 +1564,7 @@ Diff:% open l_actual for select rownum as rn, 'TEST' as A_COLUMN from dual a connect by level < 4; open l_expected for select rownum as rn, 1 as A_COLUMN from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).exclude(ut3.ut_varchar2_list('A_COLUMN')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).exclude(ut3_develop.ut_varchar2_list('A_COLUMN')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1579,7 +1578,7 @@ Diff:% open l_actual for select rownum as rn, 'TEST' as A_COLUMN from dual a connect by level < 4; open l_expected for select rownum as rn, 1 as A_COLUMN from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list('RN')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list('RN')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1593,7 +1592,7 @@ Diff:% open l_actual for select rownum as rn, 'TEST' as A_COLUMN from dual a connect by level < 4; open l_expected for select rownum as rn, 1 as A_COLUMN from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).include(ut3.ut_varchar2_list('RN')).exclude(ut3.ut_varchar2_list('A_COLUMN')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include(ut3_develop.ut_varchar2_list('RN')).exclude(ut3_develop.ut_varchar2_list('A_COLUMN')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1610,7 +1609,7 @@ Diff:% from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1627,7 +1626,7 @@ Diff:% from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1646,7 +1645,7 @@ Diff:% from dual connect by level <=3 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).unordered; + ut3_develop.ut.expect(l_actual).to_equal(l_expected).unordered; l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 3 ]% Diff:% Rows: [ 5 differences% @@ -1672,7 +1671,7 @@ Rows: [ 5 differences% from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -1689,7 +1688,7 @@ Rows: [ 5 differences% from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('RN,COLVAL/ID')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('RN,COLVAL/ID')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1708,7 +1707,7 @@ Rows: [ 5 differences% from dual connect by level <=2 order by rownum desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/IDS'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('COLVAL/IDS'); l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]% Diff:% @@ -1723,16 +1722,16 @@ Diff:% procedure compare_nest_tab_col_jb is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1744,7 +1743,7 @@ Diff:% from table(l_expected_tab) order by 1 desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('KEY'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('KEY'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -1753,16 +1752,16 @@ Diff:% procedure compare_nest_tab_col_jb_fail is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Somethings '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Somethings '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1774,7 +1773,7 @@ Diff:% from table(l_expected_tab) order by 1 desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('KEY'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('KEY'); l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]% %Diff:% %Rows: [ 2 differences ]% @@ -1790,16 +1789,16 @@ Diff:% procedure compare_nest_tab_cols_jb is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1811,7 +1810,7 @@ Diff:% from table(l_expected_tab) order by 1 desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('KEY,VALUE')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('KEY,VALUE')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -1820,16 +1819,16 @@ Diff:% procedure compare_nest_tab_cols_jb_fail is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Somethings '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Somethings '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1841,7 +1840,7 @@ Diff:% from table(l_expected_tab) order by 1 desc; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by(ut3.ut_varchar2_list('KEY,VALUE')); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by(ut3_develop.ut_varchar2_list('KEY,VALUE')); l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]% %Diff:% %Rows: [ 4 differences ]% @@ -1857,16 +1856,16 @@ Diff:% procedure compare_tabtype_as_cols_jb is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Somethings '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Somethings '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1878,7 +1877,7 @@ Diff:% from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ]% @@ -1897,16 +1896,16 @@ Diff:% procedure compare_tabtype_as_cols is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2 order by rownum asc; - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_expected_tab from dual connect by level <=2 order by rownum asc; @@ -1918,7 +1917,7 @@ Diff:% from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -1927,16 +1926,16 @@ Diff:% procedure compare_tabtype_as_cols_coll is l_actual sys_refcursor; l_expected sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Apples '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Apples '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; - select ut3.ut_key_value_pair(rownum,'Peaches '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Peaches '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -1948,7 +1947,7 @@ Diff:% from dual connect by level <=2; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/UT_KEY_VALUE_PAIRS'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/UT_KEY_VALUE_PAIRS'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] @@ -1970,10 +1969,10 @@ Diff:% l_actual_tab some_object; l_expected_tab some_object; begin - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_actual_tab from dual; - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_expected_tab from dual; --Arrange @@ -1982,7 +1981,7 @@ Diff:% open l_expected for select l_expected_tab as nested_table from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -1994,10 +1993,10 @@ Diff:% l_actual_tab some_object; l_expected_tab some_object; begin - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_actual_tab from dual; - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_expected_tab from dual; --Arrange @@ -2006,7 +2005,7 @@ Diff:% open l_expected for select l_expected_tab as nested_table from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/OBJECT_OWNER'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/OBJECT_OWNER'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -2018,10 +2017,10 @@ Diff:% l_actual_tab some_object; l_expected_tab some_object; begin - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_actual_tab from dual; - select some_object( user,'TEST', sysdate, some_items( some_item(1,'test'), some_item(2,'test') ) ) + select some_object( user,'TEST', gc_date, some_items( some_item(1,'test'), some_item(2,'test') ) ) into l_expected_tab from dual; --Arrange @@ -2030,7 +2029,7 @@ Diff:% open l_expected for select l_expected_tab as nested_table from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/ITEMS'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/ITEMS'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -2043,12 +2042,11 @@ Diff:% l_expected_tab some_object; l_expected_message varchar2(32767); l_actual_message varchar2(32767); - l_date date := sysdate; begin - select some_object( 'TEST','TEST', l_date, some_items( some_item(1,'BAD'), some_item(2,'test') ) ) + select some_object( 'TEST','TEST', gc_date, some_items( some_item(1,'BAD'), some_item(2,'test') ) ) into l_actual_tab from dual; - select some_object( 'TEST','TEST', l_date, some_items( some_item(1,'TEST'), some_item(2,'test') ) ) + select some_object( 'TEST','TEST', gc_date, some_items( some_item(1,'TEST'), some_item(2,'test') ) ) into l_expected_tab from dual; --Arrange @@ -2059,7 +2057,7 @@ Diff:% from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/OBJECT_OWNER'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/OBJECT_OWNER'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] @@ -2080,10 +2078,10 @@ Diff:% l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select some_object( 'TEST','TEST', sysdate, some_items( some_item(1,'BAD'), some_item(2,'test') ) ) + select some_object( 'TEST','TEST', gc_date, some_items( some_item(1,'BAD'), some_item(2,'test') ) ) into l_actual_tab from dual; - select some_object( 'TEST','TEST', sysdate, some_items( some_item(1,'TEST'), some_item(2,'test') ) ) + select some_object( 'TEST','TEST', gc_date, some_items( some_item(1,'TEST'), some_item(2,'test') ) ) into l_expected_tab from dual; --Arrange @@ -2092,7 +2090,7 @@ Diff:% open l_expected for select l_expected_tab as nested_table from dual; --Act - ut3.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/ITEMS/ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('NESTED_TABLE/ITEMS/ID'); --Assert l_expected_message := q'[%Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ]% @@ -2126,7 +2124,7 @@ Diff:% select 'Table' as name from dual; --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ).unordered(); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ).unordered(); --Assert l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 3 ] @@ -2150,7 +2148,7 @@ Diff:% and rownum < 20; --Act - ut3.ut.expect(l_actual).to_contain(l_expected); + ut3_develop.ut.expect(l_actual).to_contain(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2166,7 +2164,7 @@ Diff:% and rownum < 20; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).uc(); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).uc(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2183,7 +2181,7 @@ Diff:% select rownum owner, rownum||'name' object_name,'PACKAGE' object_type from dual connect by level < 10; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).unordered(); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).unordered(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2199,7 +2197,7 @@ Diff:% open l_expected for select rownum owner,rownum object_name, 'PACKAGE' object_type from dual connect by level < 10; --Act - ut3.ut.expect(l_actual).to_contain(l_expected); + ut3_develop.ut.expect(l_actual).to_contain(l_expected); --Assert l_expected_message := q'[%Actual: refcursor [ count = 4 ] was expected to contain: refcursor [ count = 9 ] %Diff: @@ -2223,7 +2221,7 @@ Diff:% open l_expected for select username ,user_id from all_users where rownum < 5; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).join_by('USERNAME'); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).join_by('USERNAME'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2245,7 +2243,7 @@ Diff:% order by 1 asc; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).join_by('USERNAME'); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).join_by('USERNAME'); --Assert l_expected_message := q'[%Actual: refcursor [ count = % ] was expected to contain: refcursor [ count = % ] %Diff: @@ -2267,7 +2265,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 6; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2281,7 +2279,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 10; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2295,7 +2293,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 10; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).exclude(ut3.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).exclude(ut3_develop.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2309,7 +2307,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 10; open l_expected for select rownum as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected).exclude(ut3.ut_varchar2_list('A_COLUMN|//Some_Col')); + ut3_develop.ut.expect(l_actual).to_contain(l_expected).exclude(ut3_develop.ut_varchar2_list('A_COLUMN|//Some_Col')); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2326,7 +2324,7 @@ Diff:% select 'TEST1' username, -601 user_id from dual; --Act - ut3.ut.expect(l_actual).not_to_contain(l_expected); + ut3_develop.ut.expect(l_actual).not_to_contain(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2345,7 +2343,7 @@ Diff:% select 'TEST' username, -600 user_id from dual; --Act - ut3.ut.expect(l_actual).not_to_contain(l_expected); + ut3_develop.ut.expect(l_actual).not_to_contain(l_expected); --Assert l_expected_message := q'[%Actual: (refcursor [ count = % ])% %Data-types:% @@ -2370,7 +2368,7 @@ Diff:% open l_expected for select username||to_char(rownum) username ,rownum user_id from all_users where rownum < 5; --Act - ut3.ut.expect(l_actual).not_to_contain(l_expected).join_by('USER_ID'); + ut3_develop.ut.expect(l_actual).not_to_contain(l_expected).join_by('USER_ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2383,7 +2381,7 @@ Diff:% open l_actual for select rownum as rn, 'b' as "A_Column", 'c' as A_COLUMN, 'x' SOME_COL, 'd' "Some_Col" from dual a connect by level < 10; open l_expected for select rownum * 20 rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).not_to_contain(l_expected).include(ut3.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); + ut3_develop.ut.expect(l_actual).not_to_contain(l_expected).include(ut3_develop.ut_varchar2_list('RN','//A_Column','SOME_COL')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2396,7 +2394,7 @@ Diff:% open l_actual for select rownum as rn, 'a' as "A_Column", 'c' as A_COLUMN, 'y' SOME_COL, 'd' "Some_Col" from dual a connect by level < 10; open l_expected for select rownum * 20 as rn, 'a' as "A_Column", 'd' as A_COLUMN, 'x' SOME_COL, 'c' "Some_Col" from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).not_to_contain(l_expected).exclude(ut3.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); + ut3_develop.ut.expect(l_actual).not_to_contain(l_expected).exclude(ut3_develop.ut_varchar2_list('//Some_Col','A_COLUMN')).join_by('RN'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2412,7 +2410,7 @@ Diff:% open l_expected for select rownum as rn from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected); + ut3_develop.ut.expect(l_actual).to_contain(l_expected); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2429,7 +2427,7 @@ Diff:% union all select rownum as rn from dual a connect by level < 4; --Act - ut3.ut.expect(l_actual).to_contain(l_expected); + ut3_develop.ut.expect(l_actual).to_contain(l_expected); --Assert l_expected_message := q'[%Actual: refcursor [ count = 9 ] was expected to contain: refcursor [ count = 6 ] %Diff: @@ -2445,11 +2443,11 @@ Diff:% procedure udt_messg_format_eq is l_actual sys_refcursor; l_expected sys_refcursor; - l_expected_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_expected_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_expected_message varchar2(32767); l_actual_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_expected_tab from dual connect by level <=2; @@ -2458,7 +2456,7 @@ Diff:% open l_expected for select value(x) as udt from table(l_expected_tab) x; --Act - ut3.ut.expect(l_actual).to_contain(l_expected); + ut3_develop.ut.expect(l_actual).to_contain(l_expected); --Assert l_expected_message := q'[%Actual: refcursor [ count = 2 ] was expected to contain: refcursor [ count = 2 ] %Diff: @@ -2476,11 +2474,11 @@ Diff:% procedure udt_messg_format_empt is l_actual sys_refcursor; - l_actual_tab ut3.ut_key_value_pairs := ut3.ut_key_value_pairs(); + l_actual_tab ut3_develop.ut_key_value_pairs := ut3_develop.ut_key_value_pairs(); l_actual_message varchar2(32767); l_expected_message varchar2(32767); begin - select ut3.ut_key_value_pair(rownum,'Something '||rownum) + select ut3_develop.ut_key_value_pair(rownum,'Something '||rownum) bulk collect into l_actual_tab from dual connect by level <=2; @@ -2488,7 +2486,7 @@ Diff:% open l_actual for select value(x) as udt from table(l_actual_tab) x; --Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert l_expected_message := q'[%Actual: (refcursor [ count = 2 ]) %Data-types: @@ -2509,7 +2507,7 @@ Diff:% begin l_exp_message :='ORA-20218: SQL exception thrown when fetching data from cursor: ORA-01476: divisor is equal to zero -at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3.ut.expect(l_actual).to_equal(l_expected);% +at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3_develop.ut.expect(l_actual).to_equal(l_expected);% Check the query and data for errors.'; open l_actual for @@ -2517,7 +2515,7 @@ Check the query and data for errors.'; open l_expected for select 1/0 as test from dual; - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); --Line that error relates to in expected messag ut.fail('Expected exception on cursor fetch'); @@ -2534,7 +2532,7 @@ Check the query and data for errors.'; l_exp_message :='ORA-20218: SQL exception thrown when fetching data from cursor: ORA-01476: divisor is equal to zero -at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3.ut.expect(l_actual).to_equal(l_expected);% +at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3_develop.ut.expect(l_actual).to_equal(l_expected);% Check the query and data for errors.'; open l_expected for @@ -2542,7 +2540,7 @@ Check the query and data for errors.'; open l_actual for select 1 as test from dual; - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); ut.fail('Expected exception on cursor fetch'); exception @@ -2554,7 +2552,7 @@ Check the query and data for errors.'; l_actual sys_refcursor; l_expected sys_refcursor; begin - ut3.ut.set_nls; + ut3_develop.ut.set_nls; open l_expected for select cast(3.14 as binary_double) as pi_double, cast(3.14 as binary_float) as pi_float, @@ -2571,10 +2569,10 @@ Check the query and data for errors.'; numtoyminterval(1.1, 'year') row_ym_interval from dual; --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); - ut3.ut.reset_nls; + ut3_develop.ut.reset_nls; end; @@ -2599,7 +2597,7 @@ Check the query and data for errors.'; OPEN l_exp_cur FOR SELECT l_exp.key, l_exp.value FROM dual; - ut3.ut.expect(l_act_cur).to_equal(l_exp_cur); + ut3_develop.ut.expect(l_act_cur).to_equal(l_exp_cur); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2615,7 +2613,7 @@ Check the query and data for errors.'; OPEN l_exp_cur FOR SELECT 1 as "$Test", 2 as "&Test" FROM dual; - ut3.ut.expect(l_act_cur).to_equal(l_exp_cur); + ut3_develop.ut.expect(l_act_cur).to_equal(l_exp_cur); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2631,7 +2629,7 @@ Check the query and data for errors.'; OPEN l_exp_cur FOR SELECT 1 as "", 2 as "_Test", 3 as ".Test>" FROM dual; - ut3.ut.expect(l_act_cur).to_equal(l_exp_cur); + ut3_develop.ut.expect(l_act_cur).to_equal(l_exp_cur); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2647,7 +2645,7 @@ Check the query and data for errors.'; open l_actual for select column_value t1 from table(ut_varchar2_list(' ')); --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -2661,7 +2659,7 @@ Check the query and data for errors.'; open l_actual for select column_value t1 from table(ut_varchar2_list(chr(9))); --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -2675,7 +2673,7 @@ Check the query and data for errors.'; open l_actual for select 't' t1 from dual; --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -2689,7 +2687,7 @@ Check the query and data for errors.'; open l_actual for select ' t ' t1 from dual; --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -2703,7 +2701,7 @@ Check the query and data for errors.'; open l_actual for select chr(9)||'t' t1 from dual; --Assert - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -2730,7 +2728,7 @@ Check the query and data for errors.'; 7456123.9 as n6, 7456123.89 as n7 from dual; - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2762,7 +2760,7 @@ Check the query and data for errors.'; ,-1 as col5 from dual; - ut3.ut.expect(l_actual).to_equal(a_expected => l_expected); + ut3_develop.ut.expect(l_actual).to_equal(a_expected => l_expected); l_expected_message := q'[%Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ] %Diff: @@ -2785,7 +2783,7 @@ Check the query and data for errors.'; open v_actual for select 'ok' name, to_number(null) id from dual; - ut3.ut.expect(v_actual).to_equal(v_expected).exclude('ID'); + ut3_develop.ut.expect(v_actual).to_equal(v_expected).exclude('ID'); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2801,7 +2799,7 @@ Check the query and data for errors.'; open l_expected for select rownum as id, '1' some_column_with_a_pretty_long_enough_name from dual; - ut3.ut.expect(l_actual).to_equal(l_expected).include('ID,SOME_COLUMN_WITH_A_PRETTY_LONG_ENOUGH_NAME').join_by('ID'); + ut3_develop.ut.expect(l_actual).to_equal(l_expected).include('ID,SOME_COLUMN_WITH_A_PRETTY_LONG_ENOUGH_NAME').join_by('ID'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); $else @@ -2818,9 +2816,9 @@ Check the query and data for errors.'; return l_result; end; begin - ut3.ut.expect(get_cursor()).to_equal(get_cursor()); - ut3.ut.expect(get_cursor()).to_equal(get_cursor()).unordered(); - ut3.ut.expect(get_cursor()).to_equal(get_cursor()).join_by('ITEM_DATA,DATA_ID,ITEM_NO,DUP_NO'); + ut3_develop.ut.expect(get_cursor()).to_equal(get_cursor()); + ut3_develop.ut.expect(get_cursor()).to_equal(get_cursor()).unordered(); + ut3_develop.ut.expect(get_cursor()).to_equal(get_cursor()).join_by('ITEM_DATA,DATA_ID,ITEM_NO,DUP_NO'); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -2831,10 +2829,10 @@ Check the query and data for errors.'; begin open l_actual for select rownum rn from dual connect by level < 5; open l_expected for select rownum rn from dual connect by level = 1; - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); open l_actual for select rownum rn from dual connect by level < 3; open l_expected for select * from (select rownum rn from dual connect by level < 3) order by 1 desc; - ut3.ut.expect(l_actual).to_equal(l_expected); + ut3_develop.ut.expect(l_actual).to_equal(l_expected); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations(1)).to_equal( 'Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 1 ] Diff: diff --git a/test/ut3_user/expectations/test_expectations_json.pkb b/test/ut3_user/expectations/test_expectations_json.pkb index 6214d2237..9516ecb04 100644 --- a/test/ut3_user/expectations/test_expectations_json.pkb +++ b/test/ut3_user/expectations/test_expectations_json.pkb @@ -49,7 +49,7 @@ create or replace package body test_expectations_json is }'); --Act - ut3.ut.expect( l_actual ).to_equal( l_actual ); + ut3_develop.ut.expect( l_actual ).to_equal( l_actual ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -66,11 +66,9 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('{"Aidan Gillen": {"array": ["Game of Thron\"es","The Wire"],"string": "some string","int": 2,"aboolean": true, "boolean": true,"object": {"foo": "bar","object1": {"new prop1": "new prop value"},"object2": {"new prop1": "new prop value"},"object3": {"new prop1": "new prop value"},"object4": {"new prop1": "new prop value"}}},"Amy Ryan": {"one": "In Treatment","two": "The Wire"},"Annie Fitzgerald": ["Big Love","True Blood"],"Anwan Glover": ["Treme","The Wire"],"Alexander Skarsgard": ["Generation Kill","True Blood"], "Clarke Peters": null}'); --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert - l_expected_message := q'[%Diff: 20 differences found -%3 incorrect types, 4 unequal values, 13 missing properties -%Missing property: "Alexander Skarsg?rd" on path: $ + l_expected_message := q'[%Missing property: "Alexander Skarsg?rd" on path: $ %Extra property: "Alexander Skarsgard" on path: $ %Missing property: "Alice Farmer" on path: $ %Extra property: "Clarke Peters" on path: $ @@ -93,6 +91,10 @@ create or replace package body test_expectations_json is l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); --Assert ut.expect(l_actual_message).to_be_like(l_expected_message); + ut.expect(l_actual_message).to_be_like('%Diff: 20 differences found%'); + ut.expect(l_actual_message).to_be_like('%13 missing properties%'); + ut.expect(l_actual_message).to_be_like('%4 unequal values%'); + ut.expect(l_actual_message).to_be_like('%3 incorrect types%'); end; procedure null_json_variable @@ -103,7 +105,7 @@ create or replace package body test_expectations_json is l_expected := cast (null as json_object_t ); --Act - ut3.ut.expect( l_expected ).to_be_null; + ut3_develop.ut.expect( l_expected ).to_be_null; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -116,7 +118,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t(); --Act - ut3.ut.expect( l_expected ).not_to_be_null; + ut3_develop.ut.expect( l_expected ).not_to_be_null; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -131,7 +133,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t('{ "t" : "1" }'); --Act - ut3.ut.expect( l_expected ).to_be_null; + ut3_develop.ut.expect( l_expected ).to_be_null; --Assert l_expected_message := q'[%Actual: (json) %'{"t":"1"}' @@ -151,7 +153,7 @@ create or replace package body test_expectations_json is l_expected := cast (null as json_object_t ); --Act - ut3.ut.expect( l_expected ).not_to_be_null; + ut3_develop.ut.expect( l_expected ).not_to_be_null; --Assert l_expected_message := q'[%Actual: NULL (json) was expected not to be null%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -167,7 +169,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t(); --Act - ut3.ut.expect( l_expected ).to_be_empty; + ut3_develop.ut.expect( l_expected ).to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -180,7 +182,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t.parse('{ "name" : "test" }'); --Act - ut3.ut.expect( l_expected ).not_to_be_empty; + ut3_develop.ut.expect( l_expected ).not_to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -195,7 +197,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t.parse('{ "name" : "test" }'); --Act - ut3.ut.expect( l_expected ).to_be_empty; + ut3_develop.ut.expect( l_expected ).to_be_empty; --Assert l_expected_message := q'[%Actual: (json) %'{"name":"test"}' @@ -215,7 +217,7 @@ create or replace package body test_expectations_json is l_expected := json_object_t(); --Act - ut3.ut.expect( l_expected ).not_to_be_empty; + ut3_develop.ut.expect( l_expected ).not_to_be_empty; --Assert l_expected_message := q'[%Actual: (json) %'{}' @@ -234,7 +236,7 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('{"Aidan Gillen": {"array": ["Game of Thrones","The Wire"],"string": "some string","int": "2","otherint": 4, "aboolean": "true", "boolean": false,"object": {"foo": "bar"}},"Amy Ryan": ["In Treatment","The Wire"],"Annie Fitzgerald": ["True Blood","Big Love","The Sopranos","Oz"],"Anwan Glover": ["Treme","The Wire"],"Alexander Skarsg?rd": ["Generation Kill","True Blood"],"Alice Farmer": ["The Corner","Oz","The Wire"]}'); --Act - ut3.ut.expect( l_actual ).to_have_count( 6 ); + ut3_develop.ut.expect( l_actual ).to_have_count( 6 ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -251,7 +253,7 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('{"Aidan Gillen": {"array": ["Game of Thrones","The Wire"],"string": "some string","int": "2","otherint": 4, "aboolean": "true", "boolean": false,"object": {"foo": "bar"}},"Amy Ryan": ["In Treatment","The Wire"],"Annie Fitzgerald": ["True Blood","Big Love","The Sopranos","Oz"],"Anwan Glover": ["Treme","The Wire"],"Alexander Skarsg?rd": ["Generation Kill","True Blood"],"Alice Farmer": ["The Corner","Oz","The Wire"]}'); --Act - ut3.ut.expect( l_actual ).to_have_count( 2 ); + ut3_develop.ut.expect( l_actual ).to_have_count( 2 ); --Assert l_expected_message := q'[%Actual: (json [ count = 6 ]) was expected to have [ count = 2 ]%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -270,7 +272,7 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('{"Aidan Gillen": {"array": ["Game of Thrones","The Wire"],"string": "some string","int": "2","otherint": 4, "aboolean": "true", "boolean": false,"object": {"foo": "bar"}},"Amy Ryan": ["In Treatment","The Wire"],"Annie Fitzgerald": ["True Blood","Big Love","The Sopranos","Oz"],"Anwan Glover": ["Treme","The Wire"],"Alexander Skarsg?rd": ["Generation Kill","True Blood"],"Alice Farmer": ["The Corner","Oz","The Wire"]}'); --Act - ut3.ut.expect( l_actual ).not_to_have_count( 7 ); + ut3_develop.ut.expect( l_actual ).not_to_have_count( 7 ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -285,7 +287,7 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('{"Aidan Gillen": {"array": ["Game of Thrones","The Wire"],"string": "some string","int": "2","otherint": 4, "aboolean": "true", "boolean": false,"object": {"foo": "bar"}},"Amy Ryan": ["In Treatment","The Wire"],"Annie Fitzgerald": ["True Blood","Big Love","The Sopranos","Oz"],"Anwan Glover": ["Treme","The Wire"],"Alexander Skarsg?rd": ["Generation Kill","True Blood"],"Alice Farmer": ["The Corner","Oz","The Wire"]}'); --Act - ut3.ut.expect( l_actual ).not_to_have_count( 6 ); + ut3_develop.ut.expect( l_actual ).not_to_have_count( 6 ); --Assert l_expected_message := q'[%Actual: json [ count = 6 ] was expected not to have [ count = 6 ]%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -303,7 +305,7 @@ create or replace package body test_expectations_json is l_actual := json_element_t.parse('["Game of Thrones","The Wire"]'); --Act - ut3.ut.expect( l_actual ).to_have_count( 2 ); + ut3_develop.ut.expect( l_actual ).to_have_count( 2 ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -371,7 +373,7 @@ create or replace package body test_expectations_json is --Act - ut3.ut.expect(json_array_t(json_query(l_actual.stringify,'$.Actors.children'))).to_equal(json_array_t(json_query(l_expected + ut3_develop.ut.expect(json_array_t(json_query(l_actual.stringify,'$.Actors.children'))).to_equal(json_array_t(json_query(l_expected .stringify,'$.Actors[1].children'))); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); @@ -442,7 +444,7 @@ create or replace package body test_expectations_json is --Act - ut3.ut.expect(json_array_t(json_query(l_actual.stringify,'$.Actors.children'))).to_equal(json_array_t(json_query(l_expected + ut3_develop.ut.expect(json_array_t(json_query(l_actual.stringify,'$.Actors.children'))).to_equal(json_array_t(json_query(l_expected .stringify,'$.Actors[1].children'))); --Assert l_expected_message := q'[%Actual: json was expected to equal: json @@ -732,7 +734,7 @@ create or replace package body test_expectations_json is ]'); --Act - ut3.ut.expect( l_actual ).to_equal( l_actual ); + ut3_develop.ut.expect( l_actual ).to_equal( l_actual ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -759,7 +761,7 @@ create or replace package body test_expectations_json is }'); --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1041,7 +1043,7 @@ create or replace package body test_expectations_json is ]'); --Act - ut3.ut.expect( l_actual ).to_equal( l_actual ); + ut3_develop.ut.expect( l_actual ).to_equal( l_actual ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1554,11 +1556,9 @@ create or replace package body test_expectations_json is ]'); --Act - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); --Assert - l_expected_message := q'[%Diff: 133 differences found, showing first 20 -%132 unequal values, 1 missing properties -%Extra property: object on path: $[5] + l_expected_message := q'[%Extra property: object on path: $[5] %Actual value: "5ce6ec46cb9977b050f15d97" was expected to be: "5ce6ec6660565269b16cf836" on path: $[0]."_id" %Actual value: "5ce6ec469ba57bef5c421021" was expected to be: "5ce6ec66383ddbf3c400e3ed" on path: $[1]."_id" %Actual value: "5ce6ec4632328a654d592cb6" was expected to be: "5ce6ec6600fb7aaee2d1243e" on path: $[3]."_id" @@ -1582,6 +1582,9 @@ create or replace package body test_expectations_json is l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); --Assert ut.expect(l_actual_message).to_be_like(l_expected_message); + ut.expect(l_actual_message).to_be_like('%Diff: 133 differences found, showing first 20%'); + ut.expect(l_actual_message).to_be_like('%1 missing properties%'); + ut.expect(l_actual_message).to_be_like('%132 unequal values%'); end; procedure check_json_objects is @@ -1590,7 +1593,7 @@ create or replace package body test_expectations_json is begin l_expected := json_object_t('{ "name" : "Bond", "proffesion" : "spy", "drink" : "martini"}'); l_actual := json_object_t('{ "proffesion" : "spy","name" : "Bond", "drink" : "martini"}'); - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -1600,7 +1603,7 @@ create or replace package body test_expectations_json is begin l_expected := json_array_t('[ {"name" : "Bond", "proffesion" : "spy", "drink" : "martini"} , {"name" : "Kloss", "proffesion" : "spy", "drink" : "beer"} ]'); l_actual := json_array_t('[ {"name" : "Bond", "proffesion" : "spy", "drink" : "martini"} , {"name" : "Kloss", "proffesion" : "spy", "drink" : "beer"} ]'); - ut3.ut.expect( l_actual ).to_equal( l_expected ); + ut3_develop.ut.expect( l_actual ).to_equal( l_expected ); ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; diff --git a/test/ut3_user/expectations/test_matchers.pkb b/test/ut3_user/expectations/test_matchers.pkb index 88e25e8b1..e1d87d4cb 100644 --- a/test/ut3_user/expectations/test_matchers.pkb +++ b/test/ut3_user/expectations/test_matchers.pkb @@ -13,7 +13,7 @@ create or replace package body test_matchers is l_actual '||a_type||' := '||a_actual_value||'; l_expected '||a_type||' := '||a_expected_value||'; begin - ut3.ut.expect( l_actual ).'||a_prefix||'to_'||a_matcher||'( l_expected ); + ut3_develop.ut.expect( l_actual ).'||a_prefix||'to_'||a_matcher||'( l_expected ); end;'; execute immediate l_statement; if a_result = ut3_tester_helper.main_helper.gc_success then @@ -33,7 +33,7 @@ create or replace package body test_matchers is l_lower '||a_type||' := '||a_expected1_value||'; l_higher '||a_type||' := '||a_expected2_value||'; begin - ut3.ut.expect(l_actual_value).to_be_between(l_lower, l_higher); + ut3_develop.ut.expect(l_actual_value).to_be_between(l_lower, l_higher); end;'; execute immediate l_statement; if a_result = ut3_tester_helper.main_helper.gc_success then @@ -53,7 +53,7 @@ create or replace package body test_matchers is l_value1 '||a_type||' := '||a_expected1_value||'; l_value2 '||a_type||' := '||a_expected2_value||'; begin - ut3.ut.expect(l_actual_value).'||a_not_prefix||'to_be_between(l_value1, l_value2); + ut3_develop.ut.expect(l_actual_value).'||a_not_prefix||'to_be_between(l_value1, l_value2); end;'; execute immediate l_statement; if a_result = ut3_tester_helper.main_helper.gc_success then @@ -73,7 +73,7 @@ create or replace package body test_matchers is l_escape_char varchar2(32767) := :a_escape; l_result integer; begin - ut3.ut.expect( l_actual ).' || a_prefix ||q'[to_be_like(l_pattern, l_escape_char); + ut3_develop.ut.expect( l_actual ).' || a_prefix ||q'[to_be_like(l_pattern, l_escape_char); end;]' using a_pattern, a_escape; if a_result = ut3_tester_helper.main_helper.gc_success then @@ -94,7 +94,7 @@ create or replace package body test_matchers is l_modifiers varchar2(32767) := :a_modifiers; l_result integer; begin - ut3.ut.expect( l_actual ).'||a_not_prefix||'to_match(l_pattern, l_modifiers); + ut3_develop.ut.expect( l_actual ).'||a_not_prefix||'to_match(l_pattern, l_modifiers); end;'; execute immediate l_statement using a_pattern, a_modifiers; if a_result = ut3_tester_helper.main_helper.gc_success then @@ -245,8 +245,8 @@ create or replace package body test_matchers is l_value_lower timestamp := to_timestamp('1997-01-31 09:26:50.11','YYYY-MM-DD HH24.MI.SS.FF'); l_value_upper timestamp := to_timestamp('1997-01-31 09:26:50.14','YYYY-MM-DD HH24.MI.SS.FF'); begin - ut3.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); - ut3.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); + ut3_develop.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); + ut3_develop.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); end; procedure test_timestamp_ltz_between is @@ -254,8 +254,8 @@ create or replace package body test_matchers is l_value_lower timestamp with local time zone := to_timestamp_tz('1997-01-31 09:26:50.12 +03:00','YYYY-MM-DD HH24.MI.SS.FF TZR'); l_value_upper timestamp with local time zone := to_timestamp_tz('1997-01-31 09:26:50.12 +01:00','YYYY-MM-DD HH24.MI.SS.FF TZR'); begin - ut3.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); - ut3.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); + ut3_develop.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); + ut3_develop.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); end; procedure test_timestamp_tz_between is @@ -263,8 +263,8 @@ create or replace package body test_matchers is l_value_lower timestamp with time zone := to_timestamp_tz('1997-01-31 09:26:50.12 +03:00','YYYY-MM-DD HH24.MI.SS.FF TZR'); l_value_upper timestamp with time zone := to_timestamp_tz('1997-01-31 09:26:50.12 +01:00','YYYY-MM-DD HH24.MI.SS.FF TZR'); begin - ut3.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); - ut3.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); + ut3_develop.ut.expect(l_value).to_be_between(l_value_lower, l_value_upper); + ut3_develop.ut.expect(l_value).not_to_be_between(l_value_upper, l_value_lower); end; end test_matchers; diff --git a/test/ut3_user/expectations/unary/test_expect_to_be_empty.pkb b/test/ut3_user/expectations/unary/test_expect_to_be_empty.pkb index 1447bd1f0..931e24d10 100644 --- a/test/ut3_user/expectations/unary/test_expect_to_be_empty.pkb +++ b/test/ut3_user/expectations/unary/test_expect_to_be_empty.pkb @@ -10,7 +10,7 @@ create or replace package body test_expect_to_be_empty is --Arrange open l_cursor for select * from dual where 1 = 2; --Act - ut3.ut.expect(l_cursor).to_be_empty; + ut3_develop.ut.expect(l_cursor).to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -21,7 +21,7 @@ create or replace package body test_expect_to_be_empty is --Arrange open l_cursor for select * from dual; --Act - ut3.ut.expect(l_cursor).to_be_empty; + ut3_develop.ut.expect(l_cursor).to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -34,7 +34,7 @@ create or replace package body test_expect_to_be_empty is --Arrange open l_cursor for select * from dual; --Act - ut3.ut.expect(l_cursor).to_be_empty; + ut3_develop.ut.expect(l_cursor).to_be_empty; l_expected_message := q'[Actual: (refcursor [ count = 1 ])% X% @@ -51,7 +51,7 @@ create or replace package body test_expect_to_be_empty is --Arrange open l_cursor for select * from dual; --Act - ut3.ut.expect(l_cursor).not_to_be_empty; + ut3_develop.ut.expect(l_cursor).not_to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -62,7 +62,7 @@ create or replace package body test_expect_to_be_empty is --Arrange open l_cursor for select * from dual where 1 = 2; --Act - ut3.ut.expect(l_cursor).not_to_be_empty; + ut3_develop.ut.expect(l_cursor).not_to_be_empty; --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -73,7 +73,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt()); -- Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -84,7 +84,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt('a')); -- Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -95,7 +95,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt('a')); -- Act - ut3.ut.expect(l_actual).not_to_be_empty(); + ut3_develop.ut.expect(l_actual).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -106,7 +106,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt()); -- Act - ut3.ut.expect(l_actual).not_to_be_empty(); + ut3_develop.ut.expect(l_actual).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -118,7 +118,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(l_data); -- Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -130,7 +130,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertcollection(l_data); -- Act - ut3.ut.expect(l_actual).not_to_be_empty(); + ut3_develop.ut.expect(l_actual).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -141,7 +141,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertObject(ut3_tester_helper.test_dummy_number(1)); -- Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -153,7 +153,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertObject(l_data); -- Act - ut3.ut.expect(l_actual).to_be_empty(); + ut3_develop.ut.expect(l_actual).to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -161,7 +161,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_be_empty_number is begin -- Act - ut3.ut.expect( 1 ).to_( ut3.be_empty() ); + ut3_develop.ut.expect( 1 ).to_( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -176,7 +176,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertObject(ut3_tester_helper.test_dummy_number(1)); -- Act - ut3.ut.expect(l_actual).not_to_be_empty(); + ut3_develop.ut.expect(l_actual).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -188,7 +188,7 @@ create or replace package body test_expect_to_be_empty is --Arrange l_actual := anydata.convertObject(l_data); -- Act - ut3.ut.expect(l_actual).not_to_be_empty(); + ut3_develop.ut.expect(l_actual).not_to_be_empty(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -196,7 +196,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_not_be_empty_number is begin -- Act - ut3.ut.expect( 1 ).not_to( ut3.be_empty() ); + ut3_develop.ut.expect( 1 ).not_to( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -204,7 +204,7 @@ create or replace package body test_expect_to_be_empty is procedure success_be_empty_clob is begin -- Act - ut3.ut.expect( empty_clob() ).to_( ut3.be_empty() ); + ut3_develop.ut.expect( empty_clob() ).to_( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -212,7 +212,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_be_empty_clob is begin -- Act - ut3.ut.expect( to_clob(' ') ).to_( ut3.be_empty() ); + ut3_develop.ut.expect( to_clob(' ') ).to_( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -220,7 +220,7 @@ create or replace package body test_expect_to_be_empty is procedure success_be_empty_blob is begin -- Act - ut3.ut.expect( empty_blob() ).to_( ut3.be_empty() ); + ut3_develop.ut.expect( empty_blob() ).to_( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -228,7 +228,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_be_empty_blob is begin -- Act - ut3.ut.expect( to_blob('AA') ).to_( ut3.be_empty() ); + ut3_develop.ut.expect( to_blob('AA') ).to_( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -237,7 +237,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_not_be_empty_clob is begin -- Act - ut3.ut.expect( empty_clob() ).not_to( ut3.be_empty() ); + ut3_develop.ut.expect( empty_clob() ).not_to( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -245,7 +245,7 @@ create or replace package body test_expect_to_be_empty is procedure success_not_be_empty_clob is begin -- Act - ut3.ut.expect( to_clob(' ') ).not_to( ut3.be_empty() ); + ut3_develop.ut.expect( to_clob(' ') ).not_to( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -253,7 +253,7 @@ create or replace package body test_expect_to_be_empty is procedure fail_not_be_empty_blob is begin -- Act - ut3.ut.expect( empty_blob() ).not_to( ut3.be_empty() ); + ut3_develop.ut.expect( empty_blob() ).not_to( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -261,7 +261,7 @@ create or replace package body test_expect_to_be_empty is procedure success_not_be_empty_blob is begin -- Act - ut3.ut.expect( to_blob('AA') ).not_to( ut3.be_empty() ); + ut3_develop.ut.expect( to_blob('AA') ).not_to( ut3_develop.be_empty() ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; diff --git a/test/ut3_user/expectations/unary/test_expect_to_be_true_false.pkb b/test/ut3_user/expectations/unary/test_expect_to_be_true_false.pkb index 6a621c6b3..c1067044b 100644 --- a/test/ut3_user/expectations/unary/test_expect_to_be_true_false.pkb +++ b/test/ut3_user/expectations/unary/test_expect_to_be_true_false.pkb @@ -9,7 +9,7 @@ is procedure to_be_true_null_boolean is begin --Act - ut3.ut.expect( 1=null ).to_be_true(); + ut3_develop.ut.expect( 1=null ).to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -17,7 +17,7 @@ is procedure to_be_true_success is begin --Act - ut3.ut.expect( 1=1 ).to_be_true(); + ut3_develop.ut.expect( 1=1 ).to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -25,7 +25,7 @@ is procedure to_be_true_failure is begin --Act - ut3.ut.expect( 1=2 ).to_be_true(); + ut3_develop.ut.expect( 1=2 ).to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -33,7 +33,7 @@ is procedure to_be_true_bad_type is begin --Act - ut3.ut.expect( 1 ).to_be_true(); + ut3_develop.ut.expect( 1 ).to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -41,7 +41,7 @@ is procedure not_to_be_true_null_boolean is begin --Act - ut3.ut.expect( 1=null ).not_to_be_true(); + ut3_develop.ut.expect( 1=null ).not_to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -49,7 +49,7 @@ is procedure not_to_be_true_success is begin --Act - ut3.ut.expect( 1=2 ).not_to_be_true(); + ut3_develop.ut.expect( 1=2 ).not_to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -57,7 +57,7 @@ is procedure not_to_be_true_failure is begin --Act - ut3.ut.expect( 1=1 ).not_to_be_true(); + ut3_develop.ut.expect( 1=1 ).not_to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -66,7 +66,7 @@ is procedure not_to_be_true_bad_type is begin --Act - ut3.ut.expect( 1 ).not_to_be_true(); + ut3_develop.ut.expect( 1 ).not_to_be_true(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -74,7 +74,7 @@ is procedure to_be_false_null_boolean is begin --Act - ut3.ut.expect( 1=null ).to_be_false(); + ut3_develop.ut.expect( 1=null ).to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -82,7 +82,7 @@ is procedure to_be_false_success is begin --Act - ut3.ut.expect( 1=2 ).to_be_false(); + ut3_develop.ut.expect( 1=2 ).to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -90,7 +90,7 @@ is procedure to_be_false_failure is begin --Act - ut3.ut.expect( 1=1 ).to_be_false(); + ut3_develop.ut.expect( 1=1 ).to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -98,7 +98,7 @@ is procedure to_be_false_bad_type is begin --Act - ut3.ut.expect( 1 ).to_be_false(); + ut3_develop.ut.expect( 1 ).to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -106,7 +106,7 @@ is procedure not_to_be_false_null_boolean is begin --Act - ut3.ut.expect( 1=null ).not_to_be_false(); + ut3_develop.ut.expect( 1=null ).not_to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -114,7 +114,7 @@ is procedure not_to_be_false_success is begin --Act - ut3.ut.expect( 1=1 ).not_to_be_false(); + ut3_develop.ut.expect( 1=1 ).not_to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -122,7 +122,7 @@ is procedure not_to_be_false_failure is begin --Act - ut3.ut.expect( 1=2 ).not_to_be_false(); + ut3_develop.ut.expect( 1=2 ).not_to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -130,7 +130,7 @@ is procedure not_to_be_false_bad_type is begin --Act - ut3.ut.expect( 1 ).not_to_be_false(); + ut3_develop.ut.expect( 1 ).not_to_be_false(); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/expectations/unary/test_expect_to_have_count.pkb b/test/ut3_user/expectations/unary/test_expect_to_have_count.pkb index 327ced120..2167c44ef 100644 --- a/test/ut3_user/expectations/unary/test_expect_to_have_count.pkb +++ b/test/ut3_user/expectations/unary/test_expect_to_have_count.pkb @@ -11,7 +11,7 @@ create or replace package body test_expect_to_have_count is --Arrange open l_cursor for select * from dual connect by level <= 11; --Act - ut3.ut.expect(l_cursor).to_have_count(11); + ut3_develop.ut.expect(l_cursor).to_have_count(11); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -22,7 +22,7 @@ create or replace package body test_expect_to_have_count is --Arrange open l_cursor for select * from dual where 0=1; --Act - ut3.ut.expect(l_cursor).to_have_count(1); + ut3_develop.ut.expect(l_cursor).to_have_count(1); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -35,7 +35,7 @@ create or replace package body test_expect_to_have_count is --Arrange open l_cursor for select * from dual; --Act - ut3.ut.expect(l_cursor).to_have_count(2); + ut3_develop.ut.expect(l_cursor).to_have_count(2); l_expected_message := q'[Actual: (refcursor [ count = 1 ]) was expected to have [ count = 2 ]%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -50,7 +50,7 @@ create or replace package body test_expect_to_have_count is --Arrange open l_cursor for select * from dual; --Act - ut3.ut.expect(l_cursor).not_to_have_count(2); + ut3_develop.ut.expect(l_cursor).not_to_have_count(2); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -61,7 +61,7 @@ create or replace package body test_expect_to_have_count is --Arrange open l_cursor for select * from dual where 1 = 2; --Act - ut3.ut.expect(l_cursor).not_to_have_count(0); + ut3_develop.ut.expect(l_cursor).not_to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -72,7 +72,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt()); -- Act - ut3.ut.expect(l_actual).to_have_count(0); + ut3_develop.ut.expect(l_actual).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -83,7 +83,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt('a')); -- Act - ut3.ut.expect(l_actual).to_have_count(0); + ut3_develop.ut.expect(l_actual).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -94,7 +94,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt('a')); -- Act - ut3.ut.expect(l_actual).not_to_have_count(2); + ut3_develop.ut.expect(l_actual).not_to_have_count(2); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); end; @@ -105,7 +105,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(ora_mining_varchar2_nt()); -- Act - ut3.ut.expect(l_actual).not_to_have_count(0); + ut3_develop.ut.expect(l_actual).not_to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -117,7 +117,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(l_data); -- Act - ut3.ut.expect(l_actual).to_have_count(0); + ut3_develop.ut.expect(l_actual).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -129,7 +129,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertcollection(l_data); -- Act - ut3.ut.expect(l_actual).not_to_have_count(0); + ut3_develop.ut.expect(l_actual).not_to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -140,7 +140,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertObject(ut3_tester_helper.test_dummy_number(1)); -- Act - ut3.ut.expect(l_actual).to_have_count(0); + ut3_develop.ut.expect(l_actual).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -152,7 +152,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertObject(l_data); -- Act - ut3.ut.expect(l_actual).to_have_count(0); + ut3_develop.ut.expect(l_actual).to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -162,7 +162,7 @@ create or replace package body test_expect_to_have_count is l_actual_message varchar2(32767); begin -- Act - ut3.ut.expect( 1 ).to_( ut3.have_count(0) ); + ut3_develop.ut.expect( 1 ).to_( ut3_develop.have_count(0) ); --Assert l_expected_message := q'[%The matcher 'have count' cannot be used with data type (number).%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -178,7 +178,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertObject(ut3_tester_helper.test_dummy_number(1)); -- Act - ut3.ut.expect(l_actual).not_to_have_count(0); + ut3_develop.ut.expect(l_actual).not_to_have_count(0); --Assert l_expected_message := q'[%The matcher 'have count' cannot be used with data type (ut3_tester_helper.test_dummy_number).%]'; l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1); @@ -193,7 +193,7 @@ create or replace package body test_expect_to_have_count is --Arrange l_actual := anydata.convertObject(l_data); -- Act - ut3.ut.expect(l_actual).not_to_have_count(0); + ut3_develop.ut.expect(l_actual).not_to_have_count(0); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; @@ -201,7 +201,7 @@ create or replace package body test_expect_to_have_count is procedure fail_not_have_count_number is begin -- Act - ut3.ut.expect( 1 ).not_to( ut3.have_count(0) ); + ut3_develop.ut.expect( 1 ).not_to( ut3_develop.have_count(0) ); --Assert ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; diff --git a/test/ut3_user/reporters.pkb b/test/ut3_user/reporters.pkb index 9f571a589..edd26189c 100644 --- a/test/ut3_user/reporters.pkb +++ b/test/ut3_user/reporters.pkb @@ -74,14 +74,14 @@ as is begin dbms_output.put_line(''); - ut3.ut.expect(1,'Test 1 Should Pass').to_equal(1); + ut3_develop.ut.expect(1,'Test 1 Should Pass').to_equal(1); end; procedure failing_test is begin dbms_output.put_line(''); - ut3.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] '); + ut3_develop.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] '); end; procedure erroring_test @@ -90,14 +90,14 @@ as begin dbms_output.put_line(''); l_variable := 'a string'; - ut3.ut.expect(l_variable).to_equal(1); + ut3_develop.ut.expect(l_variable).to_equal(1); end; procedure disabled_test is begin dbms_output.put_line(''); - ut3.ut.expect(1,'this should not execute').to_equal(1); + ut3_develop.ut.expect(1,'this should not execute').to_equal(1); end; procedure beforeall is @@ -124,7 +124,7 @@ end;]'; execute immediate q'[create or replace package body check_fail_escape is procedure fail_miserably is begin - ut3.ut.expect('test').to_equal(''); + ut3_develop.ut.expect('test').to_equal(''); end; end;]'; @@ -148,36 +148,36 @@ end;]'; end; procedure check_xml_encoding_included( - a_reporter ut3.ut_reporter_base, + a_reporter ut3_develop.ut_reporter_base, a_client_character_set varchar2 ) is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('test_reporters', a_reporter, a_client_character_set => a_client_character_set)); + from table(ut3_develop.ut.run('test_reporters', a_reporter, a_client_character_set => a_client_character_set)); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%'); end; procedure check_xml_failure_escaped( - a_reporter ut3.ut_reporter_base + a_reporter ut3_develop.ut_reporter_base ) is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table( ut3.ut.run( 'check_fail_escape', a_reporter ) ); + from table( ut3_develop.ut.run( 'check_fail_escape', a_reporter ) ); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%' (varchar2)%]' - ||q'[at "UT3$USER#.CHECK_FAIL_ESCAPE%", line % ut3.ut.expect('test').to_equal('');]' + ||q'[at "UT3$USER#.CHECK_FAIL_ESCAPE%", line % ut3_develop.ut.expect('test').to_equal('');]' ||'%]]>%' ); end; diff --git a/test/ut3_user/reporters.pks b/test/ut3_user/reporters.pks index d1ed8635f..c5ad72e22 100644 --- a/test/ut3_user/reporters.pks +++ b/test/ut3_user/reporters.pks @@ -10,12 +10,12 @@ create or replace package reporters is procedure reporters_cleanup; procedure check_xml_encoding_included( - a_reporter ut3.ut_reporter_base, + a_reporter ut3_develop.ut_reporter_base, a_client_character_set varchar2 ); procedure check_xml_failure_escaped( - a_reporter ut3.ut_reporter_base + a_reporter ut3_develop.ut_reporter_base ); end reporters; diff --git a/test/ut3_user/reporters/test_coverage.pkb b/test/ut3_user/reporters/test_coverage.pkb deleted file mode 100644 index 738ce67e4..000000000 --- a/test/ut3_user/reporters/test_coverage.pkb +++ /dev/null @@ -1,19 +0,0 @@ -create or replace package body test_coverage is - - procedure create_dummy_coverage_pkg is - begin - ut3_tester_helper.coverage_helper.create_dummy_coverage_package(); - ut3_tester_helper.coverage_helper.create_dummy_coverage_test(); - ut3_tester_helper.coverage_helper.grant_exec_on_cov(); - end; - - procedure setup_dummy_coverage is - pragma autonomous_transaction; - begin - ut3_tester_helper.coverage_helper.setup_mock_coverage_id(); - ut3_tester_helper.coverage_helper.mock_coverage_data(user); - commit; - end; - -end; -/ diff --git a/test/ut3_user/reporters/test_coverage.pks b/test/ut3_user/reporters/test_coverage.pks index 4c19e125a..11bc6d480 100644 --- a/test/ut3_user/reporters/test_coverage.pks +++ b/test/ut3_user/reporters/test_coverage.pks @@ -3,15 +3,12 @@ create or replace package test_coverage is --%suite --%suitepath(utplsql.test_user.reporters) - --%beforeall - procedure create_dummy_coverage_pkg; - --%beforeall - procedure setup_dummy_coverage; + --%beforeall(ut3_tester_helper.coverage_helper.create_test_results_table) + --%beforeall(ut3_tester_helper.coverage_helper.create_dummy_coverage) - --%afterall(ut3_tester_helper.coverage_helper.drop_dummy_coverage_pkg) - - --%afterall(ut3_tester_helper.coverage_helper.cleanup_dummy_coverage) + --%afterall(ut3_tester_helper.coverage_helper.drop_dummy_coverage) + --%afterall(ut3_tester_helper.coverage_helper.drop_test_results_table) end; / diff --git a/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb index 183492eb7..2c36f37ba 100644 --- a/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb +++ b/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pkb @@ -1,100 +1,56 @@ create or replace package body test_cov_cobertura_reporter is procedure report_on_file is - l_results ut3.ut_varchar2_list; l_expected clob; l_actual clob; + l_block_cov clob; + l_name varchar2(250); + l_file_path varchar2(250); begin - --Arrange - l_expected := - q'[ - - - -test/ut3.dummy_coverage.pkb - - - - - - - - - - - - -]'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_cobertura_reporter( ), - a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage.pkb' ), - a_test_files => ut3.ut_varchar2_list( ) - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - --Assert - ut.expect(l_actual).to_be_like(l_expected); - end; - procedure report_zero_coverage is - l_results ut3.ut_varchar2_list; - l_expected clob; - l_actual clob; - begin + --Arrange + l_name := ut3_tester_helper.coverage_helper.covered_package_name; + l_file_path := 'test/ut3_develop.'||ut3_tester_helper.coverage_helper.covered_package_name||'.pkb'; + if ut3_tester_helper.coverage_helper.block_coverage_available then + l_block_cov := ''; + else + l_block_cov := ''; + end if; l_expected := q'[ - + -ut3.dummy_coverage +]'||l_file_path||q'[ - - + + + - - - - - +]'||l_block_cov||q'[ - - - - - - - - - + ]'; - - ut3_tester_helper.coverage_helper.cleanup_dummy_coverage(); --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_cobertura_reporter( ), - a_include_objects => ut3.ut_varchar2_list('UT3.DUMMY_COVERAGE') - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter => ut3_develop.ut_coverage_cobertura_reporter( ), + a_source_files => ut3_develop.ut_varchar2_list( ']'||l_file_path||q'[' ), + a_test_files => ut3_develop.ut_varchar2_list( ) + ) + ]' + ); --Assert ut.expect(l_actual).to_be_like(l_expected); - --Cleanup - test_coverage.setup_dummy_coverage; end; end; diff --git a/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks b/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks index 0016641d5..365815964 100644 --- a/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks +++ b/test/ut3_user/reporters/test_coverage/test_cov_cobertura_reporter.pks @@ -6,8 +6,5 @@ create or replace package test_cov_cobertura_reporter is --%test(reports on a project file mapped to database object) procedure report_on_file; - --%test(reports zero coverage on each line of non-executed database object - Issue #917) - procedure report_zero_coverage; - end test_cov_cobertura_reporter; / diff --git a/test/ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb index 5cd53a093..50d7bfe4c 100644 --- a/test/ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb +++ b/test/ut3_user/reporters/test_coverage/test_coverage_sonar_reporter.pkb @@ -1,38 +1,42 @@ create or replace package body test_coverage_sonar_reporter is procedure report_on_file is - l_results ut3.ut_varchar2_list; l_expected clob; l_actual clob; + l_block_cov clob; begin --Arrange + if ut3_tester_helper.coverage_helper.block_coverage_available then + l_block_cov := ''; + else + l_block_cov := ''; + end if; l_expected := ' - - - - + +'||l_block_cov||' + '; --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage.pkb' ), - a_test_files => ut3.ut_varchar2_list( ) - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_source_files => ut3_develop.ut_varchar2_list( 'test/ut3_develop.]'||ut3_tester_helper.coverage_helper.covered_package_name||q'[.pkb' ), + a_test_files => ut3_develop.ut_varchar2_list( ) + ) + ]' + ); --Assert ut.expect(l_actual).to_equal(l_expected); end; procedure check_encoding_included is begin - reporters.check_xml_encoding_included(ut3.ut_coverage_sonar_reporter(), 'UTF-8'); + reporters.check_xml_encoding_included(ut3_develop.ut_coverage_sonar_reporter(), 'UTF-8'); end; end; diff --git a/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pkb b/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pkb new file mode 100644 index 000000000..e5706f885 --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pkb @@ -0,0 +1,101 @@ +create or replace package body test_coverage_standalone is + + function run_coverage_twice(a_overage_run_id raw, a_object_name varchar2, a_charset varchar2) return clob is + l_expected clob; + l_block_cov clob; + l_file_path varchar2(250); + begin + l_file_path := 'package body ut3_develop.'||a_object_name; + --Arrange + if ut3_tester_helper.coverage_helper.block_coverage_available then + l_block_cov := ''; + else + l_block_cov := ''; + end if; + l_expected := + q'[ + + + +]'||l_file_path||q'[ + + + + + + +]'||l_block_cov||q'[ + + + + + + +]'; + --Act + ut3_tester_helper.coverage_helper.run_coverage_job(a_overage_run_id, 1); + ut3_tester_helper.coverage_helper.run_coverage_job(a_overage_run_id, 3); + return l_expected; + end; + + procedure coverage_without_ut_run is + l_coverage_run_id raw(32) := sys_guid(); + l_actual ut3_develop.ut_varchar2_list; + l_expected clob; + l_name varchar2(250); + l_charset varchar2(100) := 'ISO-8859-1'; + begin + l_name := ut3_tester_helper.coverage_helper.covered_package_name; + + --Arrange and Act + l_expected := run_coverage_twice(l_coverage_run_id, l_name, l_charset); + + select * + bulk collect into l_actual + from + table ( + ut3_develop.ut_coverage_cobertura_reporter().get_report( + a_coverage_options => ut3_develop.ut_coverage_options( + coverage_run_id => l_coverage_run_id, + include_objects => ut3_develop.ut_varchar2_rows(l_name), + schema_names => ut3_develop.ut_varchar2_rows('UT3_DEVELOP') + ), + a_client_character_set => l_charset + ) + ); + + --Assert + ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_actual)).to_be_like( l_expected ); + end; + + procedure coverage_cursor_without_ut_run is + l_coverage_run_id raw(32) := sys_guid(); + l_coverage_cursor sys_refcursor; + l_actual ut3_develop.ut_varchar2_list; + l_expected clob; + l_name varchar2(250); + l_charset varchar2(100) := 'ISO-8859-1'; + begin + l_name := ut3_tester_helper.coverage_helper.covered_package_name; + + --Arrange and Act + l_expected := run_coverage_twice(l_coverage_run_id, l_name, l_charset); + + l_coverage_cursor := + ut3_develop.ut_coverage_cobertura_reporter( ).get_report_cursor( + a_coverage_options => ut3_develop.ut_coverage_options( + coverage_run_id => l_coverage_run_id, + include_objects => ut3_develop.ut_varchar2_rows(l_name), + schema_names => ut3_develop.ut_varchar2_rows('UT3_DEVELOP') + ), + a_client_character_set => l_charset + ); + fetch l_coverage_cursor bulk collect into l_actual; + close l_coverage_cursor; + + --Assert + ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_actual)).to_be_like( l_expected ); + end; + +end; +/ diff --git a/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pks b/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pks new file mode 100644 index 000000000..1d5bb9a2c --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_coverage_standalone.pks @@ -0,0 +1,12 @@ +create or replace package test_coverage_standalone authid current_user is + + --%suite + --%suitepath(utplsql.test_user.reporters.test_coverage) + + --%test(Coverage can be invoked standalone in multiple sessions and a combined report can be produced at the end) + procedure coverage_without_ut_run; + + --%test(Coverage can be invoked standalone in multiple sessions and a combined report can be produced at the end as cursor) + procedure coverage_cursor_without_ut_run; +end; +/ diff --git a/test/ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb index 2d36d45cb..e3806cd97 100644 --- a/test/ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb +++ b/test/ut3_user/reporters/test_coverage/test_coveralls_reporter.pkb @@ -1,50 +1,47 @@ create or replace package body test_coveralls_reporter is procedure report_on_file is - l_results ut3.ut_varchar2_list; l_expected clob; l_actual clob; + l_file_path varchar2(250); begin --Arrange + l_file_path := 'test/ut3_develop.'||ut3_tester_helper.coverage_helper.covered_package_name||'.pkb'; l_expected := q'[{"source_files":[ -{ "name": "test/ut3.dummy_coverage.pkb", +{ "name": "]'||l_file_path||q'[", "coverage": [ null, null, null, -1, -0, +3, null, -1 +0 ] } ]} ]'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coveralls_reporter( ), - a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage.pkb' ), - a_test_files => ut3.ut_varchar2_list( ) - ) + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter => ut3_develop.ut_coveralls_reporter( ), + a_source_files => ut3_develop.ut_varchar2_list( ']'||l_file_path||q'[' ), + a_test_files => ut3_develop.ut_varchar2_list( ) + ) + ]' ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_equal(l_expected); end; procedure report_zero_coverage is - l_results ut3.ut_varchar2_list; l_expected clob; l_actual clob; - pragma autonomous_transaction; begin --Arrange l_expected := q'[{"source_files":[ -{ "name": "ut3.dummy_coverage", +{ "name": "package body ut3_develop.]'||ut3_tester_helper.coverage_helper.covered_package_name||q'[", "coverage": [ 0, 0, @@ -54,36 +51,26 @@ null, 0, 0, 0, -0, -0, -0, -0, -0, -0, 0 ] } ]} ]'; - ut3_tester_helper.coverage_helper.cleanup_dummy_coverage(); - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - 'ut3.test_dummy_coverage', - ut3.ut_coveralls_reporter(), - a_include_objects => ut3.ut_varchar2_list('UT3.DUMMY_COVERAGE') - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + 'ut3_develop.test_dummy_coverage.zero_coverage', + ut3_develop.ut_coveralls_reporter(), + a_include_objects => ut3_develop.ut_varchar2_list('UT3_DEVELOP.]'||ut3_tester_helper.coverage_helper.covered_package_name||q'[') + ) + ]' + ); --Assert ut.expect(l_actual).to_equal(l_expected); - test_coverage.setup_dummy_coverage; - end; end; diff --git a/test/ut3_user/reporters/test_coverage/test_extended_coverage.pkb b/test/ut3_user/reporters/test_coverage/test_extended_coverage.pkb new file mode 100644 index 000000000..ec95c0bfb --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_extended_coverage.pkb @@ -0,0 +1,87 @@ +create or replace package body test_extended_coverage is + + function get_block_coverage_line return clob is + begin + return + case + when ut3_tester_helper.coverage_helper.block_coverage_available then + '%' + else + '%' + end; + end; + procedure coverage_for_object is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := '%' || + get_block_coverage_line|| + '%%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( 'ut3_develop.]'||ut3_tester_helper.coverage_helper.covered_package_name||q'[' ) + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure coverage_for_schema is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := '%' || + get_block_coverage_line || + '%%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_coverage_schemes => ut3_develop.ut_varchar2_list( 'ut3_develop' ) + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + ut.expect(l_actual).to_be_like('%%%'); + end; + + procedure coverage_for_file is + l_expected clob; + l_actual clob; + l_file_path varchar2(250); + begin + --Arrange + l_file_path := 'test/ut3_develop.'||ut3_tester_helper.coverage_helper.covered_package_name||'.pkb'; + l_expected := '%' || + get_block_coverage_line || + '%%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_source_files => ut3_develop.ut_varchar2_list( ']'||l_file_path||q'[' ), + a_test_files => ut3_develop.ut_varchar2_list( ) + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + +end; +/ diff --git a/test/ut3_user/reporters/test_extended_coverage.pks b/test/ut3_user/reporters/test_coverage/test_extended_coverage.pks similarity index 68% rename from test/ut3_user/reporters/test_extended_coverage.pks rename to test/ut3_user/reporters/test_coverage/test_extended_coverage.pks index a8460aa3a..600a87e16 100644 --- a/test/ut3_user/reporters/test_extended_coverage.pks +++ b/test/ut3_user/reporters/test_coverage/test_extended_coverage.pks @@ -1,11 +1,7 @@ create or replace package test_extended_coverage is --%suite - --%suitepath(utplsql.test_user.reporters) - - --%beforeall(ut3_tester_helper.coverage_helper.setup_dummy_coverage) - - --%afterall(ut3_tester_helper.coverage_helper.cleanup_dummy_coverage) + --%suitepath(utplsql.test_user.reporters.test_coverage) --%test(Coverage is gathered for specified object - extended coverage type) procedure coverage_for_object; diff --git a/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pkb new file mode 100644 index 000000000..d1645acae --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pkb @@ -0,0 +1,36 @@ +create or replace package body test_html_coverage_reporter is + + procedure report_on_file is + l_expected varchar2(32767); + l_actual clob; + l_block_cov clob; + l_name varchar2(250); + l_charset varchar2(100) := 'ISO-8859-1'; + begin + --Arrange + l_name := ut3_tester_helper.coverage_helper.covered_package_name; + if ut3_tester_helper.coverage_helper.block_coverage_available then + l_block_cov := '(including 1 lines partially covered ) '; + end if; + l_expected := '%%

UT3_DEVELOP.'||upper(l_name)||'

' || + '%2 relevant lines. 1 lines covered ' || + l_block_cov || 'and 1 lines missed%'; + + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_html_reporter(), + a_source_files => ut3_develop.ut_varchar2_list( 'test/ut3_develop.]'||l_name||q'[.pkb' ), + a_test_files => ut3_develop.ut_varchar2_list( ), + a_client_character_set => ']'||l_charset||q'[' + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + +end test_html_coverage_reporter; +/ diff --git a/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pks b/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pks new file mode 100644 index 000000000..629d41793 --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_html_coverage_reporter.pks @@ -0,0 +1,10 @@ +create or replace package test_html_coverage_reporter is + + --%suite(ut_html_extended_reporter) + --%suitepath(utplsql.test_user.reporters.test_coverage.test_extended_coverage) + + --%test(reports on a project file mapped to database object in extended profiler coverage) + procedure report_on_file; + +end test_html_coverage_reporter; +/ diff --git a/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pkb deleted file mode 100644 index 02b275020..000000000 --- a/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pkb +++ /dev/null @@ -1,29 +0,0 @@ -create or replace package body test_html_extended_reporter is - - procedure report_on_file is - l_results ut3.ut_varchar2_list; - l_expected varchar2(32767); - l_actual clob; - l_charset varchar2(100) := 'ISO-8859-1'; - begin - --Arrange - l_expected := '%%

UT3.DUMMY_COVERAGE_PACKAGE_WITH_AN_AMAZINGLY_LONG_NAME_THAT_YOU_WOULD_NOT_THINK_OF_IN_REAL_LIFE_PROJECT_BECAUSE_ITS_SIMPLY_TOO_LONG

%4 relevant lines. 3 lines covered (including 1 lines partially covered ) and 1 lines missed%'; - - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_block_dummy_coverage', - a_reporter=> ut3.ut_coverage_html_reporter(), - a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long.pkb' ), - a_test_files => ut3.ut_varchar2_list( ), - a_client_character_set => l_charset - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - --Assert - ut.expect(l_actual).to_be_like(l_expected); - end; - -end test_html_extended_reporter; -/ diff --git a/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pks b/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pks deleted file mode 100644 index dbe31b83d..000000000 --- a/test/ut3_user/reporters/test_coverage/test_html_extended_reporter.pks +++ /dev/null @@ -1,10 +0,0 @@ -create or replace package test_html_extended_reporter is - - --%suite(ut_html_extended_reporter) - --%suitepath(utplsql.test_user.reporters.test_extended_coverage) - - --%test(reports on a project file mapped to database object in extended profiler coverage) - procedure report_on_file; - -end test_html_extended_reporter; -/ diff --git a/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pkb b/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pkb deleted file mode 100644 index 8daf36513..000000000 --- a/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pkb +++ /dev/null @@ -1,29 +0,0 @@ -create or replace package body test_html_proftab_reporter is - - procedure report_on_file is - l_results ut3.ut_varchar2_list; - l_expected varchar2(32767); - l_actual clob; - l_charset varchar2(100) := 'ISO-8859-1'; - begin - --Arrange - l_expected := '%%

UT3.DUMMY_COVERAGE

%3 relevant lines. 2 lines covered and 1 lines missed%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_html_reporter(), - a_source_files => ut3.ut_varchar2_list( 'test/ut3.dummy_coverage.pkb' ), - a_test_files => ut3.ut_varchar2_list( ), - a_client_character_set => l_charset - ) - ); - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - --Assert - ut.expect(l_actual).to_be_like(l_expected); - end; - -end test_html_proftab_reporter; -/ diff --git a/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pks b/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pks deleted file mode 100644 index 02973fbe0..000000000 --- a/test/ut3_user/reporters/test_coverage/test_html_proftab_reporter.pks +++ /dev/null @@ -1,10 +0,0 @@ -create or replace package test_html_proftab_reporter is - - --%suite(ut_html_proftab_reporter) - --%suitepath(utplsql.test_user.reporters.test_coverage.test_proftab_coverage) - - --%test(reports on a project file mapped to database object in profiler coverage) - procedure report_on_file; - -end test_html_proftab_reporter; -/ diff --git a/test/ut3_user/reporters/test_coverage/test_proftab_coverage.pkb b/test/ut3_user/reporters/test_coverage/test_proftab_coverage.pkb new file mode 100644 index 000000000..7256fc202 --- /dev/null +++ b/test/ut3_user/reporters/test_coverage/test_proftab_coverage.pkb @@ -0,0 +1,210 @@ +create or replace package body test_proftab_coverage is + + procedure coverage_for_object is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := coverage_helper.substitute_covered_package('%%'); + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + coverage_helper.substitute_covered_package( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( 'ut3_develop.{p}' ) + ) + ]' + ) + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure coverage_for_object_no_owner is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := coverage_helper.substitute_covered_package('%%'); + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + coverage_helper.substitute_covered_package( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( '{p}' ) + ) + ]' + ) + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure coverage_for_schema is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := ''; + l_expected := '%'||l_expected||'%'||l_expected||'%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_coverage_schemes => ut3_develop.ut_varchar2_list( 'ut3_develop' ) + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure coverage_for_file is + l_expected clob; + l_actual clob; + l_file_path varchar2(250); + begin + --Arrange + l_file_path := coverage_helper.substitute_covered_package('test/ut3_develop.{p}.pkb'); + l_expected := '%%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_dummy_coverage', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_source_files => ut3_develop.ut_varchar2_list( ']'||l_file_path||q'[' ), + a_test_files => ut3_develop.ut_varchar2_list( ) + ) + ]' + ); + --Assert + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure dup_object_name_coverage is + l_actual clob; + l_expected clob; + begin + l_expected := + '%%' || + '%%%'; + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + q'[ + ut3_develop.ut.run( + a_path => 'ut3_develop.test_duplicate_name', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( 'ut3_develop.duplicate_name' ) + ) + ]' + ); + --Assert + --TODO - need to fix coverage reporting so that coverage is grouped by object type not only object name + ut.expect(l_actual).to_be_like(l_expected); + end; + + procedure coverage_tmp_data_refresh is + l_actual clob; + l_test_code varchar2(32767); + begin + l_test_code := q'[ + declare + l_tmp_data ut3_develop.ut_varchar2_list; + begin + --Arrange + select * bulk collect into l_tmp_data + from table( + ut3_develop.ut.run( + a_path => 'ut3_develop:coverage_testing', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( 'ut3_develop.{p}' ) + ) + ); + coverage_helper.drop_dummy_coverage(); + coverage_helper.create_dummy_coverage_1(); + + --Act + insert into test_results + select * + from table( + ut3_develop.ut.run( + a_path => 'ut3_develop:coverage_testing', + a_reporter=> ut3_develop.ut_coverage_sonar_reporter( ), + a_include_objects => ut3_develop.ut_varchar2_list( 'ut3_develop.{p}' ) + ) + ); + commit; + end; + ]'; + + l_actual := ut3_tester_helper.coverage_helper.run_code_as_job( coverage_helper.substitute_covered_package(l_test_code) ); + --Assert + ut.expect(l_actual).to_equal(to_clob(' + +')); + end; + + procedure report_zero_coverage is + l_expected clob; + l_actual clob; + begin + --Arrange + l_expected := + q'[ + + + +package body ut3_develop.{p} + + + + + + + + + + + + + + + + + + + + +]'; + + --Act + l_actual := + ut3_tester_helper.coverage_helper.run_tests_as_job( + coverage_helper.substitute_covered_package( + q'[ + ut3_develop.ut.run( + 'ut3_develop.test_dummy_coverage.zero_coverage', + ut3_develop.ut_coverage_cobertura_reporter(), + a_include_objects => ut3_develop.ut_varchar2_list('UT3_DEVELOP.{P}') + ) + ]' + ) + ); + --Assert + ut.expect(l_actual).to_be_like(coverage_helper.substitute_covered_package(l_expected)); + end; + +end; +/ diff --git a/test/ut3_user/reporters/test_proftab_coverage.pks b/test/ut3_user/reporters/test_coverage/test_proftab_coverage.pks similarity index 62% rename from test/ut3_user/reporters/test_proftab_coverage.pks rename to test/ut3_user/reporters/test_coverage/test_proftab_coverage.pks index 6f2548158..740862f86 100644 --- a/test/ut3_user/reporters/test_proftab_coverage.pks +++ b/test/ut3_user/reporters/test_coverage/test_proftab_coverage.pks @@ -14,12 +14,19 @@ create or replace package test_proftab_coverage is --%test(Coverage is gathered for specified file - default coverage type) procedure coverage_for_file; + + --%beforetest(ut3_tester_helper.coverage_helper.create_dup_object_name) + --%aftertest(ut3_tester_helper.coverage_helper.drop_dup_object_name) + --%test(Coverage on duplicate object name) + procedure dup_object_name_coverage; --%test(Coverage data is not cached between runs - issue #562 ) - --%aftertest(ut3$user#.test_coverage.create_dummy_coverage_pkg) - --%aftertest(ut3$user#.test_coverage.setup_dummy_coverage) - --%aftertest(ut3_tester_helper.coverage_helper.drop_dummy_coverage_test_1) + --%aftertest(ut3_tester_helper.coverage_helper.drop_dummy_coverage_1) + --%aftertest(ut3_tester_helper.coverage_helper.create_dummy_coverage) procedure coverage_tmp_data_refresh; + --%test(reports zero coverage on each line of non-executed database object - Issue #917) + procedure report_zero_coverage; + end; / diff --git a/test/ut3_user/reporters/test_debug_reporter.pkb b/test/ut3_user/reporters/test_debug_reporter.pkb index f108ec577..ed7e14fcf 100644 --- a/test/ut3_user/reporters/test_debug_reporter.pkb +++ b/test/ut3_user/reporters/test_debug_reporter.pkb @@ -3,14 +3,14 @@ create or replace package body test_debug_reporter as g_actual clob; procedure run_reporter is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; begin select * bulk collect into l_results from table( - ut3.ut.run( + ut3_develop.ut.run( 'test_reporters', - ut3.ut_debug_reporter() + ut3_develop.ut_debug_reporter() ) ); g_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); diff --git a/test/ut3_user/reporters/test_documentation_reporter.pkb b/test/ut3_user/reporters/test_documentation_reporter.pkb index a1f895947..03759fe6a 100644 --- a/test/ut3_user/reporters/test_documentation_reporter.pkb +++ b/test/ut3_user/reporters/test_documentation_reporter.pkb @@ -1 +1,59 @@ -create or replace package body test_documentation_reporter as procedure report_produces_expected_out is l_results ut3.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):=q'[%org utplsql tests helpers A suite for testing different outcomes from reporters A description of some context passing_test [% sec] a test with failing assertion [% sec] (FAILED - 1) a test raising unhandled exception [% sec] (FAILED - 2) a disabled test [0 sec] (DISABLED) % Failures: % 1) failing_test "Fails as values are different" Actual: 'number [1] ' (varchar2) was expected to equal: 'number [2] ' (varchar2)% at "UT3$USER#.TEST_REPORTERS%", line 36 ut3.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] '); % % 2) erroring_test ORA-06502: PL/SQL: numeric or value error: character to number conversion error ORA-06512: at "UT3$USER#.TEST_REPORTERS", line 44% ORA-06512: at line 6 Finished in % seconds 4 tests, 1 failed, 1 errored, 1 disabled, 0 warning(s)%]'; begin select * bulk collect into l_results from table( ut3.ut.run( 'test_reporters', ut3.ut_documentation_reporter() ) ); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end; end; / \ No newline at end of file +create or replace package body test_documentation_reporter as + + procedure report_produces_expected_out is + l_results ut3_develop.ut_varchar2_list; + l_actual clob; + l_expected varchar2(32767):=q'[%org + utplsql + tests + helpers + A suite for testing different outcomes from reporters + + A description of some context + passing_test [% sec] + + + + + + a test with failing assertion [% sec] (FAILED - 1) + + + + a test raising unhandled exception [% sec] (FAILED - 2) + + + + a disabled test [0 sec] (DISABLED) + +% +Failures: +% + 1) failing_test + "Fails as values are different" + Actual: 'number [1] ' (varchar2) was expected to equal: 'number [2] ' (varchar2)% + at "UT3$USER#.TEST_REPORTERS%", line 36 ut3_develop.ut.expect('number [1] ','Fails as values are different').to_equal('number [2] '); +% +% + 2) erroring_test + ORA-06502: PL/SQL: numeric or value error: character to number conversion error + ORA-06512: at "UT3$USER#.TEST_REPORTERS", line 44% + ORA-06512: at line 6 +Finished in % seconds +4 tests, 1 failed, 1 errored, 1 disabled, 0 warning(s)%]'; + + begin + select * + bulk collect into l_results + from table( + ut3_develop.ut.run( + 'test_reporters', + ut3_develop.ut_documentation_reporter() + ) + ); + l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); + ut.expect(l_actual).to_be_like(l_expected); + end; + +end; +/ diff --git a/test/ut3_user/reporters/test_extended_coverage.pkb b/test/ut3_user/reporters/test_extended_coverage.pkb deleted file mode 100644 index 33d42d9ef..000000000 --- a/test/ut3_user/reporters/test_extended_coverage.pkb +++ /dev/null @@ -1,74 +0,0 @@ -create or replace package body test_extended_coverage is - - procedure coverage_for_object is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - l_expected := '%%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_block_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_include_objects => ut3.ut_varchar2_list( 'ut3.dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long' ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - - procedure coverage_for_schema is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - l_expected := '%%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_block_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_coverage_schemes => ut3.ut_varchar2_list( 'ut3' ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - ut.expect(l_actual).to_be_like('%%%'); - end; - - procedure coverage_for_file is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - l_file_path varchar2(250); - begin - --Arrange - l_file_path := lower('test/ut3.dummy_coverage_package_with_an_amazingly_long_name_that_you_would_not_think_of_in_real_life_project_because_its_simply_too_long.pkb'); - l_expected := '%%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_block_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_source_files => ut3.ut_varchar2_list( l_file_path ), - a_test_files => ut3.ut_varchar2_list( ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - -end; -/ diff --git a/test/ut3_user/reporters/test_junit_reporter.pkb b/test/ut3_user/reporters/test_junit_reporter.pkb index e1b790156..8f015e80b 100644 --- a/test/ut3_user/reporters/test_junit_reporter.pkb +++ b/test/ut3_user/reporters/test_junit_reporter.pkb @@ -13,8 +13,9 @@ create or replace package body test_junit_reporter as execute immediate q'[create or replace package body check_junit_reporting is procedure test_do_stuff is begin - ut3.ut.expect(1).to_equal(1); - ut3.ut.expect(1).to_equal(2); + ut3_develop.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(2); + dbms_output.put_line(' ]]>'); end; end;]'; @@ -31,7 +32,7 @@ create or replace package body test_junit_reporter as execute immediate q'[create or replace package body check_junit_rep_suitepath is procedure check_junit_rep_suitepath is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; end;]'; @@ -76,27 +77,29 @@ create or replace package body test_junit_reporter as end; procedure escapes_special_chars is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).not_to_be_like('%%'); ut.expect(l_actual).to_be_like('%<tag>%'); + ut.expect(l_actual).to_be_like(q'/% ]]]]> +]]>%/'); end; procedure reports_only_failed_or_errored is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).not_to_be_like('%Actual: 1 (number) was expected to equal: 1 (number)%'); @@ -104,13 +107,13 @@ create or replace package body test_junit_reporter as end; procedure reports_xunit_only_fail_or_err is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_xunit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_xunit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).not_to_be_like('%Actual: 1 (number) was expected to equal: 1 (number)%'); @@ -118,20 +121,20 @@ create or replace package body test_junit_reporter as end; procedure check_classname_suite is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%testcase classname="check_junit_reporting" assertions="%" name="%"%'); end; procedure check_nls_number_formatting is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_nls_numeric_characters varchar2(30); begin @@ -143,7 +146,7 @@ create or replace package body test_junit_reporter as --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting', ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting', ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_match('time="[0-9]*\.[0-9]{3,6}"'); @@ -152,20 +155,20 @@ create or replace package body test_junit_reporter as end; procedure check_classname_suitepath is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_rep_suitepath',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_rep_suitepath',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%testcase classname="core.check_junit_rep_suitepath" assertions="%" name="%"%'); end; procedure report_test_without_desc is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):= q'[ @@ -185,13 +188,13 @@ create or replace package body test_junit_reporter as begin select * bulk collect into l_results - from table(ut3.ut.run('tst_package_junit_nodesc',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('tst_package_junit_nodesc',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end; procedure report_suite_without_desc is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):= q'[ @@ -207,13 +210,13 @@ create or replace package body test_junit_reporter as begin select * bulk collect into l_results - from table(ut3.ut.run('tst_package_junit_nosuite',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('tst_package_junit_nosuite',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end; procedure reporort_produces_expected_out is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):=q'[ @@ -263,20 +266,20 @@ create or replace package body test_junit_reporter as begin select * bulk collect into l_results - from table(ut3.ut.run('test_reporters',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('test_reporters',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end; procedure check_failure_escaped is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin - reporters.check_xml_failure_escaped(ut3.ut_junit_reporter()); + reporters.check_xml_failure_escaped(ut3_develop.ut_junit_reporter()); end; procedure check_classname_is_populated is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):= q'[ @@ -292,14 +295,14 @@ create or replace package body test_junit_reporter as begin select * bulk collect into l_results - from table(ut3.ut.run('Tst_Fix_Case_Sensitive',ut3.ut_junit_reporter())); + from table(ut3_develop.ut.run('Tst_Fix_Case_Sensitive',ut3_develop.ut_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); ut.expect(l_actual).to_be_like(l_expected); end; procedure check_encoding_included is begin - reporters.check_xml_encoding_included(ut3.ut_junit_reporter(), 'UTF-8'); + reporters.check_xml_encoding_included(ut3_develop.ut_junit_reporter(), 'UTF-8'); end; procedure remove_test_package is diff --git a/test/ut3_user/reporters/test_proftab_coverage.pkb b/test/ut3_user/reporters/test_proftab_coverage.pkb deleted file mode 100644 index 74a33772e..000000000 --- a/test/ut3_user/reporters/test_proftab_coverage.pkb +++ /dev/null @@ -1,132 +0,0 @@ -create or replace package body test_proftab_coverage is - - procedure coverage_for_object is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - l_expected := '%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_include_objects => ut3.ut_varchar2_list( 'ut3.dummy_coverage' ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - - procedure coverage_for_object_no_owner is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - l_expected := '%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_include_objects => ut3.ut_varchar2_list( 'dummy_coverage' ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - - procedure coverage_for_schema is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - l_expected := ''; - l_expected := '%'||l_expected||'%'||l_expected||'%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_coverage_schemes => ut3.ut_varchar2_list( 'ut3' ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - - procedure coverage_for_file is - l_expected clob; - l_actual clob; - l_results ut3.ut_varchar2_list; - l_file_path varchar2(100); - begin - --Arrange - l_file_path := lower('test/ut3.dummy_coverage.pkb'); - l_expected := '%%'; - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3.test_dummy_coverage', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_source_files => ut3.ut_varchar2_list( l_file_path ), - a_test_files => ut3.ut_varchar2_list( ) - ) - ); - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like(l_expected); - end; - - procedure coverage_tmp_data_refresh is - l_actual clob; - l_results ut3.ut_varchar2_list; - begin - --Arrange - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3:coverage_testing', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_include_objects => ut3.ut_varchar2_list( 'ut3.dummy_coverage' ) - ) - ); - ut3_tester_helper.coverage_helper.cleanup_dummy_coverage(); - ut3_tester_helper.coverage_helper.drop_dummy_coverage_pkg(); - ut3_tester_helper.coverage_helper.create_dummy_coverage_test_1(); - - --Act - select * - bulk collect into l_results - from table( - ut3.ut.run( - a_path => 'ut3:coverage_testing', - a_reporter=> ut3.ut_coverage_sonar_reporter( ), - a_include_objects => ut3.ut_varchar2_list( 'ut3.dummy_coverage' ) - ) - ); - - --Assert - l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_equal(to_clob(' - -')); - end; - -end; -/ diff --git a/test/ut3_user/reporters/test_realtime_reporter.pkb b/test/ut3_user/reporters/test_realtime_reporter.pkb index 155925f0f..ad354133b 100644 --- a/test/ut3_user/reporters/test_realtime_reporter.pkb +++ b/test/ut3_user/reporters/test_realtime_reporter.pkb @@ -23,12 +23,12 @@ create or replace package body test_realtime_reporter as execute immediate q'[create or replace package body check_realtime_reporting1 is procedure test_1_ok is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; procedure test_2_nok is begin - ut3.ut.expect(1).to_equal(2); + ut3_develop.ut.expect(1).to_equal(2); end; end;]'; @@ -49,13 +49,13 @@ create or replace package body test_realtime_reporter as execute immediate q'[create or replace package body check_realtime_reporting2 is procedure test_3_ok is begin - ut3.ut.expect(2).to_equal(2); + ut3_develop.ut.expect(2).to_equal(2); end; procedure test_4_nok is begin - ut3.ut.expect(2).to_equal(3); - ut3.ut.expect(2).to_equal(4); + ut3_develop.ut.expect(2).to_equal(3); + ut3_develop.ut.expect(2).to_equal(4); end; procedure test_5 is @@ -82,13 +82,13 @@ create or replace package body test_realtime_reporter as l_actual integer; begin execute immediate 'select 6 from non_existing_table' into l_actual; - ut3.ut.expect(6).to_equal(l_actual); + ut3_develop.ut.expect(6).to_equal(l_actual); end; procedure test_7_with_serveroutput is begin dbms_output.put_line('before test 7'); - ut3.ut.expect(7).to_equal(7); + ut3_develop.ut.expect(7).to_equal(7); dbms_output.put_line('after test 7'); end; @@ -114,18 +114,34 @@ create or replace package body test_realtime_reporter as procedure test_8_with_warning is begin commit; -- this will raise a warning - ut3.ut.expect(8).to_equal(8); + ut3_develop.ut.expect(8).to_equal(8); end; end;]'; + execute immediate q'[create or replace package check_realtime_reporting5 is + --%suite + --%suitepath(realtime_reporting_bufix) + + --%test(test XML with nested CDATA) + procedure test_nested_cdata; + end;]'; + + execute immediate q'[create or replace package body check_realtime_reporting5 is + procedure test_nested_cdata is + begin + dbms_output.put_line('nested cdata block: , to be handled.'); + ut.expect(1).to_equal(1); + end; + end;]'; + <> declare - l_reporter ut3.ut_realtime_reporter := ut3.ut_realtime_reporter(); + l_reporter ut3_develop.ut_realtime_reporter := ut3_develop.ut_realtime_reporter(); begin -- produce - ut3.ut_runner.run( - a_paths => ut3.ut_varchar2_list(':realtime_reporting'), - a_reporters => ut3.ut_reporters(l_reporter) + ut3_develop.ut_runner.run( + a_paths => ut3_develop.ut_varchar2_list(':realtime_reporting'), + a_reporters => ut3_develop.ut_reporters(l_reporter) ); -- consume select ut3_tester_helper.test_event_object(item_type, xmltype(text)) @@ -337,7 +353,7 @@ create or replace package body test_realtime_reporter as procedure serveroutput_of_test is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/test/serverOutput/text()').getstringval() @@ -354,7 +370,7 @@ create or replace package body test_realtime_reporter as procedure serveroutput_of_testsuite is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/suite/serverOutput/text()').getstringval() @@ -372,7 +388,7 @@ create or replace package body test_realtime_reporter as procedure error_stack_of_test is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/test/errorStack/text()').getstringval() @@ -389,7 +405,7 @@ create or replace package body test_realtime_reporter as procedure error_stack_of_testsuite is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/suite/errorStack/text()').getstringval() @@ -406,7 +422,7 @@ create or replace package body test_realtime_reporter as procedure warnings_of_test is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/test/warnings/text()').getstringval() @@ -422,7 +438,7 @@ create or replace package body test_realtime_reporter as procedure warnings_of_testsuite is l_actual clob; - l_expected_list ut3.ut_varchar2_list; + l_expected_list ut3_develop.ut_varchar2_list; l_expected clob; begin select t.event_doc.extract('//event/suite/warnings/text()').getstringval() @@ -440,14 +456,43 @@ create or replace package body test_realtime_reporter as end warnings_of_testsuite; procedure get_description is - l_reporter ut3.ut_realtime_reporter; + l_reporter ut3_develop.ut_realtime_reporter; l_actual varchar2(4000); l_expected varchar2(80) := '%SQL Developer%'; begin - l_reporter := ut3.ut_realtime_reporter(); + l_reporter := ut3_develop.ut_realtime_reporter(); l_actual := l_reporter.get_description(); ut.expect(l_actual).to_be_like(l_expected); end get_description; + + procedure nested_cdata_output is + l_text varchar2(4000); + l_xml xmltype; + -- + function produce_and_consume return varchar2 is + pragma autonomous_transaction; + l_reporter ut3_develop.ut_realtime_reporter := ut3_develop.ut_realtime_reporter(); + l_text varchar2(4000); + begin + -- produce + ut3_develop.ut_runner.run( + a_paths => ut3_develop.ut_varchar2_list(':realtime_reporting_bufix'), + a_reporters => ut3_develop.ut_reporters(l_reporter) + ); + -- consume + select text + into l_text + from table(l_reporter.get_lines()) + where item_type = 'post-test'; + return l_text; + end produce_and_consume; + begin + l_text := produce_and_consume(); + ut.expect(l_text).to_be_not_null(); + -- this fails, if l_text is not a valid XML + l_xml := xmltype(l_text); + ut.expect(l_xml is not null).to_be_true(); + end; procedure remove_test_suites is pragma autonomous_transaction; @@ -456,6 +501,7 @@ create or replace package body test_realtime_reporter as execute immediate 'drop package check_realtime_reporting2'; execute immediate 'drop package check_realtime_reporting3'; execute immediate 'drop package check_realtime_reporting4'; + execute immediate 'drop package check_realtime_reporting5'; end remove_test_suites; end test_realtime_reporter; diff --git a/test/ut3_user/reporters/test_realtime_reporter.pks b/test/ut3_user/reporters/test_realtime_reporter.pks index e57ccab21..453824ca5 100644 --- a/test/ut3_user/reporters/test_realtime_reporter.pks +++ b/test/ut3_user/reporters/test_realtime_reporter.pks @@ -54,6 +54,9 @@ create or replace package test_realtime_reporter as --%test(Provide a description of the reporter explaining the use for SQL Developer) procedure get_description; + --%test(Escape nested CDATA sections in test output) + procedure nested_cdata_output; + --%afterall procedure remove_test_suites; diff --git a/test/ut3_user/reporters/test_sonar_test_reporter.pkb b/test/ut3_user/reporters/test_sonar_test_reporter.pkb index 357eff0a2..5821b2071 100644 --- a/test/ut3_user/reporters/test_sonar_test_reporter.pkb +++ b/test/ut3_user/reporters/test_sonar_test_reporter.pkb @@ -1,7 +1,7 @@ create or replace package body test_sonar_test_reporter as procedure report_produces_expected_out is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_expected varchar2(32767):=q'[ @@ -17,10 +17,10 @@ create or replace package body test_sonar_test_reporter as select * bulk collect into l_results from table( - ut3.ut.run( + ut3_develop.ut.run( 'test_reporters', - ut3.ut_sonar_test_reporter(), - a_test_file_mappings => ut3.ut_file_mapper.build_file_mappings( sys_context('USERENV', 'CURRENT_USER'), ut3.ut_varchar2_list('tests/helpers/test_reporters.pkb')) + ut3_develop.ut_sonar_test_reporter(), + a_test_file_mappings => ut3_develop.ut_file_mapper.build_file_mappings( sys_context('USERENV', 'CURRENT_USER'), ut3_develop.ut_varchar2_list('tests/helpers/test_reporters.pkb')) ) ); l_actual :=ut3_tester_helper.main_helper.table_to_clob(l_results); @@ -29,12 +29,12 @@ create or replace package body test_sonar_test_reporter as procedure check_encoding_included is begin - reporters.check_xml_encoding_included(ut3.ut_sonar_test_reporter(), 'UTF-8'); + reporters.check_xml_encoding_included(ut3_develop.ut_sonar_test_reporter(), 'UTF-8'); end; procedure check_failure_escaped is begin - reporters.check_xml_failure_escaped(ut3.ut_sonar_test_reporter()); + reporters.check_xml_failure_escaped(ut3_develop.ut_sonar_test_reporter()); end; end; diff --git a/test/ut3_user/reporters/test_teamcity_reporter.pkb b/test/ut3_user/reporters/test_teamcity_reporter.pkb index a5261d7f9..6d471b2b0 100644 --- a/test/ut3_user/reporters/test_teamcity_reporter.pkb +++ b/test/ut3_user/reporters/test_teamcity_reporter.pkb @@ -13,7 +13,7 @@ create or replace package body test_teamcity_reporter as execute immediate q'[create or replace package body check_escape_special_chars is procedure test_do_stuff is begin - ut3.ut.expect(' [ ' || chr(13) || chr(10) || ' ] ' ).to_be_null; + ut3_develop.ut.expect(' [ ' || chr(13) || chr(10) || ' ] ' ).to_be_null; end; end;]'; @@ -27,7 +27,7 @@ create or replace package body test_teamcity_reporter as execute immediate q'[create or replace package body check_trims_long_output is procedure long_output is begin - ut3.ut.expect(rpad('aVarchar',4000,'a')).to_be_null; + ut3_develop.ut.expect(rpad('aVarchar',4000,'a')).to_be_null; end; end;]'; @@ -35,7 +35,7 @@ create or replace package body test_teamcity_reporter as procedure report_produces_expected_out is - l_output_data ut3.ut_varchar2_list; + l_output_data ut3_develop.ut_varchar2_list; l_output clob; l_expected varchar2(32767); begin @@ -76,14 +76,14 @@ create or replace package body test_teamcity_reporter as --act select * bulk collect into l_output_data - from table(ut3.ut.run('test_reporters',ut3.ut_teamcity_reporter())); + from table(ut3_develop.ut.run('test_reporters',ut3_develop.ut_teamcity_reporter())); --assert ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_be_like(l_expected); end; procedure escape_special_chars is - l_output_data ut3.ut_varchar2_list; + l_output_data ut3_develop.ut_varchar2_list; l_output clob; l_expected varchar2(32767); begin @@ -95,14 +95,14 @@ create or replace package body test_teamcity_reporter as --act select * bulk collect into l_output_data - from table(ut3.ut.run('check_escape_special_chars',ut3.ut_teamcity_reporter())); + from table(ut3_develop.ut.run('check_escape_special_chars',ut3_develop.ut_teamcity_reporter())); --assert ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_be_like(l_expected); end; procedure trims_long_output is - l_output_data ut3.ut_varchar2_list; + l_output_data ut3_develop.ut_varchar2_list; l_output clob; l_expected varchar2(32767); begin @@ -114,7 +114,7 @@ create or replace package body test_teamcity_reporter as --act select * bulk collect into l_output_data - from table(ut3.ut.run('check_trims_long_output',ut3.ut_teamcity_reporter())); + from table(ut3_develop.ut.run('check_trims_long_output',ut3_develop.ut_teamcity_reporter())); --assert ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_be_like(l_expected); diff --git a/test/ut3_user/reporters/test_tfs_junit_reporter.pkb b/test/ut3_user/reporters/test_tfs_junit_reporter.pkb index 196a2ec08..7eb4f8ab6 100644 --- a/test/ut3_user/reporters/test_tfs_junit_reporter.pkb +++ b/test/ut3_user/reporters/test_tfs_junit_reporter.pkb @@ -13,8 +13,8 @@ create or replace package body test_tfs_junit_reporter as execute immediate q'[create or replace package body check_junit_reporting is procedure test_do_stuff is begin - ut3.ut.expect(1).to_equal(1); - ut3.ut.expect(1).to_equal(2); + ut3_develop.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(2); end; end;]'; @@ -31,7 +31,7 @@ create or replace package body test_tfs_junit_reporter as execute immediate q'[create or replace package body check_junit_rep_suitepath is procedure check_junit_rep_suitepath is begin - ut3.ut.expect(1).to_equal(1); + ut3_develop.ut.expect(1).to_equal(1); end; end;]'; @@ -53,13 +53,13 @@ create or replace package body test_tfs_junit_reporter as procedure escapes_special_chars is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).not_to_be_like('%%'); @@ -67,13 +67,13 @@ create or replace package body test_tfs_junit_reporter as end; procedure reports_only_failed_or_errored is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).not_to_be_like('%Actual: 1 (number) was expected to equal: 1 (number)%'); @@ -81,26 +81,26 @@ create or replace package body test_tfs_junit_reporter as end; procedure check_classname_suite is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting',ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting',ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%testcase classname="check_junit_reporting"%'); end; procedure check_flatten_nested_suites is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_flat_suitepath',ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_flat_suitepath',ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like(' @@ -113,7 +113,7 @@ create or replace package body test_tfs_junit_reporter as end; procedure check_nls_number_formatting is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; l_nls_numeric_characters varchar2(30); begin @@ -125,7 +125,7 @@ create or replace package body test_tfs_junit_reporter as --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_reporting', ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_reporting', ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_match('time="[0-9]*\.[0-9]{3,6}"'); @@ -135,17 +135,17 @@ create or replace package body test_tfs_junit_reporter as procedure check_failure_escaped is begin - reporters.check_xml_failure_escaped(ut3.ut_tfs_junit_reporter()); + reporters.check_xml_failure_escaped(ut3_develop.ut_tfs_junit_reporter()); end; procedure check_classname_suitepath is - l_results ut3.ut_varchar2_list; + l_results ut3_develop.ut_varchar2_list; l_actual clob; begin --Act select * bulk collect into l_results - from table(ut3.ut.run('check_junit_rep_suitepath',ut3.ut_tfs_junit_reporter())); + from table(ut3_develop.ut.run('check_junit_rep_suitepath',ut3_develop.ut_tfs_junit_reporter())); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); --Assert ut.expect(l_actual).to_be_like('%testcase classname="core.check_junit_rep_suitepath"%'); @@ -160,7 +160,7 @@ create or replace package body test_tfs_junit_reporter as procedure check_encoding_included is begin - reporters.check_xml_encoding_included(ut3.ut_tfs_junit_reporter(), 'UTF-8'); + reporters.check_xml_encoding_included(ut3_develop.ut_tfs_junit_reporter(), 'UTF-8'); end; end;