From 614a0e00bd0285c3a938de5cdf83a9c3aa547202 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 19 Feb 2024 23:47:32 +0200 Subject: [PATCH 01/12] 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 02/12] 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 03/12] 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 04/12] 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 05/12] 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 06/12] 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 07/12] 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 08/12] 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 09/12] 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 10/12] 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 11/12] 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 12/12] 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; /