From 03c231cd44b60f218dd61c2f8a1abf8713d3503d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 18 Feb 2024 15:58:08 +0000 Subject: [PATCH 01/16] Updated project version after build [skip ci] --- docs/about/authors.md | 2 +- docs/about/license.md | 2 +- docs/about/project-details.md | 2 +- docs/about/support.md | 2 +- docs/index.md | 2 +- docs/userguide/advanced_data_comparison.md | 2 +- docs/userguide/annotations.md | 2 +- docs/userguide/best-practices.md | 2 +- docs/userguide/coverage.md | 2 +- docs/userguide/exception-reporting.md | 2 +- docs/userguide/expectations.md | 2 +- docs/userguide/getting-started.md | 2 +- docs/userguide/install.md | 2 +- docs/userguide/querying_suites.md | 2 +- docs/userguide/reporters.md | 2 +- docs/userguide/running-unit-tests.md | 2 +- docs/userguide/upgrade.md | 2 +- source/core/ut_utils.pks | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index c4c40bfad..228cb8451 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 702ea3f9c..fc4dbea8b 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 60aa6a657..cb30adf37 100644 --- a/docs/about/project-details.md +++ b/docs/about/project-details.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index fc412205d..452c69dab 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 8325ec636..01a850083 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) ## What is utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 1f7f2d191..df8c9d47d 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index d1ff5da07..72c70de2e 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) Annotations are used to configure tests and suites in a declarative way similar to modern OOP languages. This way, test configuration is stored along with the test logic inside the test package. No additional configuration files or tables are needed for test cases. The annotation names are based on popular testing frameworks such as JUnit. diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 57a108fdd..d1448fa23 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) The following are best practices we at utPLSQL have learned about PL/SQL and Unit Testing. diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 5d071335e..d3e7ef42e 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting uses package DBMS_PROFILER (and DBMS_PLSQL_CODE_COVERAGE on Oracle database version 12.2 and above) provided with Oracle database. Code coverage is gathered for the following source types: diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index ca52ac951..43d67eb68 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) utPLSQL is responsible for handling exceptions wherever they occur in the test run. The framework is trapping most of the exceptions so that the test execution is not affected by individual tests or test packages throwing an exception. The framework provides a full stacktrace for every exception that was thrown. The reported stacktrace does not include any utPLSQL library calls in it. diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index b6f3d7e29..c4ddb4757 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) ## Expectation concepts diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 9620878ad..964ccbdcf 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 8f32c5a10..08bd036b0 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) ## Supported database versions diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index e3ec1f53d..77307bf7c 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) ## Obtaining information about suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index e37ac6627..cd49d7c38 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) utPLSQL provides several reporting formats. The sections below describe most of them. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 3b23f5f98..941a00e36 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.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) utPLSQL framework provides two main entry points to run unit tests from within the database: diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index e5537f520..623bef999 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4187--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 522da1480..9bdf0c7a5 100644 --- a/source/core/ut_utils.pks +++ b/source/core/ut_utils.pks @@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is * */ - gc_version constant varchar2(50) := 'v3.1.14.4187-develop'; + gc_version constant varchar2(50) := 'v3.1.14.4194-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 688aad2f0a9d4b39b69d44de5e7d0b5834966702 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 19 Feb 2024 23:14:30 +0200 Subject: [PATCH 02/16] Simplification of the release process. --- .github/scripts/get_project_build_version.sh | 2 -- .github/scripts/get_project_version.sh | 13 +++-------- .../set_release_version_numbers_env.sh | 9 ++++++++ .github/scripts/set_version_numbers_env.sh | 12 ++++------ .github/scripts/update_project_version.sh | 1 + .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 2 +- BUILD_NO | 1 + development/releasing.md | 23 ++++++++----------- 9 files changed, 31 insertions(+), 34 deletions(-) delete mode 100755 .github/scripts/get_project_build_version.sh create mode 100755 .github/scripts/set_release_version_numbers_env.sh create mode 100644 BUILD_NO diff --git a/.github/scripts/get_project_build_version.sh b/.github/scripts/get_project_build_version.sh deleted file mode 100755 index 838523b05..000000000 --- a/.github/scripts/get_project_build_version.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -echo `sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${UTPLSQL_BUILD_NO}\4/" <<< "${UTPLSQL_VERSION}"` diff --git a/.github/scripts/get_project_version.sh b/.github/scripts/get_project_version.sh index 60fc0a796..54a30a562 100755 --- a/.github/scripts/get_project_version.sh +++ b/.github/scripts/get_project_version.sh @@ -1,14 +1,7 @@ #!/usr/bin/env bash - -#When building a new version from a release branch, the version is taken from release branch name -if [[ "${CI_ACTION_REF_NAME}" =~ ^release/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then - version=${CI_ACTION_REF_NAME#release\/} -else - #Otherwise, version is taken from the VERSION file - version=`cat VERSION` - #When on develop branch, add "-develop" to the version text - if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then +version=`cat VERSION` +#When on develop branch, add "-develop" to the version text +if [[ "${CI_ACTION_REF_NAME}" == "develop" ]]; then version=`sed -E "s/(v?[0-9]+\.[0-9]+\.[0-9]+).*/\1-develop/" <<< "${version}"` - fi fi echo ${version} diff --git a/.github/scripts/set_release_version_numbers_env.sh b/.github/scripts/set_release_version_numbers_env.sh new file mode 100755 index 000000000..a43843508 --- /dev/null +++ b/.github/scripts/set_release_version_numbers_env.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +build_no=$(cat BUILD_NO) +version=${CI_ACTION_REF_NAME} + +echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV +echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV +echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV + diff --git a/.github/scripts/set_version_numbers_env.sh b/.github/scripts/set_version_numbers_env.sh index 10529a1bf..c61639bf9 100755 --- a/.github/scripts/set_version_numbers_env.sh +++ b/.github/scripts/set_version_numbers_env.sh @@ -1,10 +1,8 @@ #!/bin/bash -UTPLSQL_BUILD_NO=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} ) -UTPLSQL_VERSION=$(.github/scripts/get_project_version.sh) +build_no=$( expr ${GITHUB_RUN_NUMBER} + ${UTPLSQL_BUILD_NO_OFFSET} ) +version=$(.github/scripts/get_project_version.sh) -echo "UTPLSQL_BUILD_NO=${UTPLSQL_BUILD_NO}" >> $GITHUB_ENV -echo "UTPLSQL_VERSION=${UTPLSQL_VERSION}" >> $GITHUB_ENV -echo UTPLSQL_BUILD_VERSION=$(echo ${UTPLSQL_VERSION} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${UTPLSQL_BUILD_NO}\4/") >> $GITHUB_ENV - -echo "CURRENT_BRANCH=${CI_ACTION_REF_NAME}" >> $GITHUB_ENV +echo "UTPLSQL_BUILD_NO=${build_no}" >> $GITHUB_ENV +echo "UTPLSQL_VERSION=${version}" >> $GITHUB_ENV +echo UTPLSQL_BUILD_VERSION=$(echo ${version} | sed -E "s/(v?[0-9]+\.)([0-9]+\.)([0-9]+)(-.*)?/\1\2\3\.${build_no}\4/") >> $GITHUB_ENV diff --git a/.github/scripts/update_project_version.sh b/.github/scripts/update_project_version.sh index 586cb5b64..66e45125a 100755 --- a/.github/scripts/update_project_version.sh +++ b/.github/scripts/update_project_version.sh @@ -16,4 +16,5 @@ sed -i -r "s/(sonar\.projectVersion=).*?/\1${UTPLSQL_VERSION}/" sonar-project.pr echo Update VERSION file echo ${UTPLSQL_VERSION} > VERSION +echo ${UTPLSQL_BUILD_NO} > BUILD_NO diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2fe3971e..668f1e5a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -245,7 +245,7 @@ jobs: - name: Push version update to repository id: push-version-number-update run: | - git add sonar-project.properties VERSION source/* docs/* + git add sonar-project.properties VERSION BUILD_NO source/* docs/* git commit -m 'Updated project version after build [skip ci]' git push --quiet origin HEAD:${CI_ACTION_REF_NAME} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a748d1cbd..0e29bd5c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - uses: FranzDiebold/github-env-vars-action@v2 #https://github.com/marketplace/actions/github-environment-variables-action - name: Set build version number env variables - run: .github/scripts/set_version_numbers_env.sh + run: .github/scripts/set_release_version_numbers_env.sh - name: Update project version & build number in source code and documentation run: .github/scripts/update_project_version.sh diff --git a/BUILD_NO b/BUILD_NO new file mode 100644 index 000000000..9ae5f9c77 --- /dev/null +++ b/BUILD_NO @@ -0,0 +1 @@ +4194 \ No newline at end of file diff --git a/development/releasing.md b/development/releasing.md index 2b9be317a..c1e49184d 100644 --- a/development/releasing.md +++ b/development/releasing.md @@ -3,28 +3,25 @@ To create a release follow the below steps ## Release preparation - - Create a **draft** of a Release with version number `vX.Y.X` sourced 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+) + - Create a **draft** of a Release with a new tag number `vX.Y.X` sourced from the `develop` branch on [github releases page](https://github.com/utPLSQL/utPLSQL/releases) + - Populate release description using the `Generate release notes` button + - Review the auto-generated release notes and update tem if needed + - Split the default `## What's Changed` list into `## New features`, `## Enhancements`, `## Bug fixes`. See previous release notes for details ## Performing a release - - create the release branch from `develop` 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 kick off a build on [GithubActions](https://github.com/utPLSQL/utPLSQL/actions) or kick-off a build manually for that branch after it was created on github. - - wait for the build to complete successfully as it will update the version to be release number (without develop) - - merge the release branch to `main` branch and publish [the previously prepared](#release-preparation) release draft. + - Publish [the previously prepared](#release-preparation) release draft. - Wait for the [Github Actions `Release`](https://github.com/utPLSQL/utPLSQL/actions/workflows/release.yml) process to complete successfully. The process will upload release artifacts (`zip` and `tar.gz` files along with `md5`) - - After Release build was completed successfully, merge the `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, increase the version number in `VERSION` file to represent next planned release version. + - After Release build was completed successfully, merge the `develop` branch into `main` branch. At this point, main branch and release tag should be at the same commit version and artifacts should be uploaded into Github release. + - Increase the version number in the `VERSION` file on `develop` branch to open start next release version. - Clone `utplsql.githug.io` project and: - Add a new announcement about next version being released in `docs/_posts`. Use previous announcements as a template. Make sure to set date, time and post title properly. - Add the post to list in `mkdocs.yml` file in root directory of that repository. - Add the link to the post at the beginning of the `docs/index.md` file. + - Send the announcement on Twitter(X) accoiunt abut utPLSQL release. 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 - - when a Github release is published, a new tag is added in on the repository and a release build is executed - - With Release build, the documentation for new release is published on `utplsql.github.io` and installation archives are added to the release. + - When a Github release is published, a new tag is added in on the repository and a release build is executed + - With Release action, the documentation for new release is published on `utplsql.github.io` and installation archives are added to the release. # Note: The utPLSQL installation files are uploaded by the release build process as release artifacts (separate `zip` and `tar.gz` files). From fc9382e27515762ca5a4cbfa747d54de47e2675c Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 19 Feb 2024 23:24:21 +0200 Subject: [PATCH 03/16] Fixed a flaky test when test runs in 0 seconds. --- test/ut3_user/api/test_ut_run.pkb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index e80235744..f0cfd8373 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -742,7 +742,7 @@ Failures:% 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\]',''); + a_results(i) := regexp_replace(a_results(i),'\[[0-9]*[\.,]?[0-9]+ sec\]',''); a_results(i) := regexp_replace(a_results(i),'Finished in [0-9]*[\.,][0-9]+ seconds',''); end loop; end; From 072dfbc1d0ed37f8da9c0ff87823906483ea3887 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Feb 2024 21:41:43 +0000 Subject: [PATCH 04/16] Updated project version after build [skip ci] --- BUILD_NO | 2 +- docs/about/authors.md | 2 +- docs/about/license.md | 2 +- docs/about/project-details.md | 2 +- docs/about/support.md | 2 +- docs/index.md | 2 +- docs/userguide/advanced_data_comparison.md | 2 +- docs/userguide/annotations.md | 2 +- docs/userguide/best-practices.md | 2 +- docs/userguide/coverage.md | 2 +- docs/userguide/exception-reporting.md | 2 +- docs/userguide/expectations.md | 2 +- docs/userguide/getting-started.md | 2 +- docs/userguide/install.md | 2 +- docs/userguide/querying_suites.md | 2 +- docs/userguide/reporters.md | 2 +- docs/userguide/running-unit-tests.md | 2 +- docs/userguide/upgrade.md | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/BUILD_NO b/BUILD_NO index 9ae5f9c77..26de2ed80 100644 --- a/BUILD_NO +++ b/BUILD_NO @@ -1 +1 @@ -4194 \ No newline at end of file +4197 diff --git a/docs/about/authors.md b/docs/about/authors.md index 228cb8451..203d450d1 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index fc4dbea8b..28aea5fed 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index cb30adf37..8e6730847 100644 --- a/docs/about/project-details.md +++ b/docs/about/project-details.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 452c69dab..0748fd479 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 01a850083..320784892 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) ## What is utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index df8c9d47d..34b4eddcc 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 72c70de2e..b3602ef10 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) Annotations are used to configure tests and suites in a declarative way similar to modern OOP languages. This way, test configuration is stored along with the test logic inside the test package. No additional configuration files or tables are needed for test cases. The annotation names are based on popular testing frameworks such as JUnit. diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index d1448fa23..379024e73 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) The following are best practices we at utPLSQL have learned about PL/SQL and Unit Testing. diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index d3e7ef42e..24855cbb5 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting uses package DBMS_PROFILER (and DBMS_PLSQL_CODE_COVERAGE on Oracle database version 12.2 and above) provided with Oracle database. Code coverage is gathered for the following source types: diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 43d67eb68..e2a8bc7da 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) utPLSQL is responsible for handling exceptions wherever they occur in the test run. The framework is trapping most of the exceptions so that the test execution is not affected by individual tests or test packages throwing an exception. The framework provides a full stacktrace for every exception that was thrown. The reported stacktrace does not include any utPLSQL library calls in it. diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index c4ddb4757..472c9654e 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) ## Expectation concepts diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 964ccbdcf..9c4d8813a 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 08bd036b0..c322639df 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) ## Supported database versions diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 77307bf7c..463bcef97 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) ## Obtaining information about suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index cd49d7c38..41468a3a5 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) utPLSQL provides several reporting formats. The sections below describe most of them. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 941a00e36..502bd49bd 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.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) utPLSQL framework provides two main entry points to run unit tests from within the database: diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 623bef999..cb49a0424 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4194--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 9bdf0c7a5..463aa1604 100644 --- a/source/core/ut_utils.pks +++ b/source/core/ut_utils.pks @@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is * */ - gc_version constant varchar2(50) := 'v3.1.14.4194-develop'; + gc_version constant varchar2(50) := 'v3.1.14.4197-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 614a0e00bd0285c3a938de5cdf83a9c3aa547202 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 19 Feb 2024 23:47:32 +0200 Subject: [PATCH 05/16] Remove deprecated github actions and update releasing documentation. --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 2 +- development/releasing.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 668f1e5a4..3d2f9a0a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,7 +88,7 @@ jobs: --health-cmd healthcheck.sh steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: c-py/action-dotenv-to-setenv@v2 @@ -183,7 +183,7 @@ jobs: run: bash .github/scripts/validate_report_files.sh - name: Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos files: ./cobertura.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e29bd5c1..1c4db5d59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: c-py/action-dotenv-to-setenv@v2 diff --git a/development/releasing.md b/development/releasing.md index c1e49184d..ac2091632 100644 --- a/development/releasing.md +++ b/development/releasing.md @@ -6,7 +6,7 @@ To create a release follow the below steps - Create a **draft** of a Release with a new tag number `vX.Y.X` sourced from the `develop` branch on [github releases page](https://github.com/utPLSQL/utPLSQL/releases) - Populate release description using the `Generate release notes` button - Review the auto-generated release notes and update tem if needed - - Split the default `## What's Changed` list into `## New features`, `## Enhancements`, `## Bug fixes`. See previous release notes for details + - Optionally, split the default `## What's Changed` list into `## New features`, `## Enhancements`, `## Bug fixes`. See previous release notes for details ## Performing a release - Publish [the previously prepared](#release-preparation) release draft. From 5a42ce5ea71045b4cafa063ccc57781fa7ce09ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Feb 2024 21:56:00 +0000 Subject: [PATCH 06/16] Updated project version after build [skip ci] --- BUILD_NO | 2 +- docs/about/authors.md | 2 +- docs/about/license.md | 2 +- docs/about/project-details.md | 2 +- docs/about/support.md | 2 +- docs/index.md | 2 +- docs/userguide/advanced_data_comparison.md | 2 +- docs/userguide/annotations.md | 2 +- docs/userguide/best-practices.md | 2 +- docs/userguide/coverage.md | 2 +- docs/userguide/exception-reporting.md | 2 +- docs/userguide/expectations.md | 2 +- docs/userguide/getting-started.md | 2 +- docs/userguide/install.md | 2 +- docs/userguide/querying_suites.md | 2 +- docs/userguide/reporters.md | 2 +- docs/userguide/running-unit-tests.md | 2 +- docs/userguide/upgrade.md | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/BUILD_NO b/BUILD_NO index 26de2ed80..8c8049510 100644 --- a/BUILD_NO +++ b/BUILD_NO @@ -1 +1 @@ -4197 +4198 diff --git a/docs/about/authors.md b/docs/about/authors.md index 203d450d1..541662a36 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 28aea5fed..f07bdd4b4 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 8e6730847..0cd02e09e 100644 --- a/docs/about/project-details.md +++ b/docs/about/project-details.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 0748fd479..195b194e3 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 320784892..8f1cc584e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) ## What is utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 34b4eddcc..4068e2d09 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index b3602ef10..57cb29685 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) Annotations are used to configure tests and suites in a declarative way similar to modern OOP languages. This way, test configuration is stored along with the test logic inside the test package. No additional configuration files or tables are needed for test cases. The annotation names are based on popular testing frameworks such as JUnit. diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 379024e73..b016fdac0 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) The following are best practices we at utPLSQL have learned about PL/SQL and Unit Testing. diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 24855cbb5..f48051ba5 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting uses package DBMS_PROFILER (and DBMS_PLSQL_CODE_COVERAGE on Oracle database version 12.2 and above) provided with Oracle database. Code coverage is gathered for the following source types: diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index e2a8bc7da..b580b7077 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) utPLSQL is responsible for handling exceptions wherever they occur in the test run. The framework is trapping most of the exceptions so that the test execution is not affected by individual tests or test packages throwing an exception. The framework provides a full stacktrace for every exception that was thrown. The reported stacktrace does not include any utPLSQL library calls in it. diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 472c9654e..19e77835a 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) ## Expectation concepts diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 9c4d8813a..1cf1f9d2f 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index c322639df..4fdd04af6 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) ## Supported database versions diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 463bcef97..2c6ae2d95 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) ## Obtaining information about suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 41468a3a5..8042fcd55 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) utPLSQL provides several reporting formats. The sections below describe most of them. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 502bd49bd..7f8f6d620 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.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) utPLSQL framework provides two main entry points to run unit tests from within the database: diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index cb49a0424..11410dd2b 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4197--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 463aa1604..36264fafc 100644 --- a/source/core/ut_utils.pks +++ b/source/core/ut_utils.pks @@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is * */ - gc_version constant varchar2(50) := 'v3.1.14.4197-develop'; + gc_version constant varchar2(50) := 'v3.1.14.4198-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 42b923be7f4c46768c4f62eeb347b45590f11ad3 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Tue, 20 Feb 2024 00:39:24 +0200 Subject: [PATCH 07/16] Removed unneeded files from the release archives. --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 5e0c801de..2cda5ad55 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,8 @@ test export-ignore .gitignore export-ignore .gitmodules export-ignore mkdocs.yml export-ignore +BUILD_NO export-ignore +mkdocs_offline.yml export-ignore sonar-project.properties export-ignore ^docs/** linguist-documentation *.pkb linguist-language=PLSQL From 629e6116887b1921f956ff6dd449ed9b9b1e29da Mon Sep 17 00:00:00 2001 From: bozo030 Date: Tue, 21 May 2024 11:59:34 +0200 Subject: [PATCH 08/16] Matcher shortcut syntax example fixed --- docs/userguide/expectations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 19e77835a..ec24b570c 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -52,7 +52,7 @@ Shortcut syntax, where matcher is directly part of expectation: ut.expect( a_actual ).not_to_{matcher}; --example - ut.expect( 1 ).to_( be_null() ); + ut.expect( 1 ).to_be_null(); ``` When using shortcut syntax you don't need to surround matcher with brackets. Shortcut syntax is provided for convenience. From 3f4dc81ccaa2625b8da111e446105d6d51ef32de Mon Sep 17 00:00:00 2001 From: Samuel Nitsche Date: Tue, 17 Sep 2024 22:58:03 +0200 Subject: [PATCH 09/16] Update build.yml to use actions/upload-artifact@v4 as described in https://github.blog/news-insights/product-news/get-started-with-v4-of-github-actions-artifacts/ --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d2f9a0a0..af2e4875d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -172,7 +172,7 @@ jobs: - name: Upload ORACLE_BASE/diag data Artifact id: upload if: ${{ always() && steps.run-tests.outcome == 'failure' }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: my-artifact$-${{matrix.db_version_name}} path: ${{github.workspace}}/database-diag From ca88e498e8e374776f76a5f63d136f2609c6c60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20G=C4=99bal?= Date: Wed, 23 Oct 2024 00:30:02 +0300 Subject: [PATCH 10/16] Update test_realtime_reporter.pkb Fixing failing test for 23ai --- test/ut3_user/reporters/test_realtime_reporter.pkb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ut3_user/reporters/test_realtime_reporter.pkb b/test/ut3_user/reporters/test_realtime_reporter.pkb index 2dafa71d0..84053c3c9 100644 --- a/test/ut3_user/reporters/test_realtime_reporter.pkb +++ b/test/ut3_user/reporters/test_realtime_reporter.pkb @@ -408,7 +408,7 @@ create or replace package body test_realtime_reporter as from table(g_events) t where t.event_doc.extract('/event[@type="post-test"]/test/@id').getstringval() = 'realtime_reporting.check_realtime_reporting3.test_6_with_runtime_error'; - ut3_tester_helper.main_helper.append_to_list(l_expected_list, ''); l_expected := ut3_tester_helper.main_helper.table_to_clob(l_expected_list); From 5241c43e2b25d718a8ecc3e5c26820af852310ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20G=C4=99bal?= Date: Wed, 23 Oct 2024 00:38:54 +0300 Subject: [PATCH 11/16] Update test_documentation_reporter.pkb Fixed failing unit test --- test/ut3_user/reporters/test_documentation_reporter.pkb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/ut3_user/reporters/test_documentation_reporter.pkb b/test/ut3_user/reporters/test_documentation_reporter.pkb index 2a05679ff..016cec256 100644 --- a/test/ut3_user/reporters/test_documentation_reporter.pkb +++ b/test/ut3_user/reporters/test_documentation_reporter.pkb @@ -34,7 +34,6 @@ Failures: "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: %: character to number conversion error From 1819ca766160a4b6c82090b7304512b68d08b063 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Oct 2024 22:47:42 +0100 Subject: [PATCH 12/16] Updated project version after build [skip ci] --- BUILD_NO | 2 +- docs/about/authors.md | 2 +- docs/about/license.md | 2 +- docs/about/project-details.md | 2 +- docs/about/support.md | 2 +- docs/index.md | 2 +- docs/userguide/advanced_data_comparison.md | 2 +- docs/userguide/annotations.md | 2 +- docs/userguide/best-practices.md | 2 +- docs/userguide/coverage.md | 2 +- docs/userguide/exception-reporting.md | 2 +- docs/userguide/expectations.md | 2 +- docs/userguide/getting-started.md | 2 +- docs/userguide/install.md | 2 +- docs/userguide/querying_suites.md | 2 +- docs/userguide/reporters.md | 2 +- docs/userguide/running-unit-tests.md | 2 +- docs/userguide/upgrade.md | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/BUILD_NO b/BUILD_NO index 8c8049510..fab85b21d 100644 --- a/BUILD_NO +++ b/BUILD_NO @@ -1 +1 @@ -4198 +4206 diff --git a/docs/about/authors.md b/docs/about/authors.md index 541662a36..499398993 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index f07bdd4b4..03cc286eb 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 0cd02e09e..5579a943b 100644 --- a/docs/about/project-details.md +++ b/docs/about/project-details.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 195b194e3..6d68864bd 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 8f1cc584e..b277c9d16 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) ## What is utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 4068e2d09..45fca1871 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 57cb29685..31a91cac2 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) Annotations are used to configure tests and suites in a declarative way similar to modern OOP languages. This way, test configuration is stored along with the test logic inside the test package. No additional configuration files or tables are needed for test cases. The annotation names are based on popular testing frameworks such as JUnit. diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index b016fdac0..6becefc5c 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) The following are best practices we at utPLSQL have learned about PL/SQL and Unit Testing. diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index f48051ba5..c9015b438 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting uses package DBMS_PROFILER (and DBMS_PLSQL_CODE_COVERAGE on Oracle database version 12.2 and above) provided with Oracle database. Code coverage is gathered for the following source types: diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index b580b7077..824aaecd5 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) utPLSQL is responsible for handling exceptions wherever they occur in the test run. The framework is trapping most of the exceptions so that the test execution is not affected by individual tests or test packages throwing an exception. The framework provides a full stacktrace for every exception that was thrown. The reported stacktrace does not include any utPLSQL library calls in it. diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index ec24b570c..54c204d58 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) ## Expectation concepts diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 1cf1f9d2f..1ff54a7d6 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 4fdd04af6..9d8167739 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) ## Supported database versions diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 2c6ae2d95..24159fede 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) ## Obtaining information about suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 8042fcd55..9b1a7e75b 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) utPLSQL provides several reporting formats. The sections below describe most of them. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 7f8f6d620..375a05125 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.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) utPLSQL framework provides two main entry points to run unit tests from within the database: diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 11410dd2b..6fdaa6a48 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.14.4198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.14.4206--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 36264fafc..0e1e0a851 100644 --- a/source/core/ut_utils.pks +++ b/source/core/ut_utils.pks @@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is * */ - gc_version constant varchar2(50) := 'v3.1.14.4198-develop'; + gc_version constant varchar2(50) := 'v3.1.14.4206-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 808fcdfc31c17dac2fedc41a440f55d7f7bd9bbe Mon Sep 17 00:00:00 2001 From: Lukasz Wasylow Date: Sat, 29 Mar 2025 16:43:12 +0000 Subject: [PATCH 13/16] Update documentation for customer reporter --- docs/userguide/reporters.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 9b1a7e75b..24d1065fe 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -175,6 +175,16 @@ If you need to produce a colored text output from the custom reporter, then you It is recommended to create the reporter type in the schema where utPLSQL is installed (by default it is the `UT3` schema). Note that before running the utPLSQL uninstall scripts, all custom reporters should be dropped (cf. [the installation documentation](install.md)). In particular, when upgrading to a newer version of utPLSQL, one has to drop the custom reporters and recreate them after the upgrade. +!!! note + Please make sure that grants have been added and synonyms created for the custom reporter in order for reporter to be accessible the same way as other reporters. + Assuming that reporter with name `customer_reporter` was created in schema `UT3` +```sql + grant execute on ut3.custom_reporter to public; + create or replace public synonym custom_reporter for ut3.custom_reporter; +``` + + + !!! note It is possible, but cumbersome, to use another schema for storing the custom reporters. This requires to create a synonym for the base reporter type in the schema that is going to own the custom reporter, and to provide appropriate grants both to the owner of the custom reporter and to the user running the reporter. After upgrading or reinstalling utPLSQL, the extra privileges need to be recreated. This approach is not recommended. From 39ff2ed0090a22fe680f5de38a2aa87f31b95226 Mon Sep 17 00:00:00 2001 From: Lukasz Wasylow Date: Wed, 2 Apr 2025 20:41:46 +0100 Subject: [PATCH 14/16] Adding tests for issue 1293 --- .../expectations/test_expectations_cursor.pkb | 42 +++++++++++++++++++ .../expectations/test_expectations_cursor.pks | 6 +++ 2 files changed, 48 insertions(+) diff --git a/test/ut3_user/expectations/test_expectations_cursor.pkb b/test/ut3_user/expectations/test_expectations_cursor.pkb index 847cce9a0..867a5f3db 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pkb +++ b/test/ut3_user/expectations/test_expectations_cursor.pkb @@ -2950,5 +2950,47 @@ Rows: [ 2 differences ] ); end; + procedure cursor_joinby_compare_issue_1293 is + l_actual sys_refcursor; + l_expected sys_refcursor; + begin + --Arrange + open l_expected for + select 'FOO' username, 12 from dual union all + select 'TEST' username, -600 user_id from dual + order by 1 desc; + open l_actual for + select 'FOO' username, 12 from dual union all + select 'TEST' username, -600 user_id from dual union all + -- DUPLICATE!!! + select 'TEST' username, -600 user_id from dual + order by 1 asc; + --Act + ut3_develop.ut.expect(l_actual).to_equal(l_expected).join_by('USERNAME'); + --Assert + ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); + end; + + procedure cursor_not_joinby_compare_issue_1293 is + l_actual sys_refcursor; + l_expected sys_refcursor; + begin + --Arrange + open l_expected for + select 'FOO' username, 12 from dual union all + select 'TEST' username, -600 user_id from dual + order by 1 desc; + open l_actual for + select 'FOO' username, 12 from dual union all + select 'TEST' username, -600 user_id from dual union all + -- DUPLICATE!!! + select 'TEST' username, -600 user_id from dual + order by 1 asc; + --Act + 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; + end; / diff --git a/test/ut3_user/expectations/test_expectations_cursor.pks b/test/ut3_user/expectations/test_expectations_cursor.pks index 0f34486a9..53f754322 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pks +++ b/test/ut3_user/expectations/test_expectations_cursor.pks @@ -485,5 +485,11 @@ create or replace package test_expectations_cursor is --%test( Multiple failures reported correctly - Issue #998 ) procedure multiple_cursor_expectations; + --%test( Compares cursors with duplicate rows using join by - Issue #1293 ) + procedure cursor_joinby_compare_issue_1293; + + --%test( Compares cursors with duplicate rows - Issue #1293 ) + procedure cursor_not_joinby_compare_issue_1293; + end; / From 85734ffec7f57efff073d833ee2d43de1a9ad0f2 Mon Sep 17 00:00:00 2001 From: Lukasz Wasylow Date: Thu, 3 Apr 2025 18:38:33 +0100 Subject: [PATCH 15/16] For a join by key we need to also compare by duplicate numbers to make sure that we have same amount of rows when rows are identical but row counts is different. --- source/expectations/data_values/ut_compound_data_helper.pkb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/expectations/data_values/ut_compound_data_helper.pkb b/source/expectations/data_values/ut_compound_data_helper.pkb index 4517cd43c..875ec760a 100644 --- a/source/expectations/data_values/ut_compound_data_helper.pkb +++ b/source/expectations/data_values/ut_compound_data_helper.pkb @@ -300,8 +300,8 @@ create or replace package body ut_compound_data_helper is ut_utils.append_to_clob(a_partition_stmt,' row_number() over (partition by '||l_partition_tmp||' order by '||l_partition_tmp||' ) '); if a_pk_table.count > 0 then - -- If key defined do the join or these and where on diffrences - a_join_by_stmt := ut_utils.table_to_clob(l_join_by_list, ' and '); + -- If key defined do the join or these and where on diffrences as well as on duplicate number when rows are same. + a_join_by_stmt := ' e."UT3$_Dup#No" = a."UT3$_Dup#No" and '||ut_utils.table_to_clob(l_join_by_list, ' and '); elsif a_unordered then -- If no key defined do the join on all columns a_join_by_stmt := ' e."UT3$_Dup#No" = a."UT3$_Dup#No" and '||ut_utils.table_to_clob(l_equal_list, ' and '); From 6f273df2752c7a0665debbc9532886ea01f8ff5a Mon Sep 17 00:00:00 2001 From: Lukasz Wasylow Date: Thu, 3 Apr 2025 19:49:58 +0100 Subject: [PATCH 16/16] Change procedure nameto be less 30 to work for 11 and 12 --- test/ut3_user/expectations/test_expectations_cursor.pkb | 4 ++-- test/ut3_user/expectations/test_expectations_cursor.pks | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ut3_user/expectations/test_expectations_cursor.pkb b/test/ut3_user/expectations/test_expectations_cursor.pkb index 867a5f3db..a4ef4e8f2 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pkb +++ b/test/ut3_user/expectations/test_expectations_cursor.pkb @@ -2950,7 +2950,7 @@ Rows: [ 2 differences ] ); end; - procedure cursor_joinby_compare_issue_1293 is + procedure cr_joinby_compare_issue_1293 is l_actual sys_refcursor; l_expected sys_refcursor; begin @@ -2971,7 +2971,7 @@ Rows: [ 2 differences ] ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_be_greater_than(0); end; - procedure cursor_not_joinby_compare_issue_1293 is + procedure cr_not_joinby_comp_issue_1293 is l_actual sys_refcursor; l_expected sys_refcursor; begin diff --git a/test/ut3_user/expectations/test_expectations_cursor.pks b/test/ut3_user/expectations/test_expectations_cursor.pks index 53f754322..8cceb5e01 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pks +++ b/test/ut3_user/expectations/test_expectations_cursor.pks @@ -486,10 +486,10 @@ create or replace package test_expectations_cursor is procedure multiple_cursor_expectations; --%test( Compares cursors with duplicate rows using join by - Issue #1293 ) - procedure cursor_joinby_compare_issue_1293; + procedure cr_joinby_compare_issue_1293; --%test( Compares cursors with duplicate rows - Issue #1293 ) - procedure cursor_not_joinby_compare_issue_1293; + procedure cr_not_joinby_comp_issue_1293; end; /