From 898fe26ca6700496868277c3b64badf9aa225b7a Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 3 Sep 2019 22:59:58 +0000 Subject: [PATCH 01/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index d486fde91..99a7427a2 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index f988a85e3..61624fdac 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 93fe63df3..56ef5110b 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 60dacc2f1..b357f1f3c 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 187b02c0e..cd27af624 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index a4f387676..c0d8ce1de 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index a2520f2ba..631695efd 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 36acc19f6..846562f0e 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 89098ecaf..be989b84d 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 7c8293095..dd467e050 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 7fc22f457..21711a438 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 99383552a..a47384d29 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index cc387a34f..ea42b0d68 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 71619bec3..032e515b6 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index e7c5b5e8c..e73a51544 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 7311d1b7a..8a73df326 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.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index f11bcb48c..08beca82b 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3169--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.8.3187--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 693b56441..0fbd0a0dd 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.8.3169-develop + * secion v3.1.8.3187-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index f4923a751..ed64a851f 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.8.3169-develop'; + gc_version constant varchar2(50) := 'v3.1.8.3187-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 307a1693a94c46ccd001375437c827d95c2a9b5b Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Wed, 4 Sep 2019 01:08:24 +0100 Subject: [PATCH 02/50] Updated version to 3.1.9 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 25742a1c4..76cb3f689 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.1.8 +v3.1.9 From 83b66c0d0563e54abadbe28a53a1ff315dfc6d98 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 4 Sep 2019 00:18:03 +0000 Subject: [PATCH 03/50] Updated project version after build [skip ci] --- VERSION | 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 +- sonar-project.properties | 2 +- source/core/ut_utils.pkb | 2 +- source/core/ut_utils.pks | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/VERSION b/VERSION index 76cb3f689..272ed88b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.1.9 +v3.1.9-develop diff --git a/docs/about/authors.md b/docs/about/authors.md index a18bfca23..a7b8cd428 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 832b9e394..571fddc79 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index f8dfb024c..0afd11623 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 1e2dcf3cc..5b5bc9124 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 4ed6794ec..82f3c7353 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 60f00e4bb..fc4b03283 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 3567ffd96..e2d9b7e00 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index ae116381f..c3d88c908 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 9b8873f47..e89438fbe 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index b023a50c8..74ddb8f24 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 36d2cd79f..b03af102f 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 4adc482aa..c4cb8bf0d 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 289439ddf..5236f6abd 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 173e696c6..6910ee2ab 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 379948e0d..d59b68642 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 21bcc77fc..1055f7a65 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.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index e4fe75b72..f07fba890 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.8.3188-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) # Upgrading from version 2 diff --git a/sonar-project.properties b/sonar-project.properties index b9220be6e..bb6e0f621 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=utPLSQL # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=utPLSQL -sonar.projectVersion=v3.1.8 +sonar.projectVersion=v3.1.9-develop # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # Since SonarQube 4.2, this property is optional if sonar.modules is set. diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 25bc32b34..2a6adccb9 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.8.3188 + * secion v3.1.9.3191-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 821c84dfe..dac12fbc9 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.8.3188'; + gc_version constant varchar2(50) := 'v3.1.9.3191-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 3c888747d29c1982de63fc89e45f32e5d7031082 Mon Sep 17 00:00:00 2001 From: Pazus Date: Tue, 10 Sep 2019 08:54:07 +0300 Subject: [PATCH 04/50] Update .gitattributes --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 02d2d5e4e..459450fce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,3 +9,4 @@ tests export-ignore development export-ignore node_modules export-ignore ^docs/* linguist-documentation +*.sql linguist-language=PLSQL From 2de010d8805cf595939aaf18f4554920832b61f0 Mon Sep 17 00:00:00 2001 From: Pazus Date: Tue, 10 Sep 2019 20:40:51 +0300 Subject: [PATCH 05/50] Update .gitattributes --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitattributes b/.gitattributes index 459450fce..9cf0f2457 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,4 +9,8 @@ tests export-ignore development export-ignore node_modules export-ignore ^docs/* linguist-documentation +*.pkb linguist-language=PLSQL +*.pks linguist-language=PLSQL *.sql linguist-language=PLSQL +*.tpb linguist-language=PLSQL +*.tps linguist-language=PLSQL From a3faea485a7448225b4f4334d4f94613864c4cf3 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 10 Sep 2019 18:38:36 +0000 Subject: [PATCH 06/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index a7b8cd428..67b0a444a 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 571fddc79..69e665c1f 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 0afd11623..bd12b27a1 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 5b5bc9124..812699af5 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 82f3c7353..faa3f74a6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index fc4b03283..87808e754 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index e2d9b7e00..27f0d82de 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index c3d88c908..549b99773 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index e89438fbe..cd0542f59 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 74ddb8f24..32a6f6f40 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index b03af102f..4d52de5bd 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index c4cb8bf0d..669c82318 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 5236f6abd..b9d45150e 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 6910ee2ab..0f0f611b9 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index d59b68642..b59254a67 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 1055f7a65..771c4bf22 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.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index f07fba890..17792fe27 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3191--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 2a6adccb9..3b80d0c19 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3191-develop + * secion v3.1.9.3196-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index dac12fbc9..d0a2ee5c4 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.9.3191-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3196-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 3ef06eb883131cc2a2763f5aea88b89e1b0f9134 Mon Sep 17 00:00:00 2001 From: MickeM Date: Thu, 12 Sep 2019 09:21:24 +0200 Subject: [PATCH 07/50] Fix check of sys grants with ANY (issue #992) --- source/check_sys_grants.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/check_sys_grants.sql b/source/check_sys_grants.sql index a31e9a9e1..7b1644952 100644 --- a/source/check_sys_grants.sql +++ b/source/check_sys_grants.sql @@ -21,7 +21,7 @@ begin (select privilege from user_sys_privs union all - select replace(privilege,' ANY ') privilege + select replace(privilege,' ANY') privilege from user_sys_privs) ); if l_missing_grants is not null then From 48b9d2e1d8cce7cce714bb6b0d1816788c4eb3a8 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 13 Sep 2019 18:43:00 +0000 Subject: [PATCH 08/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 67b0a444a..8842f04fc 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 69e665c1f..afb54cdb7 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index bd12b27a1..f79b06f95 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 812699af5..75c71678e 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index faa3f74a6..fefa3c757 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 87808e754..17761fb7c 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 27f0d82de..623176db9 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 549b99773..0111c7b7f 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index cd0542f59..deb3f7ea6 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 32a6f6f40..52c96f287 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 4d52de5bd..03e2d9822 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 669c82318..42a82bf8a 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index b9d45150e..14d532d5d 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 0f0f611b9..40acf9a45 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index b59254a67..703f56138 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 771c4bf22..6e9d07a7a 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.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 17792fe27..651f4a900 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3196--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 3b80d0c19..ac4dde170 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3196-develop + * secion v3.1.9.3198-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index d0a2ee5c4..78a3906bc 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.9.3196-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3198-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From c61f954db45406a71cce469fa5343099671e73d3 Mon Sep 17 00:00:00 2001 From: abasharin Date: Fri, 20 Sep 2019 16:00:31 -0400 Subject: [PATCH 09/50] Corrected rebuild_annotation_cache parameter --- docs/userguide/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 14d532d5d..0cbcd7a6a 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -141,7 +141,7 @@ sqlplus sys/sys_pass@db as sysdba @install_headless_with_trigger.sql utp3 my_ver **Note:** >When installing utPLSQL into database with existing unit test packages, utPLSQL will not be able to already-existing unit test packages. When utPSLQL was installed with DDL trigger, you have to do one of: >- Recompile existing Unit Test packages to make utPLSQL aware of their existence ->- Invoke `exec ut_runner.rebuild_annotation_cache(a_schema_name=> ... );` for every schema containing unit tests in your database +>- Invoke `exec ut_runner.rebuild_annotation_cache(a_object_owner=> ... );` for every schema containing unit tests in your database > > Steps above are required to assure annotation cache is populated properly from existing objects. Rebuilding annotation cache might be faster than code recompilation. From a02eed8d7ae6f577ca90ce68de367e1d961080b9 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 21 Sep 2019 23:36:17 +0000 Subject: [PATCH 10/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 8842f04fc..cac2070a3 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index afb54cdb7..656a6b644 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index f79b06f95..7eb424cfa 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 75c71678e..490af7126 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index fefa3c757..dc10e1cab 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 17761fb7c..a70f251b1 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 623176db9..ba2783348 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 0111c7b7f..4093037d6 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index deb3f7ea6..27543d243 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 52c96f287..569f53461 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 03e2d9822..b707d0e17 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 42a82bf8a..829ede576 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 0cbcd7a6a..11a7b8024 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 40acf9a45..2e5e3016e 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 703f56138..6eb712972 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 6e9d07a7a..4b8c26708 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.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 651f4a900..fa4c88fdd 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3198--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index ac4dde170..a1a262459 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3198-develop + * secion v3.1.9.3200-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 78a3906bc..2d48180f1 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.9.3198-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3200-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 169d0fe07c69339d7b1bc5ca4965c307cdcb7f3c Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Sun, 22 Sep 2019 12:25:18 +0100 Subject: [PATCH 11/50] Changed names on internal columns in cursor & object compare. Columns: - ITEM_DATA - DATA_ID - ITEM_NO - DUP_NO - POSITION Can now be safely used in cursors. Resolves #997 Added delete on DIFF temp tables after cursor / object compare. Resolves #998 --- .../data_values/ut_compound_data_helper.pkb | 54 ++++++++++--------- .../expectations/test_expectations_cursor.pkb | 45 ++++++++++++++++ .../expectations/test_expectations_cursor.pks | 8 ++- 3 files changed, 80 insertions(+), 27 deletions(-) diff --git a/source/expectations/data_values/ut_compound_data_helper.pkb b/source/expectations/data_values/ut_compound_data_helper.pkb index 575568641..d7c0aab76 100644 --- a/source/expectations/data_values/ut_compound_data_helper.pkb +++ b/source/expectations/data_values/ut_compound_data_helper.pkb @@ -28,46 +28,46 @@ create or replace package body ut_compound_data_helper is with exp as ( select ucd.*, - {:duplicate_number:} dup_no + {:duplicate_number:} "UT3$_Dup#No" from ( select - ucd.item_data - ,x.data_id data_id - ,position + x.item_no item_no + ucd."UT3$_Item#Data" + ,x.data_id "UT3$_Data#Id" + ,ucd."UT3$_Position#" + x.item_no "UT3$_Item#No" {:columns:} from ut_compound_data_tmp x, xmltable('/ROWSET/ROW' passing x.item_data columns - item_data xmltype path '*' - ,position for ordinality + "UT3$_Item#Data" xmltype path '*' + ,"UT3$_Position#" for ordinality {:xml_to_columns:} ) ucd - where data_id = :exp_guid + where x.data_id = :exp_guid ) ucd ) , act as ( select ucd.*, - {:duplicate_number:} dup_no + {:duplicate_number:} "UT3$_Dup#No" from ( select - ucd.item_data - ,x.data_id data_id - ,position + x.item_no item_no + ucd."UT3$_Item#Data" + ,x.data_id "UT3$_Data#Id" + ,ucd."UT3$_Position#" + x.item_no "UT3$_Item#No" {:columns:} from ut_compound_data_tmp x, xmltable('/ROWSET/ROW' passing x.item_data columns - item_data xmltype path '*' - ,position for ordinality + "UT3$_Item#Data" xmltype path '*' + ,"UT3$_Position#" for ordinality {:xml_to_columns:} ) ucd - where data_id = :act_guid + where x.data_id = :act_guid ) ucd ) select - a.item_data as act_item_data, - a.data_id act_data_id, - e.item_data as exp_item_data, - e.data_id exp_data_id, + a."UT3$_Item#Data" as act_item_data, + a."UT3$_Data#Id" act_data_id, + e."UT3$_Item#Data" as exp_item_data, + e."UT3$_Data#Id" exp_data_id, {:item_no:} as item_no, - nvl(e.dup_no,a.dup_no) dup_no + nvl(e."UT3$_Dup#No",a."UT3$_Dup#No") dup_no from act a {:join_type:} exp e on ( {:join_condition:} ) where {:where_condition:}]'; @@ -306,16 +306,16 @@ create or replace package body ut_compound_data_helper is a_join_by_stmt := 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.dup_no = a.dup_no and '||ut_utils.table_to_clob(l_equal_list, ' and '); + a_join_by_stmt := ' e."UT3$_Dup#No" = a."UT3$_Dup#No" and '||ut_utils.table_to_clob(l_equal_list, ' and '); else -- Else join on rownumber - a_join_by_stmt := 'a.item_no = e.item_no '; + a_join_by_stmt := 'a."UT3$_Item#No" = e."UT3$_Item#No" '; end if; a_not_equal_stmt := ut_utils.table_to_clob(l_not_equal_list, ' or '); else --Partition by piece when no data ut_utils.append_to_clob(a_partition_stmt,' 1 '); - a_join_by_stmt := 'a.item_no = e.item_no '; + a_join_by_stmt := 'a."UT3$_Item#No" = e."UT3$_Item#No" '; end if; end; @@ -349,8 +349,8 @@ create or replace package body ut_compound_data_helper is begin return case - when a_unordered then 'row_number() over ( order by nvl(e.item_no,a.item_no))' - else 'nvl(e.item_no,a.item_no) ' + when a_unordered then 'row_number() over ( order by nvl(e."UT3$_Item#No",a."UT3$_Item#No"))' + else 'nvl(e."UT3$_Item#No",a."UT3$_Item#No") ' end; end; @@ -387,9 +387,9 @@ create or replace package body ut_compound_data_helper is end if; --If its inclusion we expect a actual set to fully match and have no extra elements over expected if a_inclusion_type then - ut_utils.append_to_clob(l_where_stmt,case when a_is_negated then ' 1 = 1 ' else ' ( a.data_id is null ) ' end); + ut_utils.append_to_clob(l_where_stmt,case when a_is_negated then ' 1 = 1 ' else ' ( a."UT3$_Data#Id" is null ) ' end); else - ut_utils.append_to_clob(l_where_stmt,' (a.data_id is null or e.data_id is null) '); + ut_utils.append_to_clob(l_where_stmt,' (a."UT3$_Data#Id" is null or e."UT3$_Data#Id" is null) '); end if; l_compare_sql := replace(l_compare_sql,'{:where_condition:}',l_where_stmt); @@ -561,6 +561,8 @@ create or replace package body ut_compound_data_helper is procedure cleanup_diff is begin g_diff_count := 0; + delete from ut_compound_data_diff_tmp; + delete from ut_json_data_diff_tmp; end; function get_rows_diff_count return integer is diff --git a/test/ut3_user/expectations/test_expectations_cursor.pkb b/test/ut3_user/expectations/test_expectations_cursor.pkb index dc439e7e0..1c6f46532 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pkb +++ b/test/ut3_user/expectations/test_expectations_cursor.pkb @@ -2825,5 +2825,50 @@ Check the query and data for errors.'; $end end; + procedure compare_specific_column_names is + function get_cursor return sys_refcursor is + l_result sys_refcursor; + begin + open l_result for + select 'a' as item_data, rownum as data_id, rownum as item_no, rownum as dup_no, rownum as position from dual; + return l_result; + end; + begin + ut3.ut.expect(get_cursor()).to_equal(get_cursor()); + ut3.ut.expect(get_cursor()).to_equal(get_cursor()).unordered(); + ut3.ut.expect(get_cursor()).to_equal(get_cursor()).join_by('ITEM_DATA,DATA_ID,ITEM_NO,DUP_NO'); + --Assert + ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0); + end; + + procedure multiple_cursor_expectations is + l_actual sys_refcursor; + l_expected sys_refcursor; + begin + open l_actual for select rownum rn from dual connect by level < 5; + open l_expected for select rownum rn from dual connect by level = 1; + ut3.ut.expect(l_actual).to_equal(l_expected); + open l_actual for select rownum rn from dual connect by level < 3; + open l_expected for select * from (select rownum rn from dual connect by level < 3) order by 1 desc; + ut3.ut.expect(l_actual).to_equal(l_expected); + ut.expect(ut3_tester_helper.main_helper.get_failed_expectations(1)).to_equal( +'Actual: refcursor [ count = 4 ] was expected to equal: refcursor [ count = 1 ] +Diff: +Rows: [ 3 differences ] + Row No. 2 - Extra: 2 + Row No. 3 - Extra: 3 + Row No. 4 - Extra: 4' + ); + ut.expect(ut3_tester_helper.main_helper.get_failed_expectations(2)).to_equal( +'Actual: refcursor [ count = 2 ] was expected to equal: refcursor [ count = 2 ] +Diff: +Rows: [ 2 differences ] + Row No. 1 - Actual: 1 + Row No. 1 - Expected: 2 + Row No. 2 - Actual: 2 + Row No. 2 - Expected: 1' + ); + end; + end; / diff --git a/test/ut3_user/expectations/test_expectations_cursor.pks b/test/ut3_user/expectations/test_expectations_cursor.pks index 82fc47f3c..d3dbeb9a7 100644 --- a/test/ut3_user/expectations/test_expectations_cursor.pks +++ b/test/ut3_user/expectations/test_expectations_cursor.pks @@ -462,8 +462,14 @@ create or replace package test_expectations_cursor is --%test( Mixed column order exclusion ) procedure uc_columns_exclude; - --%test(Compares cursors with long column names - Issue #952 ) + --%test( Compares cursors with long column names - Issue #952 ) procedure compare_long_column_names; + --%test( Compares cursors with specific column names - Issue #997 ) + procedure compare_specific_column_names; + + --%test( Multiple failures reported correctly - Issue #998 ) + procedure multiple_cursor_expectations; + end; / From ba6243bdc49cf95c16fc87dba54616213d8e4f30 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 23 Sep 2019 19:54:21 +0000 Subject: [PATCH 12/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index cac2070a3..e49dfa1bc 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 656a6b644..b76950338 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 7eb424cfa..8fbf1b75b 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 490af7126..ef3112e09 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index dc10e1cab..de477f45b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index a70f251b1..7438fb3e0 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index ba2783348..1825a2b17 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 4093037d6..376fbe7fe 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 27543d243..319b81688 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 569f53461..82ebfd7e8 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index b707d0e17..92a1b463b 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 829ede576..7e11fe01f 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 11a7b8024..c1de96f3e 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 2e5e3016e..ee203672d 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 6eb712972..6e65d276a 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 4b8c26708..772fd7169 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.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index fa4c88fdd..e01ee15aa 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3200--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index a1a262459..a2d2eb324 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3200-develop + * secion v3.1.9.3204-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 2d48180f1..bbb9567ce 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.9.3200-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3204-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 41ef9bbd585106a07a2bc84a5ee508c679a49855 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Fri, 27 Sep 2019 08:28:57 +0100 Subject: [PATCH 13/50] Fixed test dependency. Resolves #968 --- test/ut3_tester_helper/coverage_helper.pkb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/ut3_tester_helper/coverage_helper.pkb b/test/ut3_tester_helper/coverage_helper.pkb index 74a33da54..1db078a8b 100644 --- a/test/ut3_tester_helper/coverage_helper.pkb +++ b/test/ut3_tester_helper/coverage_helper.pkb @@ -20,12 +20,6 @@ create or replace package body coverage_helper is return v_result; end; - procedure setup_mock_coverage_id is - begin - g_profiler_run_id := get_mock_proftab_run_id(); - ut3.ut_coverage.mock_coverage_id(g_profiler_run_id, ut3.ut_coverage.gc_proftab_coverage); - end; - procedure setup_mock_coverage_ids(a_profiler_run_id integer, a_block_run_id integer) is l_coverage_ids ut3.ut_coverage.tt_coverage_id_arr; begin @@ -34,6 +28,13 @@ create or replace package body coverage_helper is ut3.ut_coverage.mock_coverage_id(l_coverage_ids); end; + procedure setup_mock_coverage_id is + begin + g_profiler_run_id := get_mock_proftab_run_id(); + g_block_run_id := get_mock_block_run_id(); + setup_mock_coverage_ids(g_profiler_run_id, g_block_run_id); + end; + procedure setup_dummy_coverage is pragma autonomous_transaction; begin From 14b624315398774c4f918996d09be0f75f278670 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Fri, 27 Sep 2019 08:40:20 +0100 Subject: [PATCH 14/50] Fixed issue with stack parsing on Windows install of utPLSQL Resolves #1000 --- source/core/ut_expectation_processor.pkb | 2 +- .../test_expectation_processor.pkb | 38 ++++++++++++++++++- .../test_expectation_processor.pks | 3 ++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/source/core/ut_expectation_processor.pkb b/source/core/ut_expectation_processor.pkb index 0c2580220..d65d210c8 100644 --- a/source/core/ut_expectation_processor.pkb +++ b/source/core/ut_expectation_processor.pkb @@ -163,7 +163,7 @@ create or replace package body ut_expectation_processor as end; function cut_address_columns( a_stack varchar2 ) return varchar2 is begin - return regexp_replace( a_stack, '^(0x)?[0-9a-f]+\s+', '', 1, 0, 'm' ); + return regexp_replace( a_stack, '^(0x)?[0-9a-f]+\s+', '', 1, 0, 'mi' ); end; function cut_framework_stack( a_stack varchar2 ) return varchar2 is begin diff --git a/test/ut3_tester/core/expectations/test_expectation_processor.pkb b/test/ut3_tester/core/expectations/test_expectation_processor.pkb index ab413616e..c061e55d4 100644 --- a/test/ut3_tester/core/expectations/test_expectation_processor.pkb +++ b/test/ut3_tester/core/expectations/test_expectation_processor.pkb @@ -11,7 +11,7 @@ create or replace package body test_expectation_processor is handle number name 34f88e4420 124 package body SCH_TEST.UT_EXPECTATION_PROCESSOR 353dfeb2f8 26 SCH_TEST.UT_EXPECTATION_RESULT -cba249ce0 112 SCH_TEST.UT_EXPECTATION +cba2493ce0 112 SCH_TEST.UT_EXPECTATION 3539881cf0 21 SCH_TEST.UT_EXPECTATION_NUMBER 351a608008 7 package body ]'||gc_user||q'[.TEST_EXPECTATION_PROCESSOR 351a608018 12 package body ]'||gc_user||q'[.TEST_EXPECTATION_PROCESSOR @@ -24,7 +24,7 @@ cba249ce0 112 SCH_TEST.UT_EXPECTATION 34f8ab98f0 48 SCH_TEST.UT_SUITE_ITEM 34f8ab9b10 74 SCH_TEST.UT_SUITE 34f8ab98f0 48 SCH_TEST.UT_SUITE_ITEM -cba24bfd0 75 SCH_TEST.UT_LOGICAL_SUITE +cba24bfad0 75 SCH_TEST.UT_LOGICAL_SUITE 353dfecf30 59 SCH_TEST.UT_RUN 34f8ab98f0 48 SCH_TEST.UT_SUITE_ITEM 357f5421e8 77 package body SCH_TEST.UT_RUNNER @@ -67,5 +67,39 @@ at "'||gc_user||'.TEST_EXPECTATION_PROCESSOR", line 24'); ).to_be_like('at "UT3.UT_EXAMPLETEST", line 20 %'); end; + procedure who_call_expectation_win_stack is + l_stack_trace varchar2(4000); + l_source_line varchar2(4000); + begin + l_stack_trace := q'[----- PL/SQL Call Stack ----- +object line object +handle number name +00007FF8547B7D30 124 package body SCH_TEST.UT_EXPECTATION_PROCESSOR +00007FF8547B7D30 26 SCH_TEST.UT_EXPECTATION_RESULT +00007FF8547B7D30 112 SCH_TEST.UT_EXPECTATION +00007FF8547B7D30 21 SCH_TEST.UT_EXPECTATION_NUMBER +00007FF8547B7D30 7 package body SCOTT.TEST_BETWNSTR.BASIC_USAGE +00007FF81FF207B0 345 type body SCOTT.TEST_BETWNSTR.BASIC_USAGE_TYP +00007FF8544B21B8 6 anonymous block +00007FF8267FBFC8 1721 package body SYS.DBMS_SQL.EXECUTE +00007FF852BCFC68 142 type body UT3.UT_EXECUTABLE.DO_EXECUTE +00007FF852BCFC68 44 type body UT3.UT_EXECUTABLE.DO_EXECUTE +00007FF8512F9A90 74 type body UT3.UT_EXECUTABLE_TEST.DO_EXECUTE +00007FF8512F9A90 38 type body UT3.UT_EXECUTABLE_TEST.DO_EXECUTE +00007FF8231A2088 79 type body UT3.UT_TEST.DO_EXECUTE +00007FF81FF207B0 49 type body UT3.UT_SUITE_ITEM.DO_EXECUTE +00007FF852C83270 66 type body UT3.UT_SUITE.DO_EXECUTE +00007FF82165F3B0 67 type body UT3.UT_RUN.DO_EXECUTE +00007FF81FF207B0 49 type body UT3.UT_SUITE_ITEM.DO_EXECUTE +00007FF8266285C0 172 package body UT3.UT_RUNNER.RUN +00007FF854710538 134 package body UT3.UT.RUN_AUTONOMOUS +00007FF854710538 488 package body UT3.UT.RUN +00007FF854710538 623 package body UT3.UT.RUN +00007FF81CFFA388 1 anonymous block]'; + ut.expect( + ut3.ut_expectation_processor.who_called_expectation(l_stack_trace) + ).to_be_like('at "SCOTT.TEST_BETWNSTR.BASIC_USAGE", line 7 %'); + end; + end; / diff --git a/test/ut3_tester/core/expectations/test_expectation_processor.pks b/test/ut3_tester/core/expectations/test_expectation_processor.pks index 73cf60d11..6087eb045 100644 --- a/test/ut3_tester/core/expectations/test_expectation_processor.pks +++ b/test/ut3_tester/core/expectations/test_expectation_processor.pks @@ -14,6 +14,9 @@ create or replace package test_expectation_processor is --%test(parses stack trace and returns objects and line that called expectation) procedure who_called_expectation; + --%test(parses stack trace for Windows DB os - regression for #1000) + procedure who_call_expectation_win_stack; + --%endcontext end; From 2f89527e4b3447e35b9affc006c2a8f45f7023e7 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 28 Sep 2019 00:28:28 +0000 Subject: [PATCH 15/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index e49dfa1bc..522b4a66b 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index b76950338..7cb44d258 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 8fbf1b75b..5e2518fa3 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index ef3112e09..9d75e9e44 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index de477f45b..ebd934948 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 7438fb3e0..0d3240a32 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 1825a2b17..664bcfdb0 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 376fbe7fe..31c75489a 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 319b81688..8d39ddca8 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 82ebfd7e8..8bc06049f 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 92a1b463b..9ea7a51fa 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 7e11fe01f..4d3b77711 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index c1de96f3e..69b3b2127 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index ee203672d..3dfd1d3fb 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 6e65d276a..84b5cdaf6 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 772fd7169..ce88c7889 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.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index e01ee15aa..bef70d5f7 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3204--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index a2d2eb324..d91c5e41d 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3204-develop + * secion v3.1.9.3211-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index bbb9567ce..14cb595fb 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.9.3204-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3211-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 48a3f9ed6d63f20ce525e74965c0dfe27aff5969 Mon Sep 17 00:00:00 2001 From: pesse Date: Fri, 11 Oct 2019 17:03:21 +0200 Subject: [PATCH 16/50] Make "Version 2 to 3 comparison" an actual section in readme --- readme.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/readme.md b/readme.md index 315124db6..b0401647f 100644 --- a/readme.md +++ b/readme.md @@ -168,12 +168,25 @@ To sign up to the chat use [this link](http://utplsql-slack-invite.herokuapp.com ---------- [__Authors__](docs/about/authors.md) + +---------- +__Project Directories__ + +* .travis - contains files needed for travis-ci integration +* client_source - Sources to be used on the client-side. Developer workstation or CI platform to run the tests. +* development - Set of useful scripts and utilities for development and debugging of utPLSQL +* docs - Documentation of the project +* examples - Example source code and unit tests +* source - The installation code for utPLSQL +* tests - Tests for utPLSQL framework + ---------- -__Version 2 to Version 3 Comparison__ If you have a great feature in mind, that you would like to see in utPLSQL v3 please create an [issue on GitHub](https://github.com/utPLSQL/utPLSQL/issues) or discuss it with us in the [Slack chat rooms](http://utplsql-slack-invite.herokuapp.com/). +# Version 2 to Version 3 Comparison + | Feature | Version 2 | Version 3 | | -------------------------------------- | ---------------------- | ---------------------- | | Easy to install | Yes | Yes | @@ -224,19 +237,6 @@ If you have a great feature in mind, that you would like to see in utPLSQL v3 pl 3 Test execution comparison is in a single call so the results are combined. We know it was always possible to group in any way with multiple calls. But that may not be desired under a CI system where you want a single JUnit XML Output. - ----------- -__Project Directories__ - -* .travis - contains files needed for travis-ci integration -* client_source - Sources to be used on the client-side. Developer workstation or CI platform to run the tests. -* development - Set of useful scripts and utilities for development and debugging of utPLSQL -* docs - Documentation of the project -* examples - Example source code and unit tests -* source - The installation code for utPLSQL -* tests - Tests for utPLSQL framework - ------------ # Supporters The utPLSQL project is community-driven and is not commercially motivated. Nonetheless, donations and other contributions are always welcome, and are detailed below. From f8a3b87014aa5fd71b858dbd51ce7f60c9973aba Mon Sep 17 00:00:00 2001 From: pesse Date: Fri, 11 Oct 2019 17:14:07 +0200 Subject: [PATCH 17/50] Outsource the Version comparison to a separate file so it can be directly linked --- docs/compare_version2_to_3.md | 56 +++++++++++++++++++++++++++++++++++ docs/index.md | 1 + readme.md | 50 +------------------------------ 3 files changed, 58 insertions(+), 49 deletions(-) create mode 100644 docs/compare_version2_to_3.md diff --git a/docs/compare_version2_to_3.md b/docs/compare_version2_to_3.md new file mode 100644 index 000000000..624bf0df8 --- /dev/null +++ b/docs/compare_version2_to_3.md @@ -0,0 +1,56 @@ +For version 3 has been a complete rewrite of the framework, the way it can be used is different to +the previous versions, but also more in line with other modern unit-testing frameworks like JUnit and RSpec. + +There is a [migration tool](https://github.com/utPLSQL/utPLSQL-v2-v3-migration) that can help you to migrate your existing utPLSQL v2 tests to the v3 capabilities. + +# Feature comparison + +| Feature | Version 2 | Version 3 | +| -------------------------------------- | ---------------------- | ---------------------- | +| Easy to install | Yes | Yes | +| Documentation | Yes | Yes | +| License | GPL v2 | Apache 2.0 | +| **Tests Creation** | | | +| Declarative test configuration | No | Yes - Annotations1| +| Tests as Packages | Yes | Yes | +| Multiple Tests in a single Package | Yes | Yes | +| Optional Setup/Teardown | No | Yes | +| Different Setup/Teardown
For Each Test in a Single Package| No | Yes - Annotations1 | +| Suite Definition Storage | Tables | Package - Annotations1 | +| Multiple Suites | Yes | Yes | +| Suites can contain Suites | No | Yes | +| Automatic Test detection | No | Yes - Annotations1| +| Unconstrained naming of Test packages | No - prefixes | Yes - name not relevant| +| Require Prefix on Test procedures | No - prefixes | Yes - name not relevant| +| Auto Compilation of Tests | Yes | No (Let us know if you use this) | +| Assertion Library | 30 assertions2 | 26 matchers (13 + 13 negated) | +| Extendable assertions | No | Yes - custom matchers | +| PLSQL Record Assertions | generated code through **utRecEq** Package | [possible on Oracle 12c+](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](docs/userguide/expectations.md#comparing-cursors)| +| Test Skeleton Generation | Yes | No (Let us know if you use this) | +| **Test Execution3** | | | +| Single Test Package Execution | Yes | Yes | +| Single Test Procedure Execution | No | Yes | +| Test Suite Execution | Yes | Yes | +| Subset of Suite Execution | No | Yes | +| Multiple Suite Execution | No | Yes | +| Organizing Suites into hierarchies | No | Yes | +| **Code Coverage Reporting** | No | Yes | +| Html Coverage Report | No | Yes | +| Sonar XML Coverage Report | No | Yes | +| Coveralls Json Coverage Report | No | Yes | +| Framework Transaction Control | No | Yes - Annotations1 | +| **Test Output** | | | +| Real-time test execution progress reporting | No | Yes | +| Multiple Output Reporters can be used during test execution | No| Yes | +| DBMS_OUTPUT | Yes | Yes (clean formatting) | +| File | Yes (to db server only)| Yes (on client side) | +| Stored in Table | Yes | No (can be added as custom reporter) | +| XUnit format support | No | Yes | +| HTML Format | Yes | No | +| Custom Output reporter | Yes-needs configuration| Yes - no config needed | + +1 Annotations are specially formatted comments in your package specification. This enables *declarative* test configuration that is coupled with the source code. See Documentation for more details. + +2 **utAssert2** package - Contains 59 Assertions - 2 Not implemented = 57, 28 are duplicated only change on outcome_in parameter 57-28 = 29, **utPipe** package - Contains 1 Assertion 29 + 1 = 30 + +3 Test execution comparison is in a single call so the results are combined. We know it was always possible to group in any way with multiple calls. But that may not be desired under a CI system where you want a single JUnit XML Output. diff --git a/docs/index.md b/docs/index.md index ebd934948..acc3c4861 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,6 +25,7 @@ The framework follows industry standards and best patterns of modern Unit Testin - [License](about/license.md) - [Support](about/support.md) - [Authors](about/authors.md) + - [Version 2 to Version 3 Comparison](compare_version2_to_3.md) # Demo project diff --git a/readme.md b/readme.md index b0401647f..864e1041e 100644 --- a/readme.md +++ b/readme.md @@ -187,55 +187,7 @@ If you have a great feature in mind, that you would like to see in utPLSQL v3 pl # Version 2 to Version 3 Comparison -| Feature | Version 2 | Version 3 | -| -------------------------------------- | ---------------------- | ---------------------- | -| Easy to install | Yes | Yes | -| Documentation | Yes | Yes | -| License | GPL v2 | Apache 2.0 | -| **Tests Creation** | | | -| Declarative test configuration | No | Yes - Annotations1| -| Tests as Packages | Yes | Yes | -| Multiple Tests in a single Package | Yes | Yes | -| Optional Setup/Teardown | No | Yes | -| Different Setup/Teardown
For Each Test in a Single Package| No | Yes - Annotations1 | -| Suite Definition Storage | Tables | Package - Annotations1 | -| Multiple Suites | Yes | Yes | -| Suites can contain Suites | No | Yes | -| Automatic Test detection | No | Yes - Annotations1| -| Unconstrained naming of Test packages | No - prefixes | Yes - name not relevant| -| Require Prefix on Test procedures | No - prefixes | Yes - name not relevant| -| Auto Compilation of Tests | Yes | No (Let us know if you use this) | -| Assertion Library | 30 assertions2 | 26 matchers (13 + 13 negated) | -| Extendable assertions | No | Yes - custom matchers | -| PLSQL Record Assertions | generated code through **utRecEq** Package | [possible on Oracle 12c+](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](docs/userguide/expectations.md#comparing-cursors)| -| Test Skeleton Generation | Yes | No (Let us know if you use this) | -| **Test Execution3** | | | -| Single Test Package Execution | Yes | Yes | -| Single Test Procedure Execution | No | Yes | -| Test Suite Execution | Yes | Yes | -| Subset of Suite Execution | No | Yes | -| Multiple Suite Execution | No | Yes | -| Organizing Suites into hierarchies | No | Yes | -| **Code Coverage Reporting** | No | Yes | -| Html Coverage Report | No | Yes | -| Sonar XML Coverage Report | No | Yes | -| Coveralls Json Coverage Report | No | Yes | -| Framework Transaction Control | No | Yes - Annotations1 | -| **Test Output** | | | -| Real-time test execution progress reporting | No | Yes | -| Multiple Output Reporters can be used during test execution | No| Yes | -| DBMS_OUTPUT | Yes | Yes (clean formatting) | -| File | Yes (to db server only)| Yes (on client side) | -| Stored in Table | Yes | No (can be added as custom reporter) | -| XUnit format support | No | Yes | -| HTML Format | Yes | No | -| Custom Output reporter | Yes-needs configuration| Yes - no config needed | - -1 Annotations are specially formatted comments in your package specification. This enables *declarative* test configuration that is coupled with the source code. See Documentation for more details. - -2 **utAssert2** package - Contains 59 Assertions - 2 Not implemented = 57, 28 are duplicated only change on outcome_in parameter 57-28 = 29, **utPipe** package - Contains 1 Assertion 29 + 1 = 30 - -3 Test execution comparison is in a single call so the results are combined. We know it was always possible to group in any way with multiple calls. But that may not be desired under a CI system where you want a single JUnit XML Output. +[Version 2 to Version 3 Comparison](docs/compare_version2_to_3.md) # Supporters From 40badacae3f13163a28db55c522e60e7b280f62d Mon Sep 17 00:00:00 2001 From: pesse Date: Fri, 11 Oct 2019 17:58:54 +0200 Subject: [PATCH 18/50] Describe the usage of tags in the "Running"-section Fixes #1003 --- docs/userguide/running-unit-tests.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index ce88c7889..3e6ce8547 100644 --- a/docs/userguide/running-unit-tests.md +++ b/docs/userguide/running-unit-tests.md @@ -282,6 +282,23 @@ select * from table(ut.run('hr.test_apply_bonus', a_random_test_order_seed => 30 **Note** >Random order seed must be a positive number within range of 1 .. 1 000 000 000. +# Run by Tags + +In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test with the `--%tags`-annotation. +Multiple tags are separated by comma. If multiple tags are set, all tests with __any__ of them specified are run. + +Example Procedure: +```sql +begin + ut.run('hr.test_apply_bonus', a_tags => 'test1,test2'); +end; +``` +Example Function: +```sql +select * from table(ut.run('hr.test_apply_bonus', a_tags => 'suite1')) +``` + + # Keeping uncommitted data after test-run utPLSQL by default runs tests in autonomous transaction and performs automatic rollback to assure that tests do not impact one-another and do not have impact on the current session in your IDE. From 4cfb0cf8c552c6d087a250d1ba91664f508c3e49 Mon Sep 17 00:00:00 2001 From: pesse Date: Fri, 11 Oct 2019 18:01:34 +0200 Subject: [PATCH 19/50] Add link to Tag-annotation and tweak for consistency --- docs/userguide/running-unit-tests.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 3e6ce8547..a1535bc73 100644 --- a/docs/userguide/running-unit-tests.md +++ b/docs/userguide/running-unit-tests.md @@ -284,16 +284,14 @@ select * from table(ut.run('hr.test_apply_bonus', a_random_test_order_seed => 30 # Run by Tags -In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test with the `--%tags`-annotation. +In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test with the `--%tags`-annotation ([Read more](annotations.md#tags)). Multiple tags are separated by comma. If multiple tags are set, all tests with __any__ of them specified are run. -Example Procedure: ```sql begin ut.run('hr.test_apply_bonus', a_tags => 'test1,test2'); end; ``` -Example Function: ```sql select * from table(ut.run('hr.test_apply_bonus', a_tags => 'suite1')) ``` From d7c3a2f91b3b8e77f6f05850469b68c04ed26e32 Mon Sep 17 00:00:00 2001 From: pesse Date: Fri, 11 Oct 2019 18:10:20 +0200 Subject: [PATCH 20/50] Just trying to replace Java 9 with Java 11 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e9d94ccf..cf6c9be74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,9 @@ addons: apt: packages: - unzip - # Java9 Required for Sonar and SQLCL - - oracle-java9-installer - - oracle-java9-set-default + # Java9+ Required for Sonar and SQLCL + - oracle-java11-installer + - oracle-java11-set-default sonarcloud: organization: utplsql token: From 0506cf16fb6628fb0c6b15b16f64faaae19f3846 Mon Sep 17 00:00:00 2001 From: pesse Date: Mon, 14 Oct 2019 08:53:53 +0200 Subject: [PATCH 21/50] Trying with OpenJDK instead --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cf6c9be74..67f9db5f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,7 @@ addons: packages: - unzip # Java9+ Required for Sonar and SQLCL - - oracle-java11-installer - - oracle-java11-set-default + - openjdk-9-jre-headless sonarcloud: organization: utplsql token: From 4252647ec6a2ca65a44a10cdf7e0148072f83fae Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Sun, 20 Oct 2019 13:10:46 +0100 Subject: [PATCH 22/50] Update cli version to 3.1.7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67f9db5f8..eaa76047e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ env: #utPLSQL released version directory - UTPLSQL_DIR="utPLSQL_latest_release" - SELFTESTING_BRANCH=${TRAVIS_BRANCH} - - UTPLSQL_CLI_VERSION="3.1.6" + - UTPLSQL_CLI_VERSION="3.1.7" # Maven - MAVEN_HOME=/usr/local/maven - MAVEN_CFG=$HOME/.m2 From cdd7febf73aba4560b1ad95144e1ff38275effd4 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sun, 20 Oct 2019 12:59:16 +0000 Subject: [PATCH 23/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 522b4a66b..f3ad589a7 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 7cb44d258..5d2ce212e 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 5e2518fa3..7bce22221 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 9d75e9e44..2ecaf6b9d 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index ebd934948..ec919ecf0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 0d3240a32..940afbcf3 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 664bcfdb0..145d9e968 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 31c75489a..eb433554d 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 8d39ddca8..43aac6a78 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 8bc06049f..db8c25d02 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 9ea7a51fa..c3e7d7401 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 4d3b77711..3eb6179f5 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 69b3b2127..2ee30cb8b 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 3dfd1d3fb..7363f8e79 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 84b5cdaf6..2a2c61776 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index ce88c7889..280778636 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.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index bef70d5f7..727a748b7 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3211--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index d91c5e41d..30ff0f98e 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3211-develop + * secion v3.1.9.3226-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 14cb595fb..0896349cb 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.9.3211-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3226-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From afca2482fbb59820709283373107d48c5df808a5 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 21 Oct 2019 00:31:45 +0100 Subject: [PATCH 24/50] Fixed broken doc link --- docs/compare_version2_to_3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/compare_version2_to_3.md b/docs/compare_version2_to_3.md index 624bf0df8..5f53e41d4 100644 --- a/docs/compare_version2_to_3.md +++ b/docs/compare_version2_to_3.md @@ -25,7 +25,7 @@ There is a [migration tool](https://github.com/utPLSQL/utPLSQL-v2-v3-migration) | Auto Compilation of Tests | Yes | No (Let us know if you use this) | | Assertion Library | 30 assertions2 | 26 matchers (13 + 13 negated) | | Extendable assertions | No | Yes - custom matchers | -| PLSQL Record Assertions | generated code through **utRecEq** Package | [possible on Oracle 12c+](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](docs/userguide/expectations.md#comparing-cursors)| +| PLSQL Record Assertions | generated code through **utRecEq** Package | [possible on Oracle 12c+](https://oracle-base.com/articles/12c/using-the-table-operator-with-locally-defined-types-in-plsql-12cr1) using [cursor matchers](userguide/expectations.md#comparing-cursors)| | Test Skeleton Generation | Yes | No (Let us know if you use this) | | **Test Execution3** | | | | Single Test Package Execution | Yes | Yes | From cdb6d3e40653ab30e0628cb11ab19dd2c926b60a Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 21 Oct 2019 00:01:25 +0100 Subject: [PATCH 25/50] Added ability to exclude items by tags. Resolves #983 --- docs/userguide/annotations.md | 66 ++++-- source/core/ut_suite_builder.pkb | 24 +- source/core/ut_suite_cache_manager.pkb | 40 +++- test/ut3_tester/core/test_suite_builder.pkb | 62 ++++- test/ut3_tester/core/test_suite_builder.pks | 238 ++++++++++---------- test/ut3_user/api/test_ut_run.pkb | 42 ++++ test/ut3_user/api/test_ut_run.pks | 107 +++++---- 7 files changed, 371 insertions(+), 208 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 145d9e968..1d3f60d3c 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1225,11 +1225,11 @@ Finished in .035261 seconds ### Tags -Tag is a label attached to the test or a suite path. It is used for identification and execution a group of tests / suites that share same tag. +Tag is a label attached to the test or a suite. It is used for identification and execution a group of tests / suites that share same tag. -It allows us to group a tests / suites using a various categorization and place a test / suite in multiple buckets. Same tests can be group with other tests based on the functionality , frequency, type of output etc. +It allows for grouping of tests / suites using various categorization and place tests / suites in multiple buckets. Same tests can be grouped with other tests based on the functionality , frequency, type of output etc. -e.q. +e.g. ```sql --%tags(batch,daily,csv) @@ -1238,29 +1238,31 @@ e.q. or ```sql ---%tags(api,online,json) +--%tags(online,json) +--%tags(api) ``` +Tags are defined as a comma separated list within the `--%tags` annotation. +When executing a test run with tag filter applied, framework will find all tests associated with given tags and execute them. +Framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run. -Tags are defined as a coma separated list. When executing a test run with tag filter applied, framework will find all tests associated with given tags and execute them. Framework applies `OR` logic when resolving a tags so any tests / suites that match at least one tag will be included in the test run. +When a suite/context is tagged all of its children will automatically inherit a tag and get executed along with the parent. Parent suite tests are not executed, but a suitepath hierarchy is kept. -When a suite gets tagged all of its children will automatically inherit a tag and get executed along the parent. Parent suit tests are not executed. but a suitepath hierarchy is kept. - -Sample tag package. +Sample test suite package with tags. ```sql create or replace package ut_sample_test IS --%suite(Sample Test Suite) - --%tag(suite1) + --%tags(api) --%test(Compare Ref Cursors) - --%tag(test1,sample) + --%tags(complex,fast) procedure ut_refcursors1; --%test(Run equality test) - --%tag(test2,sample) + --%tags(simple,fast) procedure ut_test; end ut_sample_test; @@ -1290,28 +1292,42 @@ end ut_sample_test; Execution of the test is done by using a parameter `a_tags` ```sql -select * from table(ut.run(a_path => 'ut_sample_test',a_tags => 'suite1')); -select * from table(ut.run(a_tags => 'test1,test2')); -select * from table(ut.run(a_tags => 'sample')); +select * from table(ut.run(a_path => 'ut_sample_test',a_tags => 'api')); +``` +The above call will execute all tests from `ut_sample_test` package as the whole suite is tagged with `api` -begin - ut.run(a_path => 'ut_sample_test',a_tags => 'suite1'); -end; -/ +```sql +select * from table(ut.run(a_tags => 'complex')); +``` +The above call will execute only the `ut_sample_test.ut_refcursors1` test, as only the test `ut_refcursors1` is tagged with `complex` -exec ut.run('ut_sample_test', a_tags => 'sample'); +```sql +select * from table(ut.run(a_tags => 'fast')); ``` +The above call will execute both `ut_sample_test.ut_refcursors1` and `ut_sample_test.ut_test` tests, as both tests are tagged with `fast` + +#### Excluding tests/suites by tags +It is possible to exclude parts of test suites with tags. +In order to do so, prefix the tag name to exclude with a `-` (dash) sign when invoking the test run. +Examples (based on above sample test suite) -Tags should adhere to following rules: +```sql +select * from table(ut.run(a_tags => 'api,fast,-complex')); +``` +The above call will execute all suites/contexts/tests that are marked with any of tags `api` or `fast` except those suites/contexts/tests that are marked as `complex` +Given the above example package `ut_sample_test`, only `ut_sample_test.ut_test` will be executed. -- tags are case sensitive -- tags cannot be an empty string -- tags cannot contain spaces e.g. to create a multi-word `tag` please use underscores,dashes, dots etc. e.g. `test_of_batch` -- tags with empty spaces will be ignored during execution -- tags can contain special characters +**Note:** +Tags must follow the below naming convention: +- tag is case sensitive +- tag can contain special characters like `$#/\?-!` etc. +- tag cannot be an empty string +- tag cannot start with a dash e.g. `-some-stuff` is **not** a valid tag +- tag cannot contain spaces e.g. `test of batch`. To create a multi-word tag use underscores or dashes e.g. `test_of_batch`, `test-of-batch` +- leading and trailing spaces are ignored in tag name e.g. `--%tags( tag1 , tag2 )` becomes `tag1` and `tag2` tag names ### Suitepath diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 101ab2179..111b77cbd 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -321,7 +321,8 @@ create or replace package body ut_suite_builder is a_procedure_name t_object_name := null ) is l_annotation_pos binary_integer; - l_tag_list ut_varchar2_list := ut_varchar2_list(); + l_tags_list ut_varchar2_list := ut_varchar2_list(); + l_tag_items ut_varchar2_list; begin l_annotation_pos := a_tags_ann_text.first; while l_annotation_pos is not null loop @@ -331,14 +332,25 @@ create or replace package body ut_suite_builder is || get_object_reference( a_suite, a_procedure_name, l_annotation_pos ) ); else - l_tag_list := l_tag_list multiset union distinct ut_utils.trim_list_elements( - ut_utils.string_to_table(a_tags_ann_text(l_annotation_pos),',') - ); + l_tag_items := ut_utils.trim_list_elements(ut_utils.string_to_table(a_tags_ann_text(l_annotation_pos),',')); + if l_tag_items is not empty then + for i in 1 .. l_tag_items.count loop + if regexp_like(l_tag_items(i),'^[^-](\S)+$') then + l_tags_list.extend(); + l_tags_list(l_tags_list.last) := l_tag_items(i); + else + a_suite.put_warning( + 'Invalid value "'||l_tag_items(i)||'" for "--%tags" annotation. See documentation for details on valid tag values. Annotation value ignored.' + || get_object_reference( a_suite, a_procedure_name, l_annotation_pos ) + ); + end if; + end loop; + end if; end if; l_annotation_pos := a_tags_ann_text.next(l_annotation_pos); end loop; - --remove empty strings from table list e.g. tag1,,tag2 and conver to rows - a_list := ut_utils.convert_collection( ut_utils.filter_list(l_tag_list,ut_utils.gc_word_no_space) ); + --remove empty strings from table list e.g. tag1,,tag2 and convert to rows + a_list := ut_utils.convert_collection( ut_utils.filter_list(set(l_tags_list),ut_utils.gc_word_no_space) ); end; procedure set_seq_no( diff --git a/source/core/ut_suite_cache_manager.pkb b/source/core/ut_suite_cache_manager.pkb index ef12e1def..6b080f528 100644 --- a/source/core/ut_suite_cache_manager.pkb +++ b/source/core/ut_suite_cache_manager.pkb @@ -30,8 +30,8 @@ create or replace package body ut_suite_cache_manager is and ( {:path:} and {:object_name:} and {:procedure_name:} + ) ) - ) ), {:tags:} suitepaths as ( @@ -106,8 +106,8 @@ create or replace package body ut_suite_cache_manager is function get_path_sql(a_path in varchar2) return varchar2 is begin return case when a_path is not null then q'[ - :l_path||'.' like c.path || '.%' /*all children and self*/ - or ( c.path||'.' like :l_path || '.%' --all parents + :l_path||'.' like c.path || '.%' /*all parents and self*/ + or ( c.path||'.' like :l_path || '.%' /*all children and self*/ ]' else ' :l_path is null and ( :l_path is null ' end; end; @@ -129,22 +129,40 @@ create or replace package body ut_suite_cache_manager is function get_tags_sql(a_tags_count in integer) return varchar2 is begin return case when a_tags_count > 0 then - q'[filter_tags as ( + q'[included_tags as ( select c.obj.path as path from suite_items c - where c.obj.tags multiset intersect :a_tag_list is not empty - ), + where exists ( + select * from table(c.obj.tags) + intersect + select * from table(:a_tag_list) where column_value not like '-%' + ) + or 0 = (select count(*) from table(:a_tag_list) where column_value not like '-%') + ), + excluded_tags as ( + select c.obj.path as path + from suite_items c + where exists ( + select * from table(c.obj.tags) + intersect + select ltrim(column_value,'-') from table(:a_tag_list) where column_value like '-%' + ) + ), suite_items_tags as ( select c.* from suite_items c where exists ( - select 1 from filter_tags t - where t.path||'.' like c.obj.path || '.%' /*all children and self*/ - or c.obj.path||'.' like t.path || '.%' --all parents + select 1 from included_tags t + where t.path||'.' like c.obj.path || '.%' /*all parents and self*/ + or c.obj.path||'.' like t.path || '.%' /*all children and self*/ + ) + and not exists ( + select 1 from excluded_tags t + where c.obj.path||'.' like t.path || '.%' /*all children and self*/ ) ),]' else - q'[dummy as (select 'x' from dual where :a_tag_list is null ),]' + q'[dummy as (select 'x' from dual where :a_tag_list is null and :a_tag_list is null and :a_tag_list is null),]' end; end; @@ -216,7 +234,7 @@ create or replace package body ut_suite_cache_manager is execute immediate l_sql bulk collect into l_results - using upper(l_object_owner), l_path, l_path, upper(a_object_name), upper(a_procedure_name), l_tags, a_random_seed; + using upper(l_object_owner), l_path, l_path, upper(a_object_name), upper(a_procedure_name), l_tags, l_tags, l_tags, a_random_seed; return l_results; end; diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index b49ecb2da..5f8b66ba8 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -1431,7 +1431,67 @@ create or replace package body test_suite_builder is '%%' ); - end; + end; + + procedure test_spaces_in_tag is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(2, 'suite','testsuite', null), + ut3.ut_annotation(3, 'tags',' good_tag , bad tag , good-tag ', null), + ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3.ut_annotation(9, 'tags',' good_tag , bad tag , good-tag ', 'test_procedure') + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%good_taggood-tag%'|| + 'good_taggood-tag%' + ); + ut.expect(l_actual).to_be_like( + '%Invalid value "bad tag" for "--%tags" annotation.'|| + ' See documentation for details on valid tag values. Annotation value ignored. +at package "UT3_TESTER.SOME_PACKAGE", line 3%' + ); + ut.expect(l_actual).to_be_like( + '%Invalid value "bad tag" for "--%tags" annotation.'|| + ' See documentation for details on valid tag values. Annotation value ignored. +at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' + ); + end; + + procedure test_minus_in_tag is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(2, 'suite','testsuite', null), + ut3.ut_annotation(3, 'tags',' good_tag , -invalid_tag , good-tag ', null), + ut3.ut_annotation(8, 'test','Some test', 'test_procedure'), + ut3.ut_annotation(9, 'tags',' good_tag , -invalid_tag , good-tag ', 'test_procedure') + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%good_taggood-tag%'|| + 'good_taggood-tag%' + ); + ut.expect(l_actual).to_be_like( + '%Invalid value "-invalid_tag" for "--%tags" annotation.'|| + ' See documentation for details on valid tag values. Annotation value ignored. +at package "UT3_TESTER.SOME_PACKAGE", line 3%' + ); + ut.expect(l_actual).to_be_like( + '%Invalid value "-invalid_tag" for "--%tags" annotation.'|| + ' See documentation for details on valid tag values. Annotation value ignored. +at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' + ); + end; end test_suite_builder; / diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index 721db153f..fdf10b38d 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -5,218 +5,224 @@ create or replace package test_suite_builder is --%context(suite) --%displayname(--%suite annotation) - --%test(Sets suite name from package name and leaves description empty) - procedure no_suite_description; + --%test(Sets suite name from package name and leaves description empty) + procedure no_suite_description; - --%test(Sets suite description using first --%suite annotation) - procedure suite_description_from_suite; + --%test(Sets suite description using first --%suite annotation) + procedure suite_description_from_suite; - --%test(Gives warning if more than one --%suite annotation used) - procedure suite_annot_duplicated; + --%test(Gives warning if more than one --%suite annotation used) + procedure suite_annot_duplicated; --%endcontext --%context(displayname) --%displayname(--%displayname annotation) - --%test(Overrides suite description using first --%displayname annotation) - procedure suite_descr_from_displayname; + --%test(Overrides suite description using first --%displayname annotation) + procedure suite_descr_from_displayname; - --%test(Gives warning if more than one --%displayname annotation used) - procedure displayname_annot_duplicated; + --%test(Gives warning if more than one --%displayname annotation used) + procedure displayname_annot_duplicated; - --%test(Gives warning if --%displayname annotation has no value) - procedure displayname_annot_empty; + --%test(Gives warning if --%displayname annotation has no value) + procedure displayname_annot_empty; --%endcontext --%context(test) --%displayname(--%test annotation) - --%test(Creates a test item for procedure annotated with --%test annotation) - procedure test_annotation; + --%test(Creates a test item for procedure annotated with --%test annotation) + procedure test_annotation; - --%test(Gives warning if more than one --%test annotation used) - procedure test_annot_duplicated; + --%test(Gives warning if more than one --%test annotation used) + procedure test_annot_duplicated; - --%test(Is added to suite according to annotation order in package spec) - procedure test_annotation_ordering; + --%test(Is added to suite according to annotation order in package spec) + procedure test_annotation_ordering; --%endcontext --%context(suitepath) --%displayname(--%suitepath annotation) - --%test(Sets suite path using first --%suitepath annotation) - procedure suitepath_from_non_empty_path; + --%test(Sets suite path using first --%suitepath annotation) + procedure suitepath_from_non_empty_path; - --%test(Gives warning if more than one --%suitepath annotation used) - procedure suitepath_annot_duplicated; + --%test(Gives warning if more than one --%suitepath annotation used) + procedure suitepath_annot_duplicated; - --%test(Gives warning if --%suitepath annotation has no value) - procedure suitepath_annot_empty; + --%test(Gives warning if --%suitepath annotation has no value) + procedure suitepath_annot_empty; - --%test(Gives warning if --%suitepath annotation has invalid value) - procedure suitepath_annot_invalid_path; + --%test(Gives warning if --%suitepath annotation has invalid value) + procedure suitepath_annot_invalid_path; --%endcontext --%context(rollback) --%displayname(--%rollback annotation) - --%test(Sets rollback type using first --%rollback annotation) - procedure rollback_type_valid; + --%test(Sets rollback type using first --%rollback annotation) + procedure rollback_type_valid; - --%test(Gives warning if more than one --%rollback annotation used) - procedure rollback_type_duplicated; + --%test(Gives warning if more than one --%rollback annotation used) + procedure rollback_type_duplicated; - --%test(Gives warning if --%rollback annotation has no value) - procedure rollback_type_empty; + --%test(Gives warning if --%rollback annotation has no value) + procedure rollback_type_empty; - --%test(Gives warning if --%rollback annotation has invalid value) - procedure rollback_type_invalid; + --%test(Gives warning if --%rollback annotation has invalid value) + procedure rollback_type_invalid; --%endcontext --%context(before_after_all_each) --%displayname(--%before/after all/each annotations) - --%test(Supports multiple before/after all/each procedure level definitions) - procedure multiple_before_after; + --%test(Supports multiple before/after all/each procedure level definitions) + procedure multiple_before_after; - --%test(Supports multiple before/after all/each standalone level definitions) - procedure multiple_standalone_bef_aft; + --%test(Supports multiple before/after all/each standalone level definitions) + procedure multiple_standalone_bef_aft; - --%test(Supports mixing before/after all/each annotations on single procedure) - procedure before_after_on_single_proc; + --%test(Supports mixing before/after all/each annotations on single procedure) + procedure before_after_on_single_proc; - --%test(Supports mixed before/after all/each as standalone and procedure level definitions) - procedure multiple_mixed_bef_aft; + --%test(Supports mixed before/after all/each as standalone and procedure level definitions) + procedure multiple_mixed_bef_aft; - --%test(Gives warning if more than one --%beforeall annotation used on procedure) - procedure beforeall_annot_duplicated; + --%test(Gives warning if more than one --%beforeall annotation used on procedure) + procedure beforeall_annot_duplicated; - --%test(Gives warning if more than one --%beforeeach annotation used on procedure) - procedure beforeeach_annot_duplicated; + --%test(Gives warning if more than one --%beforeeach annotation used on procedure) + procedure beforeeach_annot_duplicated; - --%test(Gives warning if more than one --%afterall annotation used on procedure) - procedure afterall_annot_duplicated; + --%test(Gives warning if more than one --%afterall annotation used on procedure) + procedure afterall_annot_duplicated; - --%test(Gives warning if more than one --%aftereach annotation used on procedure) - procedure aftereach_annot_duplicated; + --%test(Gives warning if more than one --%aftereach annotation used on procedure) + procedure aftereach_annot_duplicated; - --%test(Gives warning on before/after all/each annotations mixed with test) - procedure before_after_mixed_with_test; + --%test(Gives warning on before/after all/each annotations mixed with test) + procedure before_after_mixed_with_test; --%endcontext --%context(context) --%displayname(--%context annotation) - --%test(Creates nested suite for content between context/endcontext annotations) - procedure suite_from_context; + --%test(Creates nested suite for content between context/endcontext annotations) + procedure suite_from_context; - --%test(Associates before/after all/each to tests in context only) - procedure before_after_in_context; + --%test(Associates before/after all/each to tests in context only) + procedure before_after_in_context; - --%test(Propagates beforeeach/aftereach to context) - procedure before_after_out_of_context; + --%test(Propagates beforeeach/aftereach to context) + procedure before_after_out_of_context; - --%test(Does not create context and gives warning when endcontext is missing) - procedure context_without_endcontext; + --%test(Does not create context and gives warning when endcontext is missing) + procedure context_without_endcontext; - --%test(Gives warning if --%endcontext is missing a preceding --%context) - procedure endcontext_without_context; + --%test(Gives warning if --%endcontext is missing a preceding --%context) + procedure endcontext_without_context; - --%test(Gives warning when two contexts have the same name and ignores duplicated context) - procedure duplicate_context_name; + --%test(Gives warning when two contexts have the same name and ignores duplicated context) + procedure duplicate_context_name; --%endcontext --%context(throws) --%displayname(--%throws annotation) - --%test(Gives warning if --%throws annotation has no value) - procedure throws_value_empty; + --%test(Gives warning if --%throws annotation has no value) + procedure throws_value_empty; - --%test(Gives warning if --%throws annotation has invalid value) - procedure throws_value_invalid; + --%test(Gives warning if --%throws annotation has invalid value) + procedure throws_value_invalid; --%endcontext --%context(beforetest_aftertest) --%displayname(--%beforetest/aftertest annotation) - --%test(Supports multiple occurrences of beforetest/aftertest for a test) - procedure before_aftertest_multi; + --%test(Supports multiple occurrences of beforetest/aftertest for a test) + procedure before_aftertest_multi; - --%test(Supports same procedure defined twice) - procedure before_aftertest_twice; + --%test(Supports same procedure defined twice) + procedure before_aftertest_twice; - --%test(Supports beforetest from external package) - procedure before_aftertest_pkg_proc; + --%test(Supports beforetest from external package) + procedure before_aftertest_pkg_proc; - --%test(Supports mix of procedure and package.procedure) - procedure before_aftertest_mixed_syntax; + --%test(Supports mix of procedure and package.procedure) + procedure before_aftertest_mixed_syntax; --%endcontext --%context(unknown_annotation) --%displayname(--%bad_annotation) - --%test(Gives warning when unknown procedure level annotation passed) - procedure test_bad_procedure_annotation; + --%test(Gives warning when unknown procedure level annotation passed) + procedure test_bad_procedure_annotation; - --%test(Gives warning when unknown package level annotation passed) - procedure test_bad_package_annotation; + --%test(Gives warning when unknown package level annotation passed) + procedure test_bad_package_annotation; --%endcontext --%context(tags_annotation) --%displayname(--%tag_annotation) - --%test(Build suite test with tag) - procedure test_tag_annotation; + --%test(Build suite test with tag) + procedure test_tag_annotation; - --%test(Build suite with tag) - procedure suite_tag_annotation; + --%test(Build suite with tag) + procedure suite_tag_annotation; - --%test(Build suite test with three tags) - procedure test_tags_annotation; - - --%test(Build suite with three tags) - procedure suite_tags_annotation; + --%test(Build suite test with three tags) + procedure test_tags_annotation; - --%test(Build suite test with two line tag annotation) - procedure test_2line_tags_annotation; - - --%test(Build suite with two line tag annotation) - procedure suite_2line_tags_annotation; + --%test(Build suite with three tags) + procedure suite_tags_annotation; - --%test(Build suite test with empty line tag annotation) - procedure test_empty_tag; - - --%test(Build suite with empty line tag annotation) - procedure suite_empty_tag; - - --%test(Build suite test with duplicate tag annotation) - procedure test_duplicate_tag; - - --%test(Build suite with duplicate tag annotation) - procedure suite_duplicate_tag; + --%test(Build suite test with two line tag annotation) + procedure test_2line_tags_annotation; - --%test(Build suite test with empty between tag annotation) - procedure test_empty_tag_between; - - --%test(Build suite with empty between tag annotation) - procedure suite_empty_tag_between; + --%test(Build suite with two line tag annotation) + procedure suite_2line_tags_annotation; + + --%test(Build suite test with empty line tag annotation) + procedure test_empty_tag; + + --%test(Build suite with empty line tag annotation) + procedure suite_empty_tag; + + --%test(Build suite test with duplicate tag annotation) + procedure test_duplicate_tag; + + --%test(Build suite with duplicate tag annotation) + procedure suite_duplicate_tag; + + --%test(Build suite test with empty between tag annotation) + procedure test_empty_tag_between; + + --%test(Build suite with empty between tag annotation) + procedure suite_empty_tag_between; + + --%test(Build suite test with special char tag annotation) + procedure test_special_char_tag; + + --%test(Build suite with special char tag annotation) + procedure suite_special_char_tag; + + --%test(Raise warning and ignore tag with spaces in tag name) + procedure test_spaces_in_tag; + + --%test(Raise warning and ignore tag starting ith '-') + procedure test_minus_in_tag; - --%test(Build suite test with special char tag annotation) - procedure test_special_char_tag; - - --%test(Build suite with special char tag annotation) - procedure suite_special_char_tag; - --%endcontext end test_suite_builder; diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index 329b71357..53a819299 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -1021,6 +1021,48 @@ Failures:% ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_3%' ); end; + procedure tag_inc_exc_run_func_path_list is + l_results ut3.ut_varchar2_list; + begin + l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests.test_package_1',':tests'),a_tags => 'suite1test1,suite2test1,-suite2'); + --Assert + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_2%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_1.test2%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_3%' ); + end; + + procedure tag_exclude_run_func_path_list is + l_results ut3.ut_varchar2_list; + begin + l_results := ut3_tester_helper.run_helper.run(ut3.ut_varchar2_list(':tests,:tests2'),a_tags => '-suite1test2,-suite2test1,-test1suite3'); + --Assert + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_3%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_1.test2%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_2.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2.test2%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_3.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_3.test2%executed%' ); + end; + + procedure tag_include_exclude_run_func is + l_results ut3.ut_varchar2_list; + begin + l_results := ut3_tester_helper.run_helper.run(a_tags => 'suite1,-suite1test2,-suite2test1,-test1suite3'); + --Assert + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_3%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_1.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_1.test2%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).not_to_be_like( '%test_package_2.test1%executed%' ); + ut.expect( ut3_tester_helper.main_helper.table_to_clob(l_results) ).to_be_like( '%test_package_2.test2%executed%' ); + end; + procedure set_application_info is begin dbms_application_info.set_module( gc_module, gc_action ); diff --git a/test/ut3_user/api/test_ut_run.pks b/test/ut3_user/api/test_ut_run.pks index 38a6eee2c..ac2e50e25 100644 --- a/test/ut3_user/api/test_ut_run.pks +++ b/test/ut3_user/api/test_ut_run.pks @@ -175,59 +175,68 @@ create or replace package test_ut_run is --%endcontext --%context(run with tags) - --%displayname(Call ut.run with #tags) - --%beforeall(create_ut3$user#_tests) - --%afterall(drop_ut3$user#_tests) - - --%test(Execute test by tag ut_run) - procedure test_run_by_one_tag; - - --%test( Execute suite by one tag) - procedure suite_run_by_one_tag; - - --%test(Execute two tests by one tag) - procedure two_test_run_by_one_tag; - - --%test(Execute all suites tests with tag) - procedure all_suites_run_by_one_tag; - - --%test(Execute tests by passing two tags) - procedure two_test_run_by_two_tags; - - --%test(Execute suite and all of its children) - procedure suite_with_children_tag; - - --%test(Execute suite and parents) - procedure suite_with_tag_parent; - - --%test(Execute test for non existing tag) - procedure test_nonexists_tag; - - --%test(Execute test for duplicate list tags) - procedure test_duplicate_tag; - - --%test(Execute suite test for duplicate list tags) - procedure suite_duplicate_tag; - --%test(Runs given package only with package name given as path and filter by tag) - procedure run_proc_pkg_name_tag; - - --%test(Runs all from given package with package name given as path and coverage file list with tag) - procedure run_pkg_name_file_list_tag; - - --%test(Runs tests from given paths with paths list and tag) - procedure run_proc_path_list_tag; - - --%test(Runs all tests in current schema with default reporter when only tag is given) - procedure tag_run_func_no_params; + --%beforeall(create_ut3$user#_tests) + --%afterall(drop_ut3$user#_tests) + + --%test(Execute test by tag ut_run) + procedure test_run_by_one_tag; + + --%test( Execute suite by one tag) + procedure suite_run_by_one_tag; + + --%test(Execute two tests by one tag) + procedure two_test_run_by_one_tag; + + --%test(Execute all suites tests with tag) + procedure all_suites_run_by_one_tag; + + --%test(Execute tests by passing two tags) + procedure two_test_run_by_two_tags; + + --%test(Execute suite and all of its children) + procedure suite_with_children_tag; + + --%test(Execute suite and parents) + procedure suite_with_tag_parent; + + --%test(Execute test for non existing tag) + procedure test_nonexists_tag; + + --%test(Execute test for duplicate list tags) + procedure test_duplicate_tag; + + --%test(Execute suite test for duplicate list tags) + procedure suite_duplicate_tag; + + --%test(Runs given package only with package name given as path and filter by tag) + procedure run_proc_pkg_name_tag; + + --%test(Runs all from given package with package name given as path and coverage file list with tag) + procedure run_pkg_name_file_list_tag; + + --%test(Runs tests from given paths with paths list and tag) + procedure run_proc_path_list_tag; + + --%test(Runs all tests in current schema with default reporter when only tag is given) + procedure tag_run_func_no_params; + + --%test(Runs given package only with package name given as path and filter by tag) + procedure tag_run_func_pkg_name; + + --%test(Runs tests from given paths with paths list and a tag) + procedure tag_run_func_path_list; + + --%test(Runs tests from given paths with paths list and include/exclude tags) + procedure tag_inc_exc_run_func_path_list; + + --%test(Runs tests from given path and excludes specific tags) + procedure tag_exclude_run_func_path_list; - --%test(Runs given package only with package name given as path and filter by tag) - procedure tag_run_func_pkg_name; + --%test(Runs tests from given tags and exclude tags) + procedure tag_include_exclude_run_func; - --%test(Runs tests from given paths with paths list and a tag) - procedure tag_run_func_path_list; - --%endcontext --%context(ut3_info context) From 0d64c080b614a62680e6440ff262e7f2b6788de3 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Mon, 21 Oct 2019 01:10:45 +0100 Subject: [PATCH 26/50] Changed syntax to avoid Oracle internal errors on 11.2 and 12.1 --- source/core/ut_suite_cache_manager.pkb | 30 +++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/source/core/ut_suite_cache_manager.pkb b/source/core/ut_suite_cache_manager.pkb index 6b080f528..f52d15bf7 100644 --- a/source/core/ut_suite_cache_manager.pkb +++ b/source/core/ut_suite_cache_manager.pkb @@ -132,21 +132,12 @@ create or replace package body ut_suite_cache_manager is q'[included_tags as ( select c.obj.path as path from suite_items c - where exists ( - select * from table(c.obj.tags) - intersect - select * from table(:a_tag_list) where column_value not like '-%' - ) - or 0 = (select count(*) from table(:a_tag_list) where column_value not like '-%') + where c.obj.tags multiset intersect :a_include_tag_list is not empty or :a_include_tag_list is empty ), excluded_tags as ( select c.obj.path as path from suite_items c - where exists ( - select * from table(c.obj.tags) - intersect - select ltrim(column_value,'-') from table(:a_tag_list) where column_value like '-%' - ) + where c.obj.tags multiset intersect :a_exclude_tag_list is not empty ), suite_items_tags as ( select c.* @@ -162,7 +153,7 @@ create or replace package body ut_suite_cache_manager is ) ),]' else - q'[dummy as (select 'x' from dual where :a_tag_list is null and :a_tag_list is null and :a_tag_list is null),]' + q'[dummy as (select 'x' from dual where :a_include_tag_list is null and :a_include_tag_list is null and :a_exclude_tag_list is null),]' end; end; @@ -205,10 +196,23 @@ create or replace package body ut_suite_cache_manager is l_sql varchar2(32767); l_suite_item_name varchar2(20); l_tags ut_varchar2_rows := coalesce(a_tags,ut_varchar2_rows()); + l_include_tags ut_varchar2_rows; + l_exclude_tags ut_varchar2_rows; l_object_owner varchar2(250) := ut_utils.qualified_sql_name(a_object_owner); l_object_name varchar2(250) := ut_utils.qualified_sql_name(a_object_name); l_procedure_name varchar2(250) := ut_utils.qualified_sql_name(a_procedure_name); begin + + select column_value + bulk collect into l_include_tags + from table(l_tags) + where column_value not like '-%'; + + select ltrim(column_value,'-') + bulk collect into l_exclude_tags + from table(l_tags) + where column_value like '-%'; + if a_path is null and a_object_name is not null then select min(c.path) into l_path @@ -234,7 +238,7 @@ create or replace package body ut_suite_cache_manager is execute immediate l_sql bulk collect into l_results - using upper(l_object_owner), l_path, l_path, upper(a_object_name), upper(a_procedure_name), l_tags, l_tags, l_tags, a_random_seed; + using upper(l_object_owner), l_path, l_path, upper(a_object_name), upper(a_procedure_name), l_include_tags, l_include_tags, l_exclude_tags, a_random_seed; return l_results; end; From 68e625fdf38f17f8986b0d257d588b643d253b8c Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 21 Oct 2019 00:53:40 +0000 Subject: [PATCH 27/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index f3ad589a7..78e7232cc 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 5d2ce212e..26ab66407 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 7bce22221..68e62c388 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 2ecaf6b9d..86a0d5455 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index cc3e79595..6fbd6b988 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 940afbcf3..51ad19b30 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 145d9e968..b034e81db 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index eb433554d..58e60b83c 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 43aac6a78..3db4fb779 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index db8c25d02..4fff8cb3a 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index c3e7d7401..71d268fe3 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 3eb6179f5..e193548be 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 2ee30cb8b..1c9a61900 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 7363f8e79..9fdc6f82a 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 2a2c61776..c1b89c1b2 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 628ff38a5..9d5fc3bdd 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.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 727a748b7..6276c7dcc 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 30ff0f98e..df65dfaf5 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3226-develop + * secion v3.1.9.3237-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 0896349cb..84277737d 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.9.3226-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3237-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From f48e7e5722c744938b0a079695f94c7596f12df9 Mon Sep 17 00:00:00 2001 From: pesse Date: Tue, 22 Oct 2019 08:49:13 +0200 Subject: [PATCH 28/50] Improve documentation around tags --- docs/userguide/annotations.md | 35 +++++++++++++++------------- docs/userguide/running-unit-tests.md | 10 ++++++-- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 3578765dc..35ed7d778 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1225,7 +1225,7 @@ Finished in .035261 seconds ### Tags -Tag is a label attached to the test or a suite. It is used for identification and execution a group of tests / suites that share same tag. +Tag is a label attached to the test or a suite. It is used for identification and execution of a group of tests / suites that share the same tag. It allows for grouping of tests / suites using various categorization and place tests / suites in multiple buckets. Same tests can be grouped with other tests based on the functionality , frequency, type of output etc. @@ -1244,15 +1244,15 @@ or Tags are defined as a comma separated list within the `--%tags` annotation. -When executing a test run with tag filter applied, framework will find all tests associated with given tags and execute them. -Framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run. +When executing a test run with tag filter applied, the framework will find all tests associated with the given tags and execute them. +The framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run. -When a suite/context is tagged all of its children will automatically inherit a tag and get executed along with the parent. Parent suite tests are not executed, but a suitepath hierarchy is kept. +When a suite/context is tagged, all of its children will automatically inherit the tag and get executed along with the parent. Parent suite tests are not executed, but a suitepath hierarchy is kept. Sample test suite package with tags. ```sql -create or replace package ut_sample_test IS +create or replace package ut_sample_test is --%suite(Sample Test Suite) --%tags(api) @@ -1289,7 +1289,7 @@ end ut_sample_test; / ``` -Execution of the test is done by using a parameter `a_tags` +Execution of the test is done by using the parameter `a_tags` ```sql select * from table(ut.run(a_path => 'ut_sample_test',a_tags => 'api')); @@ -1306,6 +1306,18 @@ select * from table(ut.run(a_tags => 'fast')); ``` The above call will execute both `ut_sample_test.ut_refcursors1` and `ut_sample_test.ut_test` tests, as both tests are tagged with `fast` +#### Tag naming convention + +Tags must follow the below naming convention: + +- tag is case sensitive +- tag can contain special characters like `$#/\?-!` etc. +- tag cannot be an empty string +- tag cannot start with a dash, e.g. `-some-stuff` is **not** a valid tag +- tag cannot contain spaces, e.g. `test of batch`. To create a multi-word tag use underscores or dashes, e.g. `test_of_batch`, `test-of-batch` +- leading and trailing spaces are ignored in tag name, e.g. `--%tags( tag1 , tag2 )` becomes `tag1` and `tag2` tag names + + #### Excluding tests/suites by tags It is possible to exclude parts of test suites with tags. @@ -1316,18 +1328,9 @@ Examples (based on above sample test suite) ```sql select * from table(ut.run(a_tags => 'api,fast,-complex')); ``` -The above call will execute all suites/contexts/tests that are marked with any of tags `api` or `fast` except those suites/contexts/tests that are marked as `complex` +The above call will execute all suites/contexts/tests that are marked with any of tags `api` or `fast` except those suites/contexts/tests that are marked as `complex`. Given the above example package `ut_sample_test`, only `ut_sample_test.ut_test` will be executed. -**Note:** -Tags must follow the below naming convention: - -- tag is case sensitive -- tag can contain special characters like `$#/\?-!` etc. -- tag cannot be an empty string -- tag cannot start with a dash e.g. `-some-stuff` is **not** a valid tag -- tag cannot contain spaces e.g. `test of batch`. To create a multi-word tag use underscores or dashes e.g. `test_of_batch`, `test-of-batch` -- leading and trailing spaces are ignored in tag name e.g. `--%tags( tag1 , tag2 )` becomes `tag1` and `tag2` tag names ### Suitepath diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 9d5fc3bdd..63dc32485 100644 --- a/docs/userguide/running-unit-tests.md +++ b/docs/userguide/running-unit-tests.md @@ -284,8 +284,9 @@ select * from table(ut.run('hr.test_apply_bonus', a_random_test_order_seed => 30 # Run by Tags -In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test with the `--%tags`-annotation ([Read more](annotations.md#tags)). -Multiple tags are separated by comma. If multiple tags are set, all tests with __any__ of them specified are run. +In addition to the path, you can filter the tests to be run by specifying tags. Tags are defined in the test / context / suite with the `--%tags`-annotation ([Read more](annotations.md#tags)). +Multiple tags are separated by comma. +The framework applies `OR` logic to all specified tags so any test / suite that matches at least one tag will be included in the test run. ```sql begin @@ -296,6 +297,11 @@ end; select * from table(ut.run('hr.test_apply_bonus', a_tags => 'suite1')) ``` +You can also exclude specific tags by adding a `-` (dash) in front of the tag + +```sql +select * from table(ut.run('hr.test_apply_bonus', a_tags => '-suite1')) +``` # Keeping uncommitted data after test-run From 2caa749327e714617169d51b9cb6460051ab193c Mon Sep 17 00:00:00 2001 From: pesse Date: Tue, 22 Oct 2019 22:14:44 +0200 Subject: [PATCH 29/50] Use cli 3.1.8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eaa76047e..e11a3ca3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ env: #utPLSQL released version directory - UTPLSQL_DIR="utPLSQL_latest_release" - SELFTESTING_BRANCH=${TRAVIS_BRANCH} - - UTPLSQL_CLI_VERSION="3.1.7" + - UTPLSQL_CLI_VERSION="3.1.8" # Maven - MAVEN_HOME=/usr/local/maven - MAVEN_CFG=$HOME/.m2 From eebfba035b96346e49def5d82fdb2c6743419749 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Wed, 23 Oct 2019 01:44:31 +0100 Subject: [PATCH 30/50] Added support for nested contexts. TODO - review & update documentation & examples. --- source/core/ut_suite_builder.pkb | 61 ++++--- test/ut3_tester/core/test_suite_builder.pkb | 176 +++++++++++++++----- test/ut3_tester/core/test_suite_builder.pks | 3 + test/ut3_user/api/test_ut_run.pkb | 2 +- 4 files changed, 171 insertions(+), 71 deletions(-) diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 101ab2179..fc3e72e60 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -625,7 +625,7 @@ create or replace package body ut_suite_builder is a_suite.path := lower(coalesce(a_suite.path, a_suite.object_name)); end; - procedure add_suite_tests( + procedure add_tests_to_items( a_suite in out nocopy ut_suite, a_annotations t_annotations_info, a_suite_items in out nocopy ut_suite_items @@ -738,7 +738,8 @@ create or replace package body ut_suite_builder is procedure get_suite_contexts_items( a_suite in out nocopy ut_suite, a_annotations in out nocopy t_annotations_info, - a_suite_items out nocopy ut_suite_items + a_suite_items out nocopy ut_suite_items, + a_parent_context_pos in integer := 0 ) is l_context_pos t_annotation_position; l_end_context_pos t_annotation_position; @@ -755,35 +756,43 @@ create or replace package body ut_suite_builder is return; end if; - l_context_pos := a_annotations.by_name( gc_context).first; + l_context_pos := a_annotations.by_name( gc_context).next(a_parent_context_pos); while l_context_pos is not null loop l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); + + l_context_name := coalesce( a_annotations.by_line( l_context_pos ).text, gc_context||'_'||l_context_no ); + l_context := ut_suite_context(a_suite.object_owner, a_suite.object_name, l_context_name, l_context_pos ); + l_context.path := a_suite.path||'.'||l_context_name; + l_context.description := a_annotations.by_line( l_context_pos ).text; + l_context.parse_time := a_annotations.parse_time; + + --if nested context found + if a_annotations.by_name(gc_context).next(l_context_pos) < l_end_context_pos or l_end_context_pos is null then + get_suite_contexts_items( l_context, a_annotations, l_context_items, l_context_pos ); + l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); + else + l_context_items := ut_suite_items(); + end if; - exit when l_end_context_pos is null; + if l_end_context_pos is null then + a_suite.put_warning( + 'Missing "--%endcontext" annotation for a "--%context" annotation. The end of package specification is effective end of context.'|| get_object_reference( a_suite, null, l_context_pos ) + ); + l_end_context_pos := a_annotations.by_line.last; + end if; - l_context_items := ut_suite_items(); --create a sub-set of annotations to process as sub-suite (context) - l_ctx_annotations := get_annotations_in_context( a_annotations, l_context_pos, l_end_context_pos); + l_ctx_annotations := get_annotations_in_context( a_annotations, l_context_pos, l_end_context_pos); - l_context_name := coalesce( - l_ctx_annotations.by_line( l_context_pos ).text - , gc_context||'_'||l_context_no - ); if l_context_names.exists(l_context_name) then add_annotation_ignored_warning( a_suite, 'context', 'Context name must be unique in a suite. Context and all of it''s content ignored.', l_context_pos ); else l_context_names(l_context_name) := true; - l_context := ut_suite_context(a_suite.object_owner, a_suite.object_name, l_context_name, l_context_pos ); - - l_context.path := a_suite.path||'.'||l_context_name; - l_context.description := l_ctx_annotations.by_line( l_context_pos ).text; - l_context.parse_time := a_annotations.parse_time; - warning_on_duplicate_annot( l_context, l_ctx_annotations.by_name, gc_context ); - add_suite_tests( l_context, l_ctx_annotations, l_context_items ); + add_tests_to_items( l_context, l_ctx_annotations, l_context_items ); add_items_to_list(a_suite_items, l_context_items); a_suite_items.extend; a_suite_items(a_suite_items.last) := l_context; @@ -798,27 +807,17 @@ create or replace package body ut_suite_builder is end loop; end; - procedure warning_on_incomplete_context( + procedure warning_on_floating_endcontext( a_suite in out nocopy ut_suite, a_package_ann_index tt_annotations_by_name ) is l_annotation_pos t_annotation_position; begin - if a_package_ann_index.exists(gc_context) then - l_annotation_pos := a_package_ann_index(gc_context).first; - while l_annotation_pos is not null loop - add_annotation_ignored_warning( - a_suite, gc_context, 'Invalid annotation %%%. Cannot find following "--%endcontext".', - l_annotation_pos - ); - l_annotation_pos := a_package_ann_index(gc_context).next(l_annotation_pos); - end loop; - end if; if a_package_ann_index.exists(gc_endcontext) then l_annotation_pos := a_package_ann_index(gc_endcontext).first; while l_annotation_pos is not null loop add_annotation_ignored_warning( - a_suite, gc_endcontext, 'Invalid annotation %%%. Cannot find preceding "--%context".', + a_suite, gc_endcontext, 'Extra %%% annotation found. Cannot find corresponding "--%context".', l_annotation_pos ); l_annotation_pos := a_package_ann_index(gc_endcontext).next(l_annotation_pos); @@ -891,10 +890,10 @@ create or replace package body ut_suite_builder is build_suitepath( l_suite, l_annotations ); get_suite_contexts_items( l_suite, l_annotations, a_suite_items ); --create suite tests and add - add_suite_tests( l_suite, l_annotations, a_suite_items ); + add_tests_to_items( l_suite, l_annotations, a_suite_items ); --by this time all contexts were consumed and l_annotations should not have any context/endcontext annotation in it. - warning_on_incomplete_context( l_suite, l_annotations.by_name ); + warning_on_floating_endcontext( l_suite, l_annotations.by_name ); a_suite_items.extend; a_suite_items( a_suite_items.last) := l_suite; diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index b49ecb2da..514becc1c 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -674,6 +674,99 @@ create or replace package body test_suite_builder is ); end; + procedure nested_contexts is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation( 1, 'suite','Cool', null), + ut3.ut_annotation( 2, 'beforeall',null, 'suite_level_beforeall'), + ut3.ut_annotation( 3, 'test','In suite', 'suite_level_test'), + ut3.ut_annotation( 4, 'context','a_context', null), + ut3.ut_annotation( 5, 'displayname','A context', null), + ut3.ut_annotation( 6, 'beforeall',null, 'context_setup'), + ut3.ut_annotation( 7, 'test', 'First test in context', 'first_test_in_a_context'), + ut3.ut_annotation( 8, 'context','a_nested_context', null), + ut3.ut_annotation( 9, 'displayname','A nested context', null), + ut3.ut_annotation(10, 'beforeall',null, 'nested_context_setup'), + ut3.ut_annotation(11, 'test', 'Test in nested context', 'test_in_nested_context'), + ut3.ut_annotation(12, 'endcontext',null, null), + ut3.ut_annotation(13, 'context','nested_context_2', null), + ut3.ut_annotation(14, 'test', 'Test in nested context', 'test_in_nested_context_2'), + ut3.ut_annotation(15, 'context','a_nested_context_3', null), + ut3.ut_annotation(16, 'test', 'Test in nested context', 'test_in_nested_context_3'), + ut3.ut_annotation(17, 'endcontext',null, null), + ut3.ut_annotation(18, 'endcontext',null, null), + ut3.ut_annotation(19, 'test', 'Second test in context', 'second_test_in_a_context'), + ut3.ut_annotation(20, 'endcontext',null, null) + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '%' || + '' || + '%a_contextA contextsome_package.a_context' || + '%' || + '' || + '%nested_context_2nested_context_2some_package.a_context.nested_context_2' || + '%' || + '' || + '%a_nested_context_3a_nested_context_3some_package.a_context.nested_context_2.a_nested_context_3' || + '%' || + '' || + '%test_in_nested_context_3Test in nested contextsome_package.a_context.nested_context_2.a_nested_context_3.test_in_nested_context_3' || + '%' || + '' || + '' || + '%' || + '' || + '%test_in_nested_context_2Test in nested contextsome_package.a_context.nested_context_2.test_in_nested_context_2' || + '%' || + '' || + '' || + '%' || + '' || + '%a_nested_contextA nested contextsome_package.a_context.a_nested_context' || + '%' || + '' || + '%test_in_nested_contextTest in nested contextsome_package.a_context.a_nested_context.test_in_nested_context' || + '%' || + '' || + '' || + '%some_packagenested_context_setup' || + '%' || + '%' || + '' || + '%first_test_in_a_contextFirst test in contextsome_package.a_context.first_test_in_a_context' || + '%' || + '' || + '%second_test_in_a_contextSecond test in contextsome_package.a_context.second_test_in_a_context' || + '%' || + '' || + '' || + '%some_packagecontext_setup' || + '%' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '%some_packagesuite_level_beforeall' || + '%' || + '' || + ''|| + '' + ); + end; + + procedure before_after_in_context is l_actual clob; l_annotations ut3.ut_annotations; @@ -783,7 +876,7 @@ create or replace package body test_suite_builder is ut3.ut_annotation(1, 'suite','Cool', null), ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(4, 'context','a_context', null), ut3.ut_annotation(5, 'beforeall',null, 'context_setup'), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context') ); @@ -791,25 +884,30 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Invalid annotation "--\%context". Cannot find following "--\%endcontext". Annotation ignored.%at package "UT3_TESTER.SOME_PACKAGE", line 4%' + '%Missing "--\%endcontext" annotation for a "--\%context" annotation. The end of context considered be end of package.%at package "UT3_TESTER.SOME_PACKAGE", line 4%' ,'\' ); ut.expect(l_actual).to_be_like( ''|| '' || - '%' || - '' || - '%suite_level_testIn suitesome_package.suite_level_test' || - '%' || - '' || - '%test_in_a_contextIn contextsome_package.test_in_a_context' || - '%' || - '' || - '' || - '%some_packagesuite_level_beforeall' || - '%some_packagecontext_setup' || - '%' || - '' || + '%' || + '%a_contexta_contextsome_package.a_context' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.a_context.test_in_a_context' || + '%' || + '' || + '' || + '%some_packagecontext_setup' || + '%' || + '%' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '%some_packagesuite_level_beforeall' || + '%' || + '' || ''|| '' ); @@ -835,7 +933,7 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Invalid annotation "--\%endcontext". Cannot find preceding "--\%context". Annotation ignored.%at package "UT3_TESTER.SOME_PACKAGE", line 9%' + '%Extra "--\%endcontext" annotation found. Cannot find corresponding "--\%context". Annotation ignored.%at package "UT3_TESTER.SOME_PACKAGE", line 9%' ,'\' ); ut.expect(l_actual).to_be_like( @@ -850,7 +948,7 @@ create or replace package body test_suite_builder is '%' || '' || '' || - '%some_packagecontext_setup' || + '%some_packagecontext_setup' || '%' || '' || '' || @@ -859,7 +957,7 @@ create or replace package body test_suite_builder is '%' || '' || '' || - '%some_packagesuite_level_beforeall' || + '%some_packagesuite_level_beforeall' || '%' || '' || ''|| @@ -1152,7 +1250,7 @@ create or replace package body test_suite_builder is '%testtag%'|| '%%' ); - + end; procedure suite_tag_annotation is @@ -1173,9 +1271,9 @@ create or replace package body test_suite_builder is '%suitetag%'|| '%%' ); - + end; - + procedure test_tags_annotation is l_actual clob; l_annotations ut3.ut_annotations; @@ -1195,7 +1293,7 @@ create or replace package body test_suite_builder is '%testtagtesttag2testtag3%'|| '%%' ); - + end; procedure suite_tags_annotation is @@ -1216,7 +1314,7 @@ create or replace package body test_suite_builder is '%suitetagsuitetag1suitetag2%'|| '%%' ); - + end; procedure test_2line_tags_annotation is @@ -1239,7 +1337,7 @@ create or replace package body test_suite_builder is '%testtagtesttag2%'|| '%%' ); - + end; procedure suite_2line_tags_annotation is @@ -1261,7 +1359,7 @@ create or replace package body test_suite_builder is '%suitetagsuitetag1%'|| '%%' ); - + end; procedure test_empty_tag is @@ -1280,9 +1378,9 @@ create or replace package body test_suite_builder is '%%"--%tags" annotation requires a tag value populated. Annotation ignored.%%'|| '%%' ); - + end; - + procedure suite_empty_tag is l_actual clob; l_annotations ut3.ut_annotations; @@ -1299,7 +1397,7 @@ create or replace package body test_suite_builder is '%"--%tags" annotation requires a tag value populated. Annotation ignored.%%'|| '%%' ); - + end; procedure test_duplicate_tag is @@ -1322,9 +1420,9 @@ create or replace package body test_suite_builder is '%testtagtesttag1testtag2%'|| '%%' ); - + end; - + procedure suite_duplicate_tag is l_actual clob; l_annotations ut3.ut_annotations; @@ -1344,7 +1442,7 @@ create or replace package body test_suite_builder is '%suitetagsuitetag1suitetag2%'|| '%%' ); - + end; procedure test_empty_tag_between is @@ -1366,9 +1464,9 @@ create or replace package body test_suite_builder is '%testtagtesttag1%'|| '%%' ); - + end; - + procedure suite_empty_tag_between is l_actual clob; l_annotations ut3.ut_annotations; @@ -1387,8 +1485,8 @@ create or replace package body test_suite_builder is '%suitetagsuitetag1%'|| '%%' ); - - end; + + end; procedure test_special_char_tag is l_actual clob; @@ -1409,9 +1507,9 @@ create or replace package body test_suite_builder is '%#?$%^&*!|\/@][%'|| '%%' ); - + end; - + procedure suite_special_char_tag is l_actual clob; l_annotations ut3.ut_annotations; @@ -1430,8 +1528,8 @@ create or replace package body test_suite_builder is '%#?$%^&*!|\/@][%'|| '%%' ); - - end; + + end; end test_suite_builder; / diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index 721db153f..688cc342c 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -116,6 +116,9 @@ create or replace package test_suite_builder is --%test(Creates nested suite for content between context/endcontext annotations) procedure suite_from_context; + --%test(Creates nested contexts inside a context) + procedure nested_contexts; + --%test(Associates before/after all/each to tests in context only) procedure before_after_in_context; diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index 329b71357..9160814dd 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -688,7 +688,7 @@ Failures:% select * bulk collect into l_results from table(ut3.ut.run('bad_annotations')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like('%Invalid annotation "--%context". Cannot find following "--%endcontext". Annotation ignored.% + ut.expect(l_actual).to_be_like('%Missing "--%endcontext" annotation for a "--%context" annotation. The end of context considered be end of package.% %1 tests, 0 failed, 0 errored, 0 disabled, 1 warning(s)%'); end; From d367d5201823bccb8f346476d7028b81d576d232 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 23 Oct 2019 01:06:05 +0000 Subject: [PATCH 31/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 78e7232cc..8dd2880ca 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 26ab66407..7cee48900 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 68e62c388..359cfc251 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 86a0d5455..55e465162 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 6fbd6b988..3adbb4d3b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 51ad19b30..1e0ac467a 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 35ed7d778..c7dea5865 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 58e60b83c..6ad0b7941 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 3db4fb779..e8015225a 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 4fff8cb3a..9d47351db 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 71d268fe3..67f199fd6 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index e193548be..95a9e9ef4 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 1c9a61900..6a49191c8 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 9fdc6f82a..8dc06652b 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index c1b89c1b2..747cfe3ba 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 63dc32485..66acceabb 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.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 6276c7dcc..551115f8c 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index df65dfaf5..5606423c9 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3237-develop + * secion v3.1.9.3245-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 84277737d..011f64b25 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.9.3237-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3245-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From c5f81eb1b25729166f13182cdd508c4860cd6fcb Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Wed, 23 Oct 2019 02:23:12 +0100 Subject: [PATCH 32/50] Fixing failing tests --- source/core/ut_suite_builder.pkb | 2 +- test/ut3_tester/core/test_suite_builder.pkb | 2 +- test/ut3_tester/core/test_suite_builder.pks | 2 +- test/ut3_user/api/test_ut_run.pkb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index fc3e72e60..ebdd4a57c 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -777,7 +777,7 @@ create or replace package body ut_suite_builder is if l_end_context_pos is null then a_suite.put_warning( - 'Missing "--%endcontext" annotation for a "--%context" annotation. The end of package specification is effective end of context.'|| get_object_reference( a_suite, null, l_context_pos ) + 'Missing "--%endcontext" annotation for a "--%context" annotation. The end of package is considered end of context.'|| get_object_reference( a_suite, null, l_context_pos ) ); l_end_context_pos := a_annotations.by_line.last; end if; diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index 514becc1c..68d3f47f8 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -884,7 +884,7 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Missing "--\%endcontext" annotation for a "--\%context" annotation. The end of context considered be end of package.%at package "UT3_TESTER.SOME_PACKAGE", line 4%' + '%Missing "--\%endcontext" annotation for a "--\%context" annotation. The end of package is considered end of context.%at package "UT3_TESTER.SOME_PACKAGE", line 4%' ,'\' ); ut.expect(l_actual).to_be_like( diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index 688cc342c..c4e945598 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -125,7 +125,7 @@ create or replace package test_suite_builder is --%test(Propagates beforeeach/aftereach to context) procedure before_after_out_of_context; - --%test(Does not create context and gives warning when endcontext is missing) + --%test(Gives warning when endcontext is missing) procedure context_without_endcontext; --%test(Gives warning if --%endcontext is missing a preceding --%context) diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index 9160814dd..6febdd0c1 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -688,7 +688,7 @@ Failures:% select * bulk collect into l_results from table(ut3.ut.run('bad_annotations')); l_actual := ut3_tester_helper.main_helper.table_to_clob(l_results); - ut.expect(l_actual).to_be_like('%Missing "--%endcontext" annotation for a "--%context" annotation. The end of context considered be end of package.% + ut.expect(l_actual).to_be_like('%Missing "--%endcontext" annotation for a "--%context" annotation. The end of package is considered end of context.% %1 tests, 0 failed, 0 errored, 0 disabled, 1 warning(s)%'); end; From e1dfd05429ec432f5f3eb9c2338fb88c969e43b1 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Thu, 24 Oct 2019 00:02:26 +0100 Subject: [PATCH 33/50] Updated documentation. Added validation of context name. --- docs/userguide/annotations.md | 118 +++++++++++++++++--- source/core/ut_suite_builder.pkb | 10 ++ test/ut3_tester/core/test_suite_builder.pkb | 54 +++++++-- test/ut3_tester/core/test_suite_builder.pks | 3 + 4 files changed, 162 insertions(+), 23 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index c7dea5865..5f51c4229 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -997,9 +997,9 @@ In most of the cases, the code to be tested is consisting of PLSQL packages cont When creating test suites, it's quite common to maintain `one to one` relationship between test suite packages and tested code. When it comes to test procedures themselves, it is best practice to have one test procedure for one tested behavior of the code that is tested. -The relationship between test procedure and tested procedure/function will be therefore `many to one` in most of the cases. +The relationship between test procedure and tested code will be therefore `many to one` or `many to many` in most of the cases. -With this comes a challenge. How to group tests, related to one tested procedure, so that it is obvious that they relate to the same code. +With this comes a challenge. How to group tests, related to one tested behavior, so that it is obvious that they relate to the same thing. This is where utPLSQL contexts come handy. @@ -1008,18 +1008,22 @@ Contexts allow for creating sub-suites within a suite package and they allow for In essence, context behaves like a suite within a suite. Context have following characteristics: -- start with the `--%context` annotation and ends with `--%endcontext` -- can have a name provided as parameter for example `--%context(remove_rooms_by_name)` -- when no name is provided for context, the context is names `context_N` where `N` is the number of the context in suite -- can have their own `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures -- `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures defined at suite level, propagate to context -- test suite package can have multiple contexts in it -- contexts cannot be nested - +- context starts with the `--%context` annotation and ends with `--%endcontext` +- can have a name provided as parameter for example `--%context(remove_rooms_by_name)`. This is different than with `suite` and `test` annotations, where name is taken from test `package/procedure` +- when no name is provided for context, the context is named `context_N` where `N` is the number of the context in suite or parent context +- context name must be unique within it's parent (suite or parent context) +- if context name is not unique within it's parent, context and it's entire content is excluded from execution +- context name should not contain spaces or special characters +- context name cannot contain a `.` (hard stop) character +- contexts can be nested, so a context can be nested within another context +- suite/context can have multiple nested sibling contexts in it +- contexts can have their own `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures +- `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures defined at ancestor level, propagate to context +- if `--%endcontext` is missing for a context, the context spans to the end of package specification The below example illustrates usage of `--%context` for separating tests for individual procedures of package. -Tested tables and code +Sample tables and code ```sql create table rooms ( room_key number primary key, @@ -1078,8 +1082,8 @@ end; Below test suite defines: - `--%beforeall` outside of context, that will be executed before all tests -- `--%context(remove_rooms_by_name)` to group tests for `remove_rooms_by_name` procedure -- `--%context(add_rooms_content)` to group tests for `add_rooms_content` procedure +- `--%context(remove_rooms_by_name)` to group tests related to `remove_rooms_by_name` functionality +- `--%context(add_rooms_content)` to group tests related to `add_rooms_content` functionality ```sql create or replace package test_rooms_management is @@ -1103,7 +1107,6 @@ create or replace package test_rooms_management is --%endcontext - --%context(add_rooms_content) --%displayname(Add content to a room) @@ -1221,6 +1224,93 @@ Finished in .035261 seconds 5 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s) ``` +Example of nested contexts test suite specification. +*Source - [slide 145](https://www.slideshare.net/Kevlin/structure-and-interpretation-of-test-cases/145?src=clipshare) of Structure and Interpretation of Test Cases by Kevlin Henney* + +```sql +create or replace package queue_spec as + --%suite(Queue specification) + + --%context(a_new_queue) + --%displayname(A new queue) + + --%test(Is empty) + procedure is_empty; + --%test(Preserves positive bounding capacity) + procedure positive_bounding_capacity; + --%test(Cannot be created with non positive bounding capacity) + procedure non_positive_bounding_cap; + --%endcontext + --%context(an_empty_queue) + --%displayname(An empty queue) + + --%test(Dequeues an empty value) + procedure deq_empty_value; + --%test(Remains empty when null enqueued) + procedure empty_with_null_enq; + --%test(Becomes non empty when non null value enqueued) + procedure non_empty_after_enq; + --%endcontext + --%context(a_non_empty_queue) + --%displayname(A non empty queue) + + --%context(that_is_not_full) + --%displayname(that is not full) + + --%test(Becomes longer when non null value enqueued) + procedure grow_on_enq_non_null; + --%test(Becomes full when enqueued up to capacity) + procedure full_on_enq_to_cap; + --%endcontext + --%context(that_is_full) + --%displayname(That is full) + + --%test(Ignores further enqueued values) + procedure full_ignore_enq; + --%test(Becomes non full when dequeued) + procedure non_full_on_deq; + --%endcontext + + --%test(Dequeues values in order enqueued) + procedure dequeue_ordered; + --%test(Remains unchanged when null enqueued) + procedure no_change_on_null_enq; + --%endcontext +end; +``` + + +When such specification gets executed `ut.run('queue_spec'')` (without body created) you will see the nesting of tests within contexts. +``` +Queue specification + An empty queue + Dequeues an empty value [.014 sec] (FAILED - 1) + Remains empty when null enqueued [.004 sec] (FAILED - 2) + Becomes non empty when non null value enqueued [.005 sec] (FAILED - 3) + A non empty queue + that is not full + Becomes longer when non null value enqueued [.005 sec] (FAILED - 4) + Becomes full when enqueued up to capacity [.005 sec] (FAILED - 5) + That is full + Ignores further enqueued values [.004 sec] (FAILED - 6) + Becomes non full when dequeued [.005 sec] (FAILED - 7) + Dequeues values in order enqueued [.006 sec] (FAILED - 8) + Remains unchanged when null enqueued [.004 sec] (FAILED - 9) + A new queue + Is empty [.007 sec] (FAILED - 10) + Preserves positive bounding capacity [.006 sec] (FAILED - 11) + Cannot be created with non positive bounding capacity [.005 sec] (FAILED - 12) +Failures: + 1) deq_empty_value + ORA-04067: not executed, package body "UT3.QUEUE_SPEC" does not exist + ORA-06508: PL/SQL: could not find program unit being called: "UT3.QUEUE_SPEC" + ORA-06512: at line 6 +... +Finished in .088573 seconds +12 tests, 0 failed, 12 errored, 0 disabled, 0 warning(s) +``` + +Suite nesting allows for organizing tests into human-readable specification of behavior. ### Tags diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 9207f782f..4afbce48c 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -774,6 +774,16 @@ create or replace package body ut_suite_builder is l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); l_context_name := coalesce( a_annotations.by_line( l_context_pos ).text, gc_context||'_'||l_context_no ); + if regexp_like( l_context_name, '\.' ) or l_context_name is null then + if regexp_like( l_context_name, '\.' ) then + a_suite.put_warning( + 'Invalid value "'||l_context_name||'" for context name. The name cannot contain "." (hard stop) character.' || + ' Context name ignored and fallback to auto-name "'||gc_context||'_'||l_context_no||'" ' || + get_object_reference( a_suite, null, l_context_pos ) + ); + end if; + l_context_name := gc_context||'_'||l_context_no; + end if; l_context := ut_suite_context(a_suite.object_owner, a_suite.object_name, l_context_name, l_context_pos ); l_context.path := a_suite.path||'.'||l_context_name; l_context.description := a_annotations.by_line( l_context_pos ).text; diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index d4879cb83..82d7ec840 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -965,7 +965,6 @@ create or replace package body test_suite_builder is ); end; - --%test(Gives warning when two contexts have the same name) procedure duplicate_context_name is l_actual clob; l_annotations ut3.ut_annotations; @@ -1022,6 +1021,43 @@ create or replace package body test_suite_builder is ); end; + procedure hard_stop_in_ctx_name is + l_actual clob; + l_annotations ut3.ut_annotations; + l_bad_name varchar2(100); + begin + --Arrange + l_bad_name := 'Context with invalid name. Should fail'; + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(4, 'context','Context with invalid name. Should fail', null), + ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3.ut_annotation(13, 'endcontext',null, null) + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%Invalid value "'||l_bad_name||'" for context name. The name cannot contain "." (hard stop) character. Context name ignored and fallback to auto-name "context_1"%' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%context_1Context with invalid name. Should failsome_package.context_1' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.context_1.test_in_a_context' || + '%' || + '%' || + '%' || + '%' || + ''|| + '' + ); + end; + procedure throws_value_empty is l_actual clob; l_annotations ut3.ut_annotations; @@ -1551,13 +1587,13 @@ create or replace package body test_suite_builder is ); ut.expect(l_actual).to_be_like( '%Invalid value "bad tag" for "--%tags" annotation.'|| - ' See documentation for details on valid tag values. Annotation value ignored. -at package "UT3_TESTER.SOME_PACKAGE", line 3%' + ' See documentation for details on valid tag values. Annotation value ignored.' || + '%at package "UT3_TESTER.SOME_PACKAGE", line 3%' ); ut.expect(l_actual).to_be_like( '%Invalid value "bad tag" for "--%tags" annotation.'|| - ' See documentation for details on valid tag values. Annotation value ignored. -at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' + ' See documentation for details on valid tag values. Annotation value ignored.' || + '%at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' ); end; @@ -1581,13 +1617,13 @@ at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9 ); ut.expect(l_actual).to_be_like( '%Invalid value "-invalid_tag" for "--%tags" annotation.'|| - ' See documentation for details on valid tag values. Annotation value ignored. -at package "UT3_TESTER.SOME_PACKAGE", line 3%' + ' See documentation for details on valid tag values. Annotation value ignored.' || + '%at package "UT3_TESTER.SOME_PACKAGE", line 3%' ); ut.expect(l_actual).to_be_like( '%Invalid value "-invalid_tag" for "--%tags" annotation.'|| - ' See documentation for details on valid tag values. Annotation value ignored. -at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' + ' See documentation for details on valid tag values. Annotation value ignored.' || + '%at package "UT3_TESTER.SOME_PACKAGE.TEST_PROCEDURE", line 9%' ); end; diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index 3fd08607f..c9683cd9e 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -134,6 +134,9 @@ create or replace package test_suite_builder is --%test(Gives warning when two contexts have the same name and ignores duplicated context) procedure duplicate_context_name; + --%test(Fallback to default naming and gives warning when context name contains "." character) + procedure hard_stop_in_ctx_name; + --%endcontext --%context(throws) From 0070cf8ed0bf6ed33cf395f19640d7d4823fcaf2 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Thu, 24 Oct 2019 00:04:58 +0100 Subject: [PATCH 34/50] changed hard stop to "full stop/period" --- docs/userguide/annotations.md | 2 +- source/core/ut_suite_builder.pkb | 2 +- test/ut3_tester/core/test_suite_builder.pkb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 5f51c4229..51d94215d 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1014,7 +1014,7 @@ Context have following characteristics: - context name must be unique within it's parent (suite or parent context) - if context name is not unique within it's parent, context and it's entire content is excluded from execution - context name should not contain spaces or special characters -- context name cannot contain a `.` (hard stop) character +- context name cannot contain a `.` (full stop/period) character - contexts can be nested, so a context can be nested within another context - suite/context can have multiple nested sibling contexts in it - contexts can have their own `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 4afbce48c..197bec926 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -777,7 +777,7 @@ create or replace package body ut_suite_builder is if regexp_like( l_context_name, '\.' ) or l_context_name is null then if regexp_like( l_context_name, '\.' ) then a_suite.put_warning( - 'Invalid value "'||l_context_name||'" for context name. The name cannot contain "." (hard stop) character.' || + 'Invalid value "'||l_context_name||'" for context name. The name cannot contain "." (full stop/period) character.' || ' Context name ignored and fallback to auto-name "'||gc_context||'_'||l_context_no||'" ' || get_object_reference( a_suite, null, l_context_pos ) ); diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index 82d7ec840..97de59c11 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -1038,7 +1038,7 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Invalid value "'||l_bad_name||'" for context name. The name cannot contain "." (hard stop) character. Context name ignored and fallback to auto-name "context_1"%' + '%Invalid value "'||l_bad_name||'" for context name. The name cannot contain "." (full stop/period) character. Context name ignored and fallback to auto-name "context_1"%' ); ut.expect(l_actual).to_be_like( ''|| From 8f0b267086cc84feef0156a97d9f07626b73b1d1 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Thu, 24 Oct 2019 00:11:51 +0100 Subject: [PATCH 35/50] Cleanup --- source/core/ut_suite_builder.pkb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 197bec926..4ab68afa6 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -829,7 +829,7 @@ create or replace package body ut_suite_builder is end loop; end; - procedure warning_on_floating_endcontext( + procedure warning_on_extra_endcontext( a_suite in out nocopy ut_suite, a_package_ann_index tt_annotations_by_name ) is @@ -915,7 +915,7 @@ create or replace package body ut_suite_builder is add_tests_to_items( l_suite, l_annotations, a_suite_items ); --by this time all contexts were consumed and l_annotations should not have any context/endcontext annotation in it. - warning_on_floating_endcontext( l_suite, l_annotations.by_name ); + warning_on_extra_endcontext( l_suite, l_annotations.by_name ); a_suite_items.extend; a_suite_items( a_suite_items.last) := l_suite; From c905233228c41d1edb367af53bbc6c412d9e240c Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Thu, 24 Oct 2019 01:08:36 +0100 Subject: [PATCH 36/50] Added downloads badge --- readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 864e1041e..e839f0620 100644 --- a/readme.md +++ b/readme.md @@ -2,8 +2,9 @@ ---------- -[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL.svg)](https://github.com/utPLSQL/utPLSQL/releases) [![license](https://img.shields.io/github/license/utPLSQL/utPLSQL.svg)](https://www.apache.org/licenses/LICENSE-2.0) +[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL.svg)](https://github.com/utPLSQL/utPLSQL/releases) +[![Github All Releases](https://img.shields.io/github/downloads/utPLSQL/utPLSQL/total.svg)](https://github.com/utPLSQL/utPLSQL/releases) [![chat](http://img.shields.io/badge/slack-team--chat-blue.svg)](http://utplsql-slack-invite.herokuapp.com/) [![twitter](https://img.shields.io/twitter/follow/utPLSQL.svg?style=social&label=Follow)](https://twitter.com/utPLSQL) From b07d0e9e08a8e29d99dbe19dcc939585a24adeaf Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 25 Oct 2019 00:58:08 +0000 Subject: [PATCH 37/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 8dd2880ca..20be91502 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 7cee48900..56b8d62ee 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 359cfc251..a2b31ae87 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 55e465162..1621645f8 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 3adbb4d3b..e231e5732 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 1e0ac467a..1dea6837c 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index c7dea5865..c49289dc6 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 6ad0b7941..f1f6affe6 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index e8015225a..06e15c120 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 9d47351db..d519584a3 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 67f199fd6..157921f9b 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 95a9e9ef4..46d803623 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 6a49191c8..de8ccb8f0 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 8dc06652b..13f948168 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 747cfe3ba..0d0d0b0c7 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 66acceabb..88b45f981 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.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 551115f8c..0d68018e3 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3245--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 5606423c9..a10cd5fed 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3245-develop + * secion v3.1.9.3253-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 011f64b25..ac763e9d5 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.9.3245-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3253-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 06a6881f6a5b370f1c8906e016876f21eca0b7fb Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Fri, 25 Oct 2019 02:11:34 +0100 Subject: [PATCH 38/50] Updated description of annotation types --- docs/userguide/annotations.md | 88 ++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index c49289dc6..8db62344f 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -9,11 +9,95 @@ The framework runner searches for all the suitable annotated packages, automatic Annotations are interpreted only in the package specification and are case-insensitive. We strongly recommend using lower-case annotations as described in this documentation. There are two distinct types of annotations, identified by their location in package: -- Procedure level annotations - placed directly before a procedure (`--%test`, `--%beforeall`, `--%beforeeach` etc.). -- Package level annotations - placed at any place in package except directly before procedure (`--%suite`, `--%suitepath` etc.). +### Procedure level annotations + +Annotation placed directly before a procedure (`--%test`, `--%beforeall`, `--%beforeeach` etc.). +There **can not** be any empty lines or comments between annotation line and procedure line. +There can be many annotations for a procedure. + +Valid procedure annotations example: +```sql +package test_package is + --%suite + + + --%test() + --%disabled + procedure my_first_procedure; + + $if dbms_db_version.version >= 12 $then --This is ok - annotation before procedure + --%test() + procedure my_first_procedure; + $end + + --A comment goes before annotations + --%test() + procedure my_first_procedure; +end; +``` + +Invalid procedure annotations examples: +```sql +package test_package is + --%suite + + --%test() --This is wrong as there is an empty line between procedure and annotation + + procedure my_first_procedure; + + --%test() + --This is wrong as there is a comment line between procedure and annotation + procedure proc1; + + --%test() --This is wrong as there is a compiler directive between procedure and annotation + $if dbms_db_version.version >= 12 $then + procedure proc_12; + $end + + --%test() + -- procedure another_proc; + /* The above is wrong as the procedure is commented out + and annotation is not procedure annotation anymore */ + +end; +``` + +### Package level annotations + +Those annotations placed at any place in package except directly before procedure (`--%suite`, `--%suitepath` etc.). We strongly recommend putting package level annotations at the very top of package except for the `--%context` annotations (described below) +Valid package annotations example: +```sql +package test_package is + + --%suite + + --%suitepath(org.utplsql.example) + + --%beforeall(some_package.some_procedure) + + --%context + + --%test() + procedure my_first_procedure; + --%endcontext +end; +``` + +Invalid package annotations examples: +```sql +package test_package is + --%suite --This is wrong as suite annotation is not a procedure annotation + procedure irrelevant; + + --%context --This is wrong as there is no empty line between package level annotation and procedure level annotation + --%test() + procedure my_first_procedure; + +end; +``` ## Supported annotations From c69af4651001e7bfdda61e88d0ca4804c8739a05 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 26 Oct 2019 22:26:29 +0000 Subject: [PATCH 39/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 20be91502..8194dd9e2 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 56b8d62ee..c23994d0a 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index a2b31ae87..badc71bee 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 1621645f8..d3996af6e 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index e231e5732..825789126 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 1dea6837c..4e3f340e4 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 8db62344f..0eb954e48 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index f1f6affe6..4bd6b6990 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 06e15c120..d815a375a 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index d519584a3..7c8850cce 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 157921f9b..f5f2cfbbe 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 46d803623..c07abd016 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index de8ccb8f0..7e2e403c3 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 13f948168..85b346f2d 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 0d0d0b0c7..1527349d8 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 88b45f981..bae5d60f4 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.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 0d68018e3..ca4d10cd8 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3253--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index a10cd5fed..fb7275ed7 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3253-develop + * secion v3.1.9.3258-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index ac763e9d5..849d8d552 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.9.3253-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3258-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From be39586c8ee666100d267cf8e389f3f0cdb875b7 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Sun, 27 Oct 2019 12:28:57 +0000 Subject: [PATCH 40/50] Added support for `--%name` annotation, to name the contexts. Changed behavior of ``--%context` annotation. The value f annotation now only indicates the context description. Resolves #1016 --- docs/userguide/annotations.md | 161 ++++++++-- source/core/ut_suite_builder.pkb | 120 +++++--- test/ut3_tester/core/test_suite_builder.pkb | 291 +++++++++++++++--- test/ut3_tester/core/test_suite_builder.pks | 57 ++-- test/ut3_tester/core/test_suite_manager.pkb | 4 +- test/ut3_user/api/test_ut_run.pkb | 5 +- test/ut3_user/reporters.pkb | 4 +- .../reporters/test_realtime_reporter.pkb | 17 +- 8 files changed, 506 insertions(+), 153 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index ddfec86f1..f8fbaa25d 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -21,9 +21,9 @@ We strongly recommend putting package level annotations at the very top of packa | --- | --- | --- | | `--%suite()` | Package | Mandatory. Marks package as a test suite. Optional suite description can be provided (see `displayname`). | | `--%suitepath()` | Package | Similar to java package. The annotation allows logical grouping of suites into hierarchies. | -| `--%displayname()` | Package/procedure | Human-readable and meaningful description of a context/suite/test. Provides description to a `context` when used within `context`. When used with `test` or `suite` annotation, overrides the `` provided with `suite`/`test`. | +| `--%displayname()` | Package/procedure | Human-readable and meaningful description of a context/suite/test. Overrides the `` provided with `suite`/`test`/`context` annotation. This annotation is redundant and might be removed in future releases. | | `--%test()` | Procedure | Denotes that the annotated procedure is a unit test procedure. Optional test description can by provided (see `displayname`). | -| `--%throws([,...])`| Procedure | Denotes that the annotated test procedure must throw one of the exceptions provided. Supported forms of exceptions are: numeric literals, numeric contant names, exception constant names, predefined Oracle exception names. | +| `--%throws([,...])`| Procedure | Denotes that the annotated test procedure must throw one of the exceptions provided. Supported forms of exceptions are: numeric literals, numeric constant names, exception constant names, predefined Oracle exception names. | | `--%beforeall` | Procedure | Denotes that the annotated procedure should be executed once before all elements of the suite. | | `--%beforeall([[.].][,...])` | Package | Denotes that the mentioned procedure(s) should be executed once before all elements of the suite. | | `--%afterall` | Procedure | Denotes that the annotated procedure should be executed once after all elements of the suite. | @@ -36,7 +36,8 @@ We strongly recommend putting package level annotations at the very top of packa | `--%aftertest([[.].][,...])` | Procedure | Denotes that mentioned procedure(s) should be executed after the annotated `%test` procedure. | | `--%rollback()` | Package/procedure | Defines transaction control. Supported values: `auto`(default) - a savepoint is created before invocation of each "before block" is and a rollback to specific savepoint is issued after each "after" block; `manual` - rollback is never issued automatically. Property can be overridden for child element (test in suite) | | `--%disabled` | Package/procedure | Used to disable a suite or a test. Disabled suites/tests do not get executed, they are however marked and reported as disabled in a test run. | -| `--%context()` | Package | Denotes start of a named context (sub-suite) in a suite package | +| `--%context()` | Package | Denotes start of a named context (sub-suite) in a suite package an optional description for context can be provided. | +| `--%name()` | Package | Denotes name for a context. Must be placed after the context annotation and before start of nested context. | | `--%endcontext` | Package | Denotes end of a nested context (sub-suite) in a suite package | | `--%tags` | Package/procedure | Used to label a test or a suite for purpose of identification | @@ -1008,14 +1009,15 @@ Contexts allow for creating sub-suites within a suite package and they allow for In essence, context behaves like a suite within a suite. Context have following characteristics: -- context starts with the `--%context` annotation and ends with `--%endcontext` -- can have a name provided as parameter for example `--%context(remove_rooms_by_name)`. This is different than with `suite` and `test` annotations, where name is taken from test `package/procedure` -- when no name is provided for context, the context is named `context_N` where `N` is the number of the context in suite or parent context -- context name must be unique within it's parent (suite or parent context) +- context starts with the `--%context` annotation and ends with `--%endcontext`. Everything placed between those two annotations belongs to that context +- can have a description provided as parameter for example `--%context(Some interesting stuff)`. +- can have a name provided with `--%name` annotation. This is different than with `suite` and `test` annotations, where name is taken from `package/procedure` name. +- contexts can be nested, you can place a context inside another context +- when no name is provided for context, the context is named `context_N` where `N` is the number of the context in suite or parent context. +- context name must be unique within it's parent (suite / parent context) - if context name is not unique within it's parent, context and it's entire content is excluded from execution - context name should not contain spaces or special characters - context name cannot contain a `.` (full stop/period) character -- contexts can be nested, so a context can be nested within another context - suite/context can have multiple nested sibling contexts in it - contexts can have their own `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures - `--%beforeall`, `--%beforeeach`, `--%afterall` and `--%aftereach` procedures defined at ancestor level, propagate to context @@ -1231,8 +1233,7 @@ Example of nested contexts test suite specification. create or replace package queue_spec as --%suite(Queue specification) - --%context(a_new_queue) - --%displayname(A new queue) + --%context(A new queue) --%test(Is empty) procedure is_empty; @@ -1241,8 +1242,7 @@ create or replace package queue_spec as --%test(Cannot be created with non positive bounding capacity) procedure non_positive_bounding_cap; --%endcontext - --%context(an_empty_queue) - --%displayname(An empty queue) + --%context(An empty queue) --%test(Dequeues an empty value) procedure deq_empty_value; @@ -1251,19 +1251,16 @@ create or replace package queue_spec as --%test(Becomes non empty when non null value enqueued) procedure non_empty_after_enq; --%endcontext - --%context(a_non_empty_queue) - --%displayname(A non empty queue) + --%context(A non empty queue) - --%context(that_is_not_full) - --%displayname(that is not full) + --%context(that is not full) --%test(Becomes longer when non null value enqueued) procedure grow_on_enq_non_null; --%test(Becomes full when enqueued up to capacity) procedure full_on_enq_to_cap; --%endcontext - --%context(that_is_full) - --%displayname(That is full) + --%context(that is full) --%test(Ignores further enqueued values) procedure full_ignore_enq; @@ -1312,6 +1309,122 @@ Finished in .088573 seconds Suite nesting allows for organizing tests into human-readable specification of behavior. +### Name +The `--%name` annotation is currently only used only for naming a context. +If a context doesn't have explicit name specified, then the name is given automatically by framework. + +The automatic name will be `context_#n` where `n` is a context number within a suite/parent context. + +The `--%name` can be useful when you would like to run only a specific context or its items by `suitepath`. + +Consider the below example. + +```sql +create or replace package queue_spec as + --%suite(Queue specification) + + --%context(A new queue) + + --%test(Cannot be created with non positive bounding capacity) + procedure non_positive_bounding_cap; + --%endcontext + --%context(An empty queue) + + --%test(Becomes non empty when non null value enqueued) + procedure non_empty_after_enq; + --%endcontext + --%context(A non empty queue) + + --%context(that is not full) + + --%test(Becomes full when enqueued up to capacity) + procedure full_on_enq_to_cap; + --%endcontext + --%context(that is full) + + --%test(Becomes non full when dequeued) + procedure non_full_on_deq; + --%endcontext + + --%endcontext +end; +``` + +In the above code, suitepaths, context names and context descriptions will be as follows. + +| suitepath | description | name | +|-----------|------------|------| +| queue_spec | Queue specification | queue_spec | +| queue_spec.context_#1 | A new queue | context_#1 | +| queue_spec.context_#2 | An empty queue | context_#2 | +| queue_spec.context_#3 | A non empty queue | context_#3 | +| queue_spec.context_#3.context_#1 | that is not full | context_#1 | +| queue_spec.context_#3.context_#2 | that is full | context_#2 | + +In order to run only the tests for the context `A non empty queue that is not full` you will need to call utPLSQL as below: +```sql + exec ut.run(':queue_spec.context_#3.context_#1'); +``` + +You can use `--%name` annotation to explicitly name contexts on suitepath. +```sql +create or replace package queue_spec as + --%suite(Queue specification) + + --%context(A new queue) + --%name(a_new_queue) + + --%test(Cannot be created with non positive bounding capacity) + procedure non_positive_bounding_cap; + --%endcontext + --%context(An empty queue) + --%name(an_empty_queue) + + --%test(Becomes non empty when non null value enqueued) + procedure non_empty_after_enq; + --%endcontext + --%context(A non empty queue) + --%name(a_non_empty_queue) + + --%context(that is not full) + --%name(that_is_not_full) + + --%test(Becomes full when enqueued up to capacity) + procedure full_on_enq_to_cap; + --%endcontext + --%context(that is full) + --%name(that_is_full) + + --%test(Becomes non full when dequeued) + procedure non_full_on_deq; + --%endcontext + + --%endcontext +end; +``` + +In the above code, suitepaths, context names and context descriptions will be as follows. + +| suitepath | description | name | +|-----------|------------|------| +| queue_spec | Queue specification | queue_spec | +| queue_spec.a_new_queue | A new queue | a_new_queue | +| queue_spec.an_empty_queue | An empty queue | an_empty_queue | +| queue_spec.a_non_empty_queue | A non empty queue | a_non_empty_queue | +| queue_spec.a_non_empty_queue.that_is_not_full | that is not full | that_is_not_full | +| queue_spec.a_non_empty_queue.that_is_full | that is full | that_is_full | + + +The `--%name` annotation is only relevant for: +- running subsets of tests by given context suitepath +- some of test reports, like `ut_junit_reporter` that use suitepath or test-suite element names (not descriptions) for reporting + +#### Name naming convention + +The value of `--%name` annotation must follow the following naming rules: +- cannot contain spaces +- cannot contain a `.` (full stop/dot) +- is case-insensitive ### Tags @@ -1440,8 +1553,9 @@ If you want to create tests for your application it is recommended to structure * Payments recognition * Payments set off -The `%suitepath` annotation is used for such grouping. Even though test packages are defined in a flat structure the `%suitepath` is used by the framework to form them into a hierarchical structure. Your payments recognition test package might look like: +The `--%suitepath` annotation is used for such grouping. Even though test packages are defined in a flat structure the `--%suitepath` is used by the framework to form them into a hierarchical structure. +Your payments recognition test package might look like: ```sql create or replace package test_payment_recognition as @@ -1476,8 +1590,8 @@ create or replace package test_payment_set_off as end test_payment_set_off; ``` -When you execute tests for your application, the framework constructs a test suite for each test package. Then it combines suites into grouping suites by the `%suitepath` annotation value so that the fully qualified path to the `recognize_by_num` procedure is `USER:payments.test_payment_recognition.test_recognize_by_num`. If any of its expectations fails then the test is marked as failed, also the `test_payment_recognition` suite, the parent suite `payments` and the whole run is marked as failed. -The test report indicates which expectation has failed on the payments module. The payments recognition submodule is causing the failure as `recognize_by_num` has not met the expectations of the test. Grouping tests into modules and submodules using the `%suitepath` annotation allows you to logically organize your project's flat structure of packages into functional groups. +When you execute tests for your application, the framework constructs a test suite for each test package. Then it combines suites into grouping suites by the `--%suitepath` annotation value so that the fully qualified path to the `recognize_by_num` procedure is `USER:payments.test_payment_recognition.test_recognize_by_num`. If any of its expectations fails then the test is marked as failed, also the `test_payment_recognition` suite, the parent suite `payments` and the whole run is marked as failed. +The test report indicates which expectation has failed on the payments module. The payments recognition submodule is causing the failure as `recognize_by_num` has not met the expectations of the test. Grouping tests into modules and submodules using the `--%suitepath` annotation allows you to logically organize your project's flat structure of packages into functional groups. An additional advantage of such grouping is the fact that every element level of the grouping can be an actual unit test package containing a common module level setup for all of the submodules. So in addition to the packages mentioned above you could have the following package. ```sql @@ -1493,9 +1607,10 @@ create or replace package payments as end payments; ``` -A `%suitepath` can be provided in three ways: + +When executing tests, `path` for executing tests can be provided in three ways: * schema - execute all tests in the schema -* [schema]:suite1[.suite2][.suite3]...[.procedure] - execute all tests in all suites from suite1[.suite2][.suite3]...[.procedure] path. If schema is not provided, then the current schema is used. Example: `:all.rooms_tests` +* [schema]:suite1[.suite2][.suite3]...[.procedure] - execute all tests by `suitepath` in all suites on path suite1[.suite2][.suite3]...[.procedure]. If schema is not provided, then the current schema is used. Example: `:all.rooms_tests` * [schema.]package[.procedure] - execute all tests in the specified test package. The whole hierarchy of suites in the schema is built before all before/after hooks or part suites for the provided suite package are executed as well. Example: `tests.test_contact.test_last_name_validator` or simply `test_contact.test_last_name_validator` if `tests` is the current schema. diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index 4ab68afa6..b3c6f81dd 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -36,6 +36,7 @@ create or replace package body ut_suite_builder is gc_throws constant t_annotation_name := 'throws'; gc_rollback constant t_annotation_name := 'rollback'; gc_context constant t_annotation_name := 'context'; + gc_name constant t_annotation_name := 'name'; gc_endcontext constant t_annotation_name := 'endcontext'; type tt_annotations is table of t_annotation_name; @@ -57,6 +58,7 @@ create or replace package body ut_suite_builder is gc_throws, gc_rollback, gc_context, + gc_name, gc_endcontext ); @@ -747,21 +749,47 @@ create or replace package body ut_suite_builder is return l_result; end; - procedure get_suite_contexts_items( - a_suite in out nocopy ut_suite, + procedure get_context_items( + a_parent in out nocopy ut_suite, a_annotations in out nocopy t_annotations_info, a_suite_items out nocopy ut_suite_items, a_parent_context_pos in integer := 0 ) is - l_context_pos t_annotation_position; - l_end_context_pos t_annotation_position; - l_context_name t_object_name; - l_ctx_annotations t_annotations_info; - l_context ut_suite_context; - l_context_no binary_integer := 1; - l_context_items ut_suite_items; + l_context_pos t_annotation_position; + l_next_context_pos t_annotation_position; + l_end_context_pos t_annotation_position; + l_ctx_annotations t_annotations_info; + l_context ut_suite_context; + l_context_no binary_integer := 1; + l_context_items ut_suite_items; type tt_context_names is table of boolean index by t_object_name; - l_context_names tt_context_names; + l_used_context_names tt_context_names; + l_context_name t_object_name; + l_default_context_name t_object_name; + function get_context_name( + a_parent in out nocopy ut_suite, + a_context_names in tt_annotation_texts, + a_start_position binary_integer, + a_end_position binary_integer + ) return varchar2 is + l_result t_annotation_name; + l_found boolean; + l_annotation_pos binary_integer; + begin + l_annotation_pos := a_context_names.first; + while l_annotation_pos is not null loop + if l_annotation_pos > a_start_position and l_annotation_pos < a_end_position then + if l_found then + add_annotation_ignored_warning(a_parent, gc_name,'Duplicate annotation %%%.', l_annotation_pos); + else + l_result := a_context_names(l_annotation_pos); + end if; + l_found := true; + end if; + l_annotation_pos := a_context_names.next(l_annotation_pos); + end loop; + return l_result; + end; begin a_suite_items := ut_suite_items(); if not a_annotations.by_name.exists(gc_context) then @@ -771,35 +799,57 @@ create or replace package body ut_suite_builder is l_context_pos := a_annotations.by_name( gc_context).next(a_parent_context_pos); while l_context_pos is not null loop + l_default_context_name := 'nested_context_#'||l_context_no; l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); - - l_context_name := coalesce( a_annotations.by_line( l_context_pos ).text, gc_context||'_'||l_context_no ); - if regexp_like( l_context_name, '\.' ) or l_context_name is null then - if regexp_like( l_context_name, '\.' ) then - a_suite.put_warning( - 'Invalid value "'||l_context_name||'" for context name. The name cannot contain "." (full stop/period) character.' || - ' Context name ignored and fallback to auto-name "'||gc_context||'_'||l_context_no||'" ' || - get_object_reference( a_suite, null, l_context_pos ) + + l_next_context_pos := a_annotations.by_name(gc_context).next(l_context_pos); + if a_annotations.by_name.exists(gc_name) then + l_context_name := + get_context_name( + a_parent, + a_annotations.by_name( gc_name ), + l_context_pos, + least( + coalesce( l_end_context_pos, a_annotations.by_line.last ), + coalesce( l_next_context_pos, a_annotations.by_line.last ) + ) + ); + end if; + if not regexp_like( l_context_name, '^(\w|[$#])+$' ) or l_context_name is null then + if not regexp_like( l_context_name, '^(\w|[$#])+$' ) then + a_parent.put_warning( + 'Invalid value "'||l_context_name||'" for context name.' || + ' Context name ignored and fallback to auto-name "'||l_default_context_name||'" ' || + get_object_reference( a_parent, null, l_context_pos ) ); end if; - l_context_name := gc_context||'_'||l_context_no; + l_context_name := l_default_context_name; + end if; + if l_used_context_names.exists(l_context_name) then + add_annotation_ignored_warning( + a_parent, gc_name, + 'Context name "'||l_context_name||'" already used in this scope. Name must be unique.' || + ' Using fallback name '||l_default_context_name||'.', l_context_pos ); + l_context_name := l_default_context_name; end if; - l_context := ut_suite_context(a_suite.object_owner, a_suite.object_name, l_context_name, l_context_pos ); - l_context.path := a_suite.path||'.'||l_context_name; - l_context.description := a_annotations.by_line( l_context_pos ).text; + l_used_context_names(l_context_name) := true; + + l_context := ut_suite_context(a_parent.object_owner, a_parent.object_name, l_context_name, l_context_pos ); + l_context.path := a_parent.path||'.'||l_context_name; + l_context.description := coalesce( a_annotations.by_line( l_context_pos ).text, l_context_name ); l_context.parse_time := a_annotations.parse_time; --if nested context found - if a_annotations.by_name(gc_context).next(l_context_pos) < l_end_context_pos or l_end_context_pos is null then - get_suite_contexts_items( l_context, a_annotations, l_context_items, l_context_pos ); + if l_next_context_pos < l_end_context_pos or l_end_context_pos is null then + get_context_items( l_context, a_annotations, l_context_items, l_context_pos ); l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); else l_context_items := ut_suite_items(); end if; if l_end_context_pos is null then - a_suite.put_warning( - 'Missing "--%endcontext" annotation for a "--%context" annotation. The end of package is considered end of context.'|| get_object_reference( a_suite, null, l_context_pos ) + a_parent.put_warning( + 'Missing "--%endcontext" annotation for a "--%context" annotation. The end of package is considered end of context.'|| get_object_reference( a_parent, null, l_context_pos ) ); l_end_context_pos := a_annotations.by_line.last; end if; @@ -807,18 +857,12 @@ create or replace package body ut_suite_builder is --create a sub-set of annotations to process as sub-suite (context) l_ctx_annotations := get_annotations_in_context( a_annotations, l_context_pos, l_end_context_pos); - if l_context_names.exists(l_context_name) then - add_annotation_ignored_warning( a_suite, 'context', 'Context name must be unique in a suite. Context and all of it''s content ignored.', l_context_pos ); - else - l_context_names(l_context_name) := true; - - warning_on_duplicate_annot( l_context, l_ctx_annotations.by_name, gc_context ); + warning_on_duplicate_annot( l_context, l_ctx_annotations.by_name, gc_context ); - add_tests_to_items( l_context, l_ctx_annotations, l_context_items ); - add_items_to_list(a_suite_items, l_context_items); - a_suite_items.extend; - a_suite_items(a_suite_items.last) := l_context; - end if; + add_tests_to_items( l_context, l_ctx_annotations, l_context_items ); + add_items_to_list(a_suite_items, l_context_items); + a_suite_items.extend; + a_suite_items(a_suite_items.last) := l_context; -- remove annotations within context after processing them delete_annotations_range(a_annotations, l_context_pos, l_end_context_pos); @@ -910,7 +954,7 @@ create or replace package body ut_suite_builder is warning_on_duplicate_annot( l_suite, l_annotations.by_name, gc_suite ); build_suitepath( l_suite, l_annotations ); - get_suite_contexts_items( l_suite, l_annotations, a_suite_items ); + get_context_items( l_suite, l_annotations, a_suite_items ); --create suite tests and add add_tests_to_items( l_suite, l_annotations, a_suite_items ); diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index 97de59c11..9b2c26567 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -635,8 +635,8 @@ create or replace package body test_suite_builder is ut3.ut_annotation(1, 'suite','Cool', null), ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','a_context', null), - ut3.ut_annotation(5, 'displayname','A context', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(5, 'name','a_context', null), ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), ut3.ut_annotation(8, 'endcontext',null, null) @@ -683,23 +683,24 @@ create or replace package body test_suite_builder is ut3.ut_annotation( 1, 'suite','Cool', null), ut3.ut_annotation( 2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation( 3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation( 4, 'context','a_context', null), - ut3.ut_annotation( 5, 'displayname','A context', null), + ut3.ut_annotation( 4, 'context','A context', null), + ut3.ut_annotation( 5, 'name','a_context', null), ut3.ut_annotation( 6, 'beforeall',null, 'context_setup'), ut3.ut_annotation( 7, 'test', 'First test in context', 'first_test_in_a_context'), - ut3.ut_annotation( 8, 'context','a_nested_context', null), - ut3.ut_annotation( 9, 'displayname','A nested context', null), + ut3.ut_annotation( 8, 'context','A nested context', null), + ut3.ut_annotation( 9, 'name','a_nested_context', null), ut3.ut_annotation(10, 'beforeall',null, 'nested_context_setup'), ut3.ut_annotation(11, 'test', 'Test in nested context', 'test_in_nested_context'), ut3.ut_annotation(12, 'endcontext',null, null), - ut3.ut_annotation(13, 'context','nested_context_2', null), - ut3.ut_annotation(14, 'test', 'Test in nested context', 'test_in_nested_context_2'), - ut3.ut_annotation(15, 'context','a_nested_context_3', null), - ut3.ut_annotation(16, 'test', 'Test in nested context', 'test_in_nested_context_3'), - ut3.ut_annotation(17, 'endcontext',null, null), - ut3.ut_annotation(18, 'endcontext',null, null), - ut3.ut_annotation(19, 'test', 'Second test in context', 'second_test_in_a_context'), - ut3.ut_annotation(20, 'endcontext',null, null) + ut3.ut_annotation(13, 'context',null, null), + ut3.ut_annotation(14, 'name','nested_context_2', null), + ut3.ut_annotation(15, 'test', 'Test in nested context', 'test_in_nested_context_2'), + ut3.ut_annotation(16, 'context','a_nested_context_3', null), + ut3.ut_annotation(17, 'test', 'Test in nested context', 'test_in_nested_context_3'), + ut3.ut_annotation(18, 'endcontext',null, null), + ut3.ut_annotation(19, 'endcontext',null, null), + ut3.ut_annotation(20, 'test', 'Second test in context', 'second_test_in_a_context'), + ut3.ut_annotation(21, 'endcontext',null, null) ); --Act l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); @@ -716,10 +717,10 @@ create or replace package body test_suite_builder is '%nested_context_2nested_context_2some_package.a_context.nested_context_2' || '%' || '' || - '%a_nested_context_3a_nested_context_3some_package.a_context.nested_context_2.a_nested_context_3' || + '%nested_context_#1a_nested_context_3some_package.a_context.nested_context_2.nested_context_#1' || '%' || '' || - '%test_in_nested_context_3Test in nested contextsome_package.a_context.nested_context_2.a_nested_context_3.test_in_nested_context_3' || + '%test_in_nested_context_3Test in nested contextsome_package.a_context.nested_context_2.nested_context_#1.test_in_nested_context_3' || '%' || '' || '' || @@ -775,7 +776,7 @@ create or replace package body test_suite_builder is l_annotations := ut3.ut_annotations( ut3.ut_annotation(1, 'suite', 'Cool', null), ut3.ut_annotation(2, 'test', 'In suite', 'suite_level_test'), - ut3.ut_annotation(3, 'context', 'a_context', null), + ut3.ut_annotation(3, 'context', 'A context', null), ut3.ut_annotation(4, 'beforeall', 'context_beforeall', null), ut3.ut_annotation(5, 'beforeeach', null, 'context_beforeeach'), ut3.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), @@ -791,7 +792,7 @@ create or replace package body test_suite_builder is '' || '%' || '%' || - '%a_context' || + '%nested_context_#1A contextsome_package.nested_context_#1' || '%' || '%' || '%test_in_a_context' || @@ -827,7 +828,7 @@ create or replace package body test_suite_builder is ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'beforeeach',null, 'suite_level_beforeeach'), ut3.ut_annotation(4, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(5, 'context','a_context', null), + ut3.ut_annotation(5, 'context',null, null), ut3.ut_annotation(6, 'test', 'In context', 'test_in_a_context'), ut3.ut_annotation(7, 'endcontext',null, null), ut3.ut_annotation(8, 'aftereach',null, 'suite_level_aftereach'), @@ -841,7 +842,7 @@ create or replace package body test_suite_builder is '' || '%' || '%' || - '%a_context' || + '%nested_context_#1nested_context_#1some_package.nested_context_#1' || '%' || '%' || '%test_in_a_context' || @@ -876,8 +877,9 @@ create or replace package body test_suite_builder is ut3.ut_annotation(1, 'suite','Cool', null), ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','a_context', null), - ut3.ut_annotation(5, 'beforeall',null, 'context_setup'), + ut3.ut_annotation(4, 'context','Some context', null), + ut3.ut_annotation(5, 'name','a_context', null), + ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context') ); --Act @@ -891,7 +893,7 @@ create or replace package body test_suite_builder is ''|| '' || '%' || - '%a_contexta_contextsome_package.a_context' || + '%a_contextSome contextsome_package.a_context' || '%' || '' || '%test_in_a_contextIn contextsome_package.a_context.test_in_a_context' || @@ -922,8 +924,8 @@ create or replace package body test_suite_builder is ut3.ut_annotation(1, 'suite','Cool', null), ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','a_context', null), - ut3.ut_annotation(5, 'displayname','A context', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(5, 'name','a_context', null), ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), ut3.ut_annotation(8, 'endcontext',null, null), @@ -974,13 +976,13 @@ create or replace package body test_suite_builder is ut3.ut_annotation(1, 'suite','Cool', null), ut3.ut_annotation(2, 'beforeall',null, 'suite_level_beforeall'), ut3.ut_annotation(3, 'test','In suite', 'suite_level_test'), - ut3.ut_annotation(4, 'context','a_context', null), - ut3.ut_annotation(5, 'displayname','A context', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(5, 'name','a_context', null), ut3.ut_annotation(6, 'beforeall',null, 'context_setup'), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), ut3.ut_annotation(8, 'endcontext',null, null), - ut3.ut_annotation(9, 'context','a_context', null), - ut3.ut_annotation(10, 'displayname','A context', null), + ut3.ut_annotation(9, 'context','A context', null), + ut3.ut_annotation(10, 'name','a_context', null), ut3.ut_annotation(11, 'beforeall',null, 'setup_in_duplicated_context'), ut3.ut_annotation(12, 'test', 'In duplicated context', 'test_in_duplicated_context'), ut3.ut_annotation(13, 'endcontext',null, null) @@ -989,31 +991,43 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Context name must be unique in a suite. Context and all of it's content ignored.%at package "UT3_TESTER.SOME_PACKAGE", line 9%' + '%Context name "a_context" already used in this scope. Name must be unique. Using fallback name nested_context_#2.%%' ,'\' ); ut.expect(l_actual).to_be_like( ''|| '' || '%' || - '' || - '%a_contextA contextsome_package.a_context' || - '%' || - '' || - '%test_in_a_contextIn contextsome_package.a_context.test_in_a_context' || - '%' || - '' || - '' || - '%some_packagecontext_setup' || - '%' || - '' || - '' || - '' || - '%suite_level_testIn suitesome_package.suite_level_test' || - '%' || + '' || + '%nested_context_#2A contextsome_package.nested_context_#2' || + '%' || + '' || + '%test_in_duplicated_contextIn duplicated contextsome_package.nested_context_#2.test_in_duplicated_context' || + '%' || + '' || + '' || + '%some_packagesetup_in_duplicated_context' || + '%' || + '' || + '' || + '' || + '%a_contextA contextsome_package.a_context' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.a_context.test_in_a_context' || + '%' || + '' || + '' || + '%some_packagecontext_setup' || + '%' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || '' || '' || - '%some_packagesuite_level_beforeall' || + '%some_packagesuite_level_beforeall' || '%' || '' || ''|| @@ -1027,10 +1041,11 @@ create or replace package body test_suite_builder is l_bad_name varchar2(100); begin --Arrange - l_bad_name := 'Context with invalid name. Should fail'; + l_bad_name := 'ctx_with_dot.in_it'; l_annotations := ut3.ut_annotations( ut3.ut_annotation(1, 'suite','Cool', null), - ut3.ut_annotation(4, 'context','Context with invalid name. Should fail', null), + ut3.ut_annotation(4, 'context',null, null), + ut3.ut_annotation(5, 'name',l_bad_name, null), ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), ut3.ut_annotation(13, 'endcontext',null, null) ); @@ -1038,17 +1053,17 @@ create or replace package body test_suite_builder is l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); --Assert ut.expect(l_actual).to_be_like( - '%Invalid value "'||l_bad_name||'" for context name. The name cannot contain "." (full stop/period) character. Context name ignored and fallback to auto-name "context_1"%' + '%Invalid value "'||l_bad_name||'" for context name. Context name ignored and fallback to auto-name "nested_context_#1"%' ); ut.expect(l_actual).to_be_like( ''|| '' || '%' || '' || - '%context_1Context with invalid name. Should failsome_package.context_1' || + '%nested_context_#1nested_context_#1some_package.nested_context_#1' || '%' || '' || - '%test_in_a_contextIn contextsome_package.context_1.test_in_a_context' || + '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || '%' || '%' || '%' || @@ -1058,6 +1073,180 @@ create or replace package body test_suite_builder is ); end; + procedure name_with_spaces_invalid is + l_actual clob; + l_annotations ut3.ut_annotations; + l_bad_name varchar2(100); + begin + --Arrange + l_bad_name := 'context name with spaces'; + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(4, 'context',null, null), + ut3.ut_annotation(5, 'name',l_bad_name, null), + ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3.ut_annotation(13, 'endcontext',null, null) + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%Invalid value "'||l_bad_name||'" for context name. Context name ignored and fallback to auto-name "nested_context_#1"%' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%nested_context_#1nested_context_#1some_package.nested_context_#1' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || + '%' || + '%' || + '%' || + '%' || + ''|| + '' + ); + end; + + procedure duplicate_name_annotation is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(5, 'name','a_context_name', null), + ut3.ut_annotation(6, 'name','a_newer_context_name', null), + ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3.ut_annotation(8, 'endcontext',null, null), + ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%Duplicate annotation "--%name". Annotation ignored.%%' + ,'\' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%a_context_nameA contextsome_package.a_context_name' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.a_context_name.test_in_a_context' || + '%' || + '' || + '' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '' || + ''|| + '' + ); + end; + + procedure name_outside_of_context is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(3, 'name','a_context_name', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3.ut_annotation(8, 'endcontext',null, null), + ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%%' + ,'\' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%nested_context_#1A contextsome_package.nested_context_#1' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || + '%' || + '' || + '' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '' || + ''|| + '' + ); + end; + + procedure name_empty_value is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(5, 'name',null, null), + ut3.ut_annotation(7, 'test', 'In context', 'test_in_a_context'), + ut3.ut_annotation(8, 'endcontext',null, null), + ut3.ut_annotation(12, 'test', 'In suite', 'suite_level_test') + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%%' + ,'\' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%nested_context_#1A contextsome_package.nested_context_#1' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || + '%' || + '' || + '' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '' || + ''|| + '' + ); + end; + procedure throws_value_empty is l_actual clob; l_annotations ut3.ut_annotations; diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index c9683cd9e..f1fa7f157 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -2,8 +2,7 @@ create or replace package test_suite_builder is --%suite(suite_builder) --%suitepath(utplsql.ut3_tester.core) - --%context(suite) - --%displayname(--%suite annotation) + --%context(--%suite annotation) --%test(Sets suite name from package name and leaves description empty) procedure no_suite_description; @@ -16,8 +15,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(displayname) - --%displayname(--%displayname annotation) + --%context(--%displayname annotation) --%test(Overrides suite description using first --%displayname annotation) procedure suite_descr_from_displayname; @@ -30,8 +28,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(test) - --%displayname(--%test annotation) + --%context(--%test annotation) --%test(Creates a test item for procedure annotated with --%test annotation) procedure test_annotation; @@ -44,8 +41,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(suitepath) - --%displayname(--%suitepath annotation) + --%context(--%suitepath annotation) --%test(Sets suite path using first --%suitepath annotation) procedure suitepath_from_non_empty_path; @@ -61,8 +57,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(rollback) - --%displayname(--%rollback annotation) + --%context--%rollback annotation) --%test(Sets rollback type using first --%rollback annotation) procedure rollback_type_valid; @@ -78,8 +73,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(before_after_all_each) - --%displayname(--%before/after all/each annotations) + --%context(--%before/after all/each annotations) --%test(Supports multiple before/after all/each procedure level definitions) procedure multiple_before_after; @@ -110,11 +104,10 @@ create or replace package test_suite_builder is --%endcontext - --%context(context) - --%displayname(--%context annotation) + --%context(--%context annotation) - --%test(Creates nested suite for content between context/endcontext annotations) - procedure suite_from_context; + --%test(Creates nested suite for content between context/endcontext annotations) + procedure suite_from_context; --%test(Creates nested contexts inside a context) procedure nested_contexts; @@ -131,16 +124,31 @@ create or replace package test_suite_builder is --%test(Gives warning if --%endcontext is missing a preceding --%context) procedure endcontext_without_context; - --%test(Gives warning when two contexts have the same name and ignores duplicated context) + --%test(Gives warning when two contexts have the same name and falls back to default context name) procedure duplicate_context_name; - --%test(Fallback to default naming and gives warning when context name contains "." character) + --%endcontext + + --%context(--%name annotation) + + --%test(Falls back to default context name and gives warning when context name contains "." character) procedure hard_stop_in_ctx_name; + --%test(Falls back to default context name and gives warning when name contains spaces) + procedure name_with_spaces_invalid; + + --%test(Raises warning when more than one name annotation used ) + procedure duplicate_name_annotation; + + --%test(Is ignored when used outside of context - no warning given) + procedure name_outside_of_context; + + --%test(Is ignored when name value is empty) + procedure name_empty_value; + --%endcontext - --%context(throws) - --%displayname(--%throws annotation) + --%context(--%throws annotation) --%test(Gives warning if --%throws annotation has no value) procedure throws_value_empty; @@ -150,8 +158,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(beforetest_aftertest) - --%displayname(--%beforetest/aftertest annotation) + --%context(--%beforetest/aftertest annotation) --%test(Supports multiple occurrences of beforetest/aftertest for a test) procedure before_aftertest_multi; @@ -167,8 +174,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(unknown_annotation) - --%displayname(--%bad_annotation) + --%context(--%bad_annotation) --%test(Gives warning when unknown procedure level annotation passed) procedure test_bad_procedure_annotation; @@ -178,8 +184,7 @@ create or replace package test_suite_builder is --%endcontext - --%context(tags_annotation) - --%displayname(--%tag_annotation) + --%context(--%tag_annotation) --%test(Build suite test with tag) procedure test_tag_annotation; diff --git a/test/ut3_tester/core/test_suite_manager.pkb b/test/ut3_tester/core/test_suite_manager.pkb index 6f4237f9c..e693771b4 100644 --- a/test/ut3_tester/core/test_suite_manager.pkb +++ b/test/ut3_tester/core/test_suite_manager.pkb @@ -259,8 +259,8 @@ end test_package_3;]'; gv_glob_val number; - --%context(some_context) - --%displayname(Some context description) + --%context(Some context description) + --%name(some_context) --%test --%displayname(Test1 from test package 1) diff --git a/test/ut3_user/api/test_ut_run.pkb b/test/ut3_user/api/test_ut_run.pkb index 46d7d6f80..feac3fe6e 100644 --- a/test/ut3_user/api/test_ut_run.pkb +++ b/test/ut3_user/api/test_ut_run.pkb @@ -1080,9 +1080,8 @@ Failures:% --%beforeall procedure before_suite; - --%context(some_context) - - --%displayname(context description) + --%context(context description) + --%name(some_context) --%beforeall procedure before_context; diff --git a/test/ut3_user/reporters.pkb b/test/ut3_user/reporters.pkb index 6d6d573aa..9f571a589 100644 --- a/test/ut3_user/reporters.pkb +++ b/test/ut3_user/reporters.pkb @@ -14,8 +14,8 @@ as --%beforeeach procedure beforeeach; - --%context(some_context) - --%displayname(A description of some context) + --%context(A description of some context) + --%name(some_context) --%test --%beforetest(beforetest) diff --git a/test/ut3_user/reporters/test_realtime_reporter.pkb b/test/ut3_user/reporters/test_realtime_reporter.pkb index 8eb490a11..155925f0f 100644 --- a/test/ut3_user/reporters/test_realtime_reporter.pkb +++ b/test/ut3_user/reporters/test_realtime_reporter.pkb @@ -9,7 +9,8 @@ create or replace package body test_realtime_reporter as --%suite(suite ) --%suitepath(realtime_reporting) - --%context(test context) + --%context + --%name(test_context) --%test(test 1 - OK) procedure test_1_ok; @@ -164,12 +165,12 @@ create or replace package body test_realtime_reporter as select 'post-test' as event_type, 'realtime_reporting.check_realtime_reporting2.test_5' as item_id from dual union all select 'post-suite' as event_type, 'realtime_reporting.check_realtime_reporting2' as item_id from dual union all select 'pre-suite' as event_type, 'realtime_reporting.check_realtime_reporting1' as item_id from dual union all - select 'pre-suite' as event_type, 'realtime_reporting.check_realtime_reporting1.test context' as item_id from dual union all - select 'pre-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test context.test_1_ok' as item_id from dual union all - select 'post-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test context.test_1_ok' as item_id from dual union all - select 'pre-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test context.test_2_nok' as item_id from dual union all - select 'post-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test context.test_2_nok' as item_id from dual union all - select 'post-suite' as event_type, 'realtime_reporting.check_realtime_reporting1.test context' as item_id from dual union all + select 'pre-suite' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context' as item_id from dual union all + select 'pre-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context.test_1_ok' as item_id from dual union all + select 'post-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context.test_1_ok' as item_id from dual union all + select 'pre-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context.test_2_nok' as item_id from dual union all + select 'post-test' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context.test_2_nok' as item_id from dual union all + select 'post-suite' as event_type, 'realtime_reporting.check_realtime_reporting1.test_context' as item_id from dual union all select 'post-suite' as event_type, 'realtime_reporting.check_realtime_reporting1' as item_id from dual union all select 'post-suite' as event_type, 'realtime_reporting' as item_id from dual union all select 'post-run' as event_type, null as item_id from dual; @@ -310,7 +311,7 @@ create or replace package body test_realtime_reporter as into l_actual from table(g_events) t where t.event_doc.extract('/event[@type="post-test"]/test/@id').getstringval() - = 'realtime_reporting.check_realtime_reporting1.test context.test_2_nok'; + = 'realtime_reporting.check_realtime_reporting1.test_context.test_2_nok'; ut.expect(l_actual).to_equal(l_expected); end single_failed_message; From 4ca4ea83b8d7713ede513b6e092286ef83e2a673 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 1 Nov 2019 22:54:37 +0000 Subject: [PATCH 41/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 8194dd9e2..bdb6d3bda 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index c23994d0a..fd79d6695 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index badc71bee..f933582b7 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index d3996af6e..b7e0c72c5 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 825789126..c5b31e165 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 4e3f340e4..534581d6d 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 864c0b8e5..e202907b8 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 4bd6b6990..222820ce9 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index d815a375a..9cf80ee91 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 7c8850cce..32cda255c 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index f5f2cfbbe..74d2a4d6f 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index c07abd016..187f9b070 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 7e2e403c3..bf5f93e48 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 85b346f2d..89257702c 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 1527349d8..4aa402a9d 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index bae5d60f4..408241e45 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.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index ca4d10cd8..fd303c445 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3258--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index fb7275ed7..a8561ee6f 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3258-develop + * secion v3.1.9.3261-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 849d8d552..75482a30b 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.9.3258-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3261-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From bc49a818fee8bff9371691e27a3e4bb9f762c262 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Sat, 2 Nov 2019 00:23:09 +0000 Subject: [PATCH 42/50] Fixed issue fit false-positive warnings on suites with multiple contexts. --- source/core/ut_suite_builder.pkb | 1 + test/ut3_tester/core/test_suite_builder.pkb | 87 +++++++++++++++++---- test/ut3_tester/core/test_suite_builder.pks | 3 + 3 files changed, 74 insertions(+), 17 deletions(-) diff --git a/source/core/ut_suite_builder.pkb b/source/core/ut_suite_builder.pkb index b3c6f81dd..c7e968467 100644 --- a/source/core/ut_suite_builder.pkb +++ b/source/core/ut_suite_builder.pkb @@ -800,6 +800,7 @@ create or replace package body ut_suite_builder is while l_context_pos is not null loop l_default_context_name := 'nested_context_#'||l_context_no; + l_context_name := null; l_end_context_pos := get_endcontext_position(l_context_pos, a_annotations.by_name ); l_next_context_pos := a_annotations.by_name(gc_context).next(l_context_pos); diff --git a/test/ut3_tester/core/test_suite_builder.pkb b/test/ut3_tester/core/test_suite_builder.pkb index 9b2c26567..a204a04e6 100644 --- a/test/ut3_tester/core/test_suite_builder.pkb +++ b/test/ut3_tester/core/test_suite_builder.pkb @@ -1225,23 +1225,76 @@ create or replace package body test_suite_builder is ut.expect(l_actual).to_be_like( ''|| '' || - '%' || - '' || - '%nested_context_#1A contextsome_package.nested_context_#1' || - '%' || - '' || - '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || - '%' || - '' || - '' || - '' || - '' || - '' || - '%suite_level_testIn suitesome_package.suite_level_test' || - '%' || - '' || - '' || - '' || + '%' || + '' || + '%nested_context_#1A contextsome_package.nested_context_#1' || + '%' || + '' || + '%test_in_a_contextIn contextsome_package.nested_context_#1.test_in_a_context' || + '%' || + '' || + '' || + '' || + '' || + '' || + '%suite_level_testIn suitesome_package.suite_level_test' || + '%' || + '' || + '' || + '' || + ''|| + '' + ); + end; + + procedure multiple_contexts is + l_actual clob; + l_annotations ut3.ut_annotations; + begin + --Arrange + l_annotations := ut3.ut_annotations( + ut3.ut_annotation(1, 'suite','Cool', null), + ut3.ut_annotation(4, 'context','A context', null), + ut3.ut_annotation(6, 'test', 'In context1', 'test_in_a_context1'), + ut3.ut_annotation(7, 'endcontext',null, null), + ut3.ut_annotation(8, 'context','A context', null), + ut3.ut_annotation(10, 'test', 'In context2', 'test_in_a_context2'), + ut3.ut_annotation(11, 'endcontext',null, null) + ); + --Act + l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); + --Assert + ut.expect(l_actual).to_be_like( + '%%' + ,'\' + ); + ut.expect(l_actual).to_be_like( + ''|| + '' || + '%' || + '' || + '%nested_context_#2A contextsome_package.nested_context_#2' || + '%' || + '' || + '%test_in_a_context2In context2some_package.nested_context_#2.test_in_a_context2' || + '%' || + '' || + '' || + '' || + '' || + '' || + '%nested_context_#1A contextsome_package.nested_context_#1' || + '%' || + '' || + '%test_in_a_context1In context1some_package.nested_context_#1.test_in_a_context1' || + '%' || + '' || + '' || + '' || + '' || + '' || + '' || + '' || ''|| '' ); diff --git a/test/ut3_tester/core/test_suite_builder.pks b/test/ut3_tester/core/test_suite_builder.pks index f1fa7f157..7a85cb946 100644 --- a/test/ut3_tester/core/test_suite_builder.pks +++ b/test/ut3_tester/core/test_suite_builder.pks @@ -146,6 +146,9 @@ create or replace package test_suite_builder is --%test(Is ignored when name value is empty) procedure name_empty_value; + --%test(Is ignored when name value is empty) + procedure multiple_contexts; + --%endcontext --%context(--%throws annotation) From b08ede3342d37dc7d0d66cecff7653f75eb3ad69 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 2 Nov 2019 01:30:35 +0000 Subject: [PATCH 43/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index bdb6d3bda..5d12e80bc 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index fd79d6695..02b0444d5 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index f933582b7..46387124c 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index b7e0c72c5..1fad16411 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index c5b31e165..6f4e2e89c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 534581d6d..b7a343daf 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index e202907b8..f7a290acb 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 222820ce9..b379a365e 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 9cf80ee91..55d1576f5 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 32cda255c..258013720 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 74d2a4d6f..747b870a1 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 187f9b070..eae29e6e7 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index bf5f93e48..4ec99932d 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 89257702c..6d34c3f36 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 4aa402a9d..0687597b1 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 408241e45..3aefc0abf 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.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index fd303c445..72027166b 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3261--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index a8561ee6f..11048010c 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3261-develop + * secion v3.1.9.3264-develop */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 75482a30b..fc3b7b046 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.9.3261-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3264-develop'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 57a89ba5a287522b302a098e8849416a1030caaa Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Tue, 5 Nov 2019 23:26:22 +0000 Subject: [PATCH 44/50] Touch readme to kickoff build. --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index e839f0620..2ccf8ee68 100644 --- a/readme.md +++ b/readme.md @@ -202,3 +202,4 @@ The utPLSQL project is community-driven and is not commercially motivated. Nonet + From 00d0fb444a35708870a7e7a4ab826c365b8e1390 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 5 Nov 2019 23:38:28 +0000 Subject: [PATCH 45/50] Updated project version after build [skip ci] --- VERSION | 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 +- sonar-project.properties | 2 +- source/core/ut_utils.pkb | 2 +- source/core/ut_utils.pks | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/VERSION b/VERSION index 272ed88b4..76cb3f689 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v3.1.9-develop +v3.1.9 diff --git a/docs/about/authors.md b/docs/about/authors.md index 5d12e80bc..b1b2e54bc 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 02b0444d5..8b4b6bd32 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 46387124c..764472025 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 1fad16411..5871e959b 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 6f4e2e89c..29908c561 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index b7a343daf..6fe817336 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index f7a290acb..da3a66f80 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index b379a365e..6e2befa91 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 55d1576f5..340e850c2 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 258013720..f4d782329 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 747b870a1..4114198f1 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index eae29e6e7..3c0e64fe0 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 4ec99932d..a119aafac 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 6d34c3f36..c669bb9d5 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 0687597b1..53d534a38 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 3aefc0abf..d91940646 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.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 72027166b..c724947bb 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3264--develop-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) # Upgrading from version 2 diff --git a/sonar-project.properties b/sonar-project.properties index bb6e0f621..da061019b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,7 +2,7 @@ sonar.projectKey=utPLSQL # this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. sonar.projectName=utPLSQL -sonar.projectVersion=v3.1.9-develop +sonar.projectVersion=v3.1.9 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # Since SonarQube 4.2, this property is optional if sonar.modules is set. diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 11048010c..b82e96cba 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3264-develop + * secion v3.1.9.3265 */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index fc3b7b046..24593501c 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.9.3264-develop'; + gc_version constant varchar2(50) := 'v3.1.9.3265'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From c724493e0569f6d8af8fbc8e6ff5838fc2fd1f55 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Wed, 6 Nov 2019 00:34:30 +0000 Subject: [PATCH 46/50] Updated documentation. Resolves: #1010 --- docs/userguide/annotations.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index da3a66f80..bddbcfc7d 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -3,12 +3,33 @@ # Annotations 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 configuration files or tables are needed. The annotation names are based on popular testing frameworks such as JUnit. +No additional configuration files or tables are needed for test cases. The annotation names are based on popular testing frameworks such as JUnit. The framework runner searches for all the suitable annotated packages, automatically configures suites, forms the suite hierarchy, executes it and reports results in specified formats. -Annotations are interpreted only in the package specification and are case-insensitive. We strongly recommend using lower-case annotations as described in this documentation. +Annotation is defined by: +- single line comment `--` (double dash) +- followed directly by a `%` (percent) +- followed by annotation name +- followed by optional annotation text placed in single brackets. -There are two distinct types of annotations, identified by their location in package: +All of text between first opening bracket and last closing bracket in annotation line is considered to be annotation text + +Examples: +`--%suite(The name of my test suite)` - represents `suite` annotation with text `The name of my test suite` + +utPLSQL interprets the whole line of annotation and will treat all the text from the first opening bracket in the line to the last closing bracket + +Example: + `--%suite(Stuff) -- we should name this ( correctly )` - represents `suite` annotation with text `Stuff) -- we should name this ( correctly ` + +Do not place comments within annotation line to avoid unexpected behaviors. + +**Note:** +>Annotations are interpreted only in the package specification and are case-insensitive. We strongly recommend using lower-case annotations as described in this documentation. + +There are two distinct types of annotations, identified by their location in package. +- package annotations +- procedure annotations ### Procedure level annotations From 05c063f851a549c2343ad836f7a036a722684909 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Wed, 6 Nov 2019 00:44:21 +0000 Subject: [PATCH 47/50] Dash-> hyphen --- docs/userguide/annotations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index bddbcfc7d..b8180e4be 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -7,7 +7,7 @@ No additional configuration files or tables are needed for test cases. The annot The framework runner searches for all the suitable annotated packages, automatically configures suites, forms the suite hierarchy, executes it and reports results in specified formats. Annotation is defined by: -- single line comment `--` (double dash) +- single line comment `--` (double hyphen) - followed directly by a `%` (percent) - followed by annotation name - followed by optional annotation text placed in single brackets. From 2f089b341706b11ff06495b5e3292b0396702a27 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 6 Nov 2019 01:03:11 +0000 Subject: [PATCH 48/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index b1b2e54bc..1f484feb4 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index 8b4b6bd32..c0907e2f8 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 764472025..0ac2bca5e 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 5871e959b..52ee71946 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index 29908c561..ce7cb39fa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index 6fe817336..e392a09c4 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index b8180e4be..034434c40 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 6e2befa91..9bcd04608 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 340e850c2..0957aa379 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index f4d782329..55829150a 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index 4114198f1..e5ca19f47 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index 3c0e64fe0..b7c581b75 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index a119aafac..3196fb54b 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index c669bb9d5..94c81e527 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 53d534a38..82119e5c7 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index d91940646..140197a48 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.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index c724947bb..026bcff1e 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3265-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index b82e96cba..887a38252 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3265 + * secion v3.1.9.3267 */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 24593501c..3c02855d0 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.9.3265'; + gc_version constant varchar2(50) := 'v3.1.9.3267'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall'; From 5b5ca128075a63f35eb824011b216b18f0794667 Mon Sep 17 00:00:00 2001 From: Jacek Gebal Date: Sat, 9 Nov 2019 23:35:14 +0000 Subject: [PATCH 49/50] Fixing issue with sonar token. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e11a3ca3b..b48adb107 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,7 @@ addons: - openjdk-9-jre-headless sonarcloud: organization: utplsql - token: - secure: ${SONAR_TOKEN} + token: ${SONAR_TOKEN} services: - docker From e1b8ee649da0a1a6f5f7186acd705a0fccf77448 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 9 Nov 2019 23:48:14 +0000 Subject: [PATCH 50/50] 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.pkb | 2 +- source/core/ut_utils.pks | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/about/authors.md b/docs/about/authors.md index 1f484feb4..776e5cd44 100644 --- a/docs/about/authors.md +++ b/docs/about/authors.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) ### utPLSQL v3 Major Contributors diff --git a/docs/about/license.md b/docs/about/license.md index c0907e2f8..edf1181bd 100644 --- a/docs/about/license.md +++ b/docs/about/license.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Version Information diff --git a/docs/about/project-details.md b/docs/about/project-details.md index 0ac2bca5e..46ddbf89b 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # utPLSQL Project Details diff --git a/docs/about/support.md b/docs/about/support.md index 52ee71946..4092c00c9 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # How to get support diff --git a/docs/index.md b/docs/index.md index ce7cb39fa..20d119f93 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Introduction to utPLSQL diff --git a/docs/userguide/advanced_data_comparison.md b/docs/userguide/advanced_data_comparison.md index e392a09c4..36ed86ae6 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Advanced data comparison diff --git a/docs/userguide/annotations.md b/docs/userguide/annotations.md index 034434c40..33950623d 100644 --- a/docs/userguide/annotations.md +++ b/docs/userguide/annotations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Annotations diff --git a/docs/userguide/best-practices.md b/docs/userguide/best-practices.md index 9bcd04608..3378cafe4 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Best Practices diff --git a/docs/userguide/coverage.md b/docs/userguide/coverage.md index 0957aa379..203daffe0 100644 --- a/docs/userguide/coverage.md +++ b/docs/userguide/coverage.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Coverage utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database. diff --git a/docs/userguide/exception-reporting.md b/docs/userguide/exception-reporting.md index 55829150a..3d01aafbd 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Exception handling and reporting diff --git a/docs/userguide/expectations.md b/docs/userguide/expectations.md index e5ca19f47..fe2369957 100644 --- a/docs/userguide/expectations.md +++ b/docs/userguide/expectations.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Expectation concepts Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data. diff --git a/docs/userguide/getting-started.md b/docs/userguide/getting-started.md index b7c581b75..aab93b2f8 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Getting started with TDD and utPLSQL diff --git a/docs/userguide/install.md b/docs/userguide/install.md index 3196fb54b..3d6e23843 100644 --- a/docs/userguide/install.md +++ b/docs/userguide/install.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Downloading latest version of utPLSQL diff --git a/docs/userguide/querying_suites.md b/docs/userguide/querying_suites.md index 94c81e527..ceb1cbb13 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Qyerying for test suites diff --git a/docs/userguide/reporters.md b/docs/userguide/reporters.md index 82119e5c7..798b2fd0b 100644 --- a/docs/userguide/reporters.md +++ b/docs/userguide/reporters.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) utPLSQL provides the following reporting formats. diff --git a/docs/userguide/running-unit-tests.md b/docs/userguide/running-unit-tests.md index 140197a48..2c8b4ebdd 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.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Running tests diff --git a/docs/userguide/upgrade.md b/docs/userguide/upgrade.md index 026bcff1e..5e48ee239 100644 --- a/docs/userguide/upgrade.md +++ b/docs/userguide/upgrade.md @@ -1,4 +1,4 @@ -![version](https://img.shields.io/badge/version-v3.1.9.3267-blue.svg) +![version](https://img.shields.io/badge/version-v3.1.9.3268-blue.svg) # Upgrading from version 2 diff --git a/source/core/ut_utils.pkb b/source/core/ut_utils.pkb index 887a38252..1e4b63c7f 100644 --- a/source/core/ut_utils.pkb +++ b/source/core/ut_utils.pkb @@ -766,7 +766,7 @@ create or replace package body ut_utils is /** * Change string into unicode to match xmlgen format _00_ * https://docs.oracle.com/en/database/oracle/oracle-database/12.2/adxdb/generation-of-XML-data-from-relational-data.html#GUID-5BE09A7D-80D8-4734-B9AF-4A61F27FA9B2 - * secion v3.1.9.3267 + * secion v3.1.9.3268 */ function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is begin diff --git a/source/core/ut_utils.pks b/source/core/ut_utils.pks index 3c02855d0..f1a19efb9 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.9.3267'; + gc_version constant varchar2(50) := 'v3.1.9.3268'; subtype t_executable_type is varchar2(30); gc_before_all constant t_executable_type := 'beforeall';