All notable changes to utPLSQL are documented here. Releases are available on the GitHub Releases page.
- Dropped support for Oracle Database versions older than 19c
- Add TAP reporter by @WayneNani in #1305
- Added duplicate detection on cursor comparison using
join_byby @lwasylow in #1295 - Fix code causing the object duration Oracle exception on oracle 23.26 by @lwasylow in #1310
- Packages with annotation-like comments are not test suites by @jgebal in #1313
- Performance improvements to annotation parsing by @lwasylow in #1312
- Updated documentation and copyright banners across source files @jgebal in #1319
- Added support for
andandoroperators when running tests by tags by @lwasylow in #1250
- Allow for test runs over 4 hours by @jgebal in #1243
- Framework performance improvements by @jgebal in #1249
- Support multiple expectation failures with teamcity reporter by @jgebal in #1251
- Update TFS reporter to correct format by @lwasylow in #1270
- Address issue where the
not_to(contain)did not run correctly by @lwasylow in #1246 - Fix regex to be NLS_SORT independent by @jgebal in #1253
- Fix output length error and output buffer. by @jgebal in #1255
- (docs): Update running-unit-tests.md - remove example by @gassenmj in #1261
- The line-rate is not recorded for packages and classes in cobertura coverage reporter by @lwasylow in #1269
- (docs): Fix nested list issue by @iamrachid in #1274
- Added documentation section on creating a custom reporter. Fixed in #1225, resolves #710
- Add ability to specify code coverage objects include/exclude masks as regular expressions. Fixed in #1186, resolves #1053
- Comparing collection that have long type names. Fixed in #1238, resolves #1235.
- Code coverage reporting on code with long lines. Fixed in #1240, resolves #1232, #1087.
- Code coverage reporting does not exclude tests. Fixed in #1226, resolves #1222.
- Uninstall script buffer overflow. Fixed in #1221, resolves #1220.
- Improved process of generating utPLSQL documentation. Implemented in 689bbd0, resolves #1237.
- Removed username env variables for internal development. Implemented in #1201, resolves #1200.
- Test execution data of utPLSQL project not showing on SonarCloud. Implemented in #1199, resolves #1198.
- Added support for description in the
--%disabledannotation. See documentation. Implemented in: #1183, resolves #610. - Added support for native
JSONdatatype on Oracle21c. Implemented in #1181, resolves #1114. - Added new mather
to_be_within( distance|pct ).of_(expoected). See documentation. Implemented in #1076, resolves #77.
- Improved performance of SQL used to retrieve Coverage sources. Implemented in #1187, resolves #1169.
- Added ability for utPLSQL to gather coverage on code invoking DBMS_STATS package. Implemented in #1184, resolves #1097, #1094.
- Fixed typos and improved documentation. Implemented in #1173, #1171
- Actual and Expected are now correctly reported when comparing
JSONdata. Implemented in #1181, resolves #1113. - Packages with removed annotations are now correctly recognized as non-utPLSQL packages. Implemented in #1180, resolves #1177.
- Fixed issues with comparison of nested object structures. Implemented in #1179, resolves #1082, #1083, #1098.
- Moved build and test process for utPLSQL from Travis to GithubActions. Implemented in #1175
- utPLSQL can now be used to generate coverage reports for external tools. See documentation Implemented in: #1079, resolves #1025
- Enhanced UT_COVERAGE_COBERTURA_REPORTER to better support TFS and GitLab. Implemented in #1137 and #1140, resolves #1107
- Added support for installation on Oracle 21c - removed dependency on DBMS_OBFUSCATION_TOOLKIT. Implemented in #1112, resolves #1111 and #1127
- Added support for running utPLSQL framework in parallel-enabled database. Implemented in #1160, resolves #1134
- Suite structure is built properly even with other than English TNS settings. Implemented in #1061, resolves #1060
- Fixed XML content reporting (CDATA) in UT_REALTIME_REPORTER used by SQLDeveloper plugin. Implemented in #1075, resolves #1073
- Fixed XML content reporting (CDATA) in JUnit reporter - regression. Implemented in #1085, resolves #1084
- Fixed issue with utPLSQL failing to run coverage reporting when trigger has overlapping name with procedure/function/package/type. Implemented in #1091, resolves #1086
- Fixed issue with parsing utPLSQL suites with DDL trigger when usign AUTHID clause. Implemented in #1093, resolves #1088
- Improved how privilege checks are handled by framework installation. Implemented in #1056, resolves #1050
- Restructured installation instructions to make it more readable. Implemented in #1063, resolves #1062
- Updated database requirements in documentation. Implemented in #1065, resolves #1064
- Removed duplicated call to install profiler tables. Implemented in #1164, resolves #1149
- Fixed failing internal framework tests on Oracle 21c. Implemented in #1158, resolves #1151
- Fixed confusing typo in documentation. Resolves #1154
- Moved build process from travis-ci.org to travis-ci.com. Implemented in #1152
- Added an example of reporter reporting all expectations, not only the failing ones. Implemented in #1092
- utPLSQL test runner is now validating arguments of
--%throwsannotations at runtime #721 #1033 - Documented limitations of insignificant spaces comparison in compound data #880
- utPLSQL will now detect empty annotation cache for schema even with DLL trigger enabled #975
- Order of procedures and annotation now determines default order of tests in suite #1036
- Nested contexts are now properly identified #1034
- TeamCity test reporter is now including error message #1045
- All self-tests for utPLSQL framework can now be executed using test-owner schema #969
- Misleading rollback warning is no longer showing when running self-tests for utPLSQL #982
- Added ability to define nested contexts within test suite #938
- Added ability to exclude tests/suites by tags when invoking a test-run #1007 #983
- Added new annotation
--%nameto allow for providing custom name for contexts #1016
The value of --%context annotation is no longer representing context name.
This value is now context description (displayname).
With this change, the --%context annotation is now aligned with --%test and --%suite annotation syntax.
New annotation --%name was introduced to facilitate naming of contexts.
- Improved documentation for running tests
- Improved documentation for tags #1003
- Improved documentation for annotations
- Fixed bug with bad stacktrace showing in failing/erroring test #1000
- Fixed issue with lack of validation for context name #966
- Fixed problem with install script privilege check for installation with DDL trigger #992
- Fixed issue with some common column names causing cursor comparison to fail #997
- Fixed issue with invocation of standalone expectations on cursor #998
- Fixed runability of utplsql self-tests #968
- Added support for session context to provide test and suite information during test run #963 #781
- Added ability to invoke expectations without running framework #956 #963
- Failing expectations are now reported with call stack #967 #963
- Improved framework table private data protection #922 #954
- Improved install process. It is now unified for installation with both public and private synonyms #957 #954
- Improved reporting of warnings for integration with SQLDeveloper #964
- Improved query to retrieve coverage sources #981 #970
- Improved security around malicious utPLSQL owner name #920
- Fixed cursor comparison on Oracle 11.2 #947
- Fixed issue with retrieving suite data #977 #974 #978
- Application context is now reset in session after test run #951
- Added support for comparing
jsonin Oracle 12.2 and above #924 - Introduced
tagannotation to enable tagging of tests and suites #66 - Added support for random order of test execution #422
- Added optional install with DDL trigger to speed up framework start #901
- Removed dependency on
dbms_utility.name_resolve#569 #885 - New output buffer table structures improving performance and addressing timeout issues #915
- Fixed
ut_realtime_reportermissing warnings in test and suite output structures #936 - Fixed output_buffer purging error #934
- Fixed
join_by / exclude / includeinvalid syntax on collection in anydata compare #912 - Fixed
ut_junit_reporterproducing invalid output on failing tests with long failure message #927 - Fixed
ut_sonar_test_reporterproducing invalid output on failing tests with long failure message #925 - Fixed
ut_coverage_cobertura_reporterproducing wrong line breaks which breaks the xml validation against DTD #917 - Fixed
excludeoption for ref cursor where column order was not resolved correctly #911 - Fixed
unorderedoption for ref cursor with null values #914 - Fixed number precision when selecting from dual #907
- Fixed ref cursor errors with generated column names #902
- Fixed
ORA-00907when comparing ref cursors with BINARY_ columns #899 - Fixed wrong results when comparing CLOBs with
to_be_likein Oracle Database 11.2.0.4 due to Oracle Bug 14402514 #891 - Fixed performance issue with code coverage report on huge PL/SQL code base #882
- Added install instructions for DDL trigger #874
- Fixed SQL vulnerability on all input parameters used in dynamic SQL and PL/SQL #921
- Fixed message id in output buffer #916
- Included 19c database in self testing #909
- Introduced testing with multiple schemas and different grants #893
- Fixed installation script warnings #879
Bugfix release for v3.1.5
- Fixed a bug in release
3.1.5whereto_equalmatcher was failing due to privileges when comparing non sql diffable types #870
- Reduced number of information displaying about user defined type. We will now display only type name instead of full structure #866
Bugfix release for v3.1.4
- Fixed a bug in release
3.1.4whereto_be_emptymatcher was failing due to privileges #864
This release contains a bug that is fixed by release 3.1.5 Please use release 3.1.5 rather than this release.
- Added
to_containmatcher for collections and cursors #79 - Added
unordered_columns(uc) option for cursor comparison to ignore the order of the columns #779 - Added
ut_debug_reporterfor debug logging #480 - Added
ut_realtime_reporterfor utPLSQL-SQLDeveloper extension #795
- Due to improvements of the cursor comparison, it is now necessary to use
ut.set_nls()before creating the cursor andut.reset_nls()after the expectation when comparing dates. More info in the docs
- Improved performance of cursor comparison #780
- Added support for installation on databases with block size < 8KB #848
- Added initial timeout to
ut_output_buffer#840 - Enhanced performance of
get_reporters_listfunction #814 - Moved calls of
dbms_lock.sleeptodbms_sessionfor newer DB versions #806 - utPLSQL coverage will now work without re-install after DB-upgrade from 12.1 to 12.2 #803
- Fixed problem with REGEXP in annotation parsing with NLS CANADIAN FRENCH #844
- Fixed issue with Rollback to savepoint failing on distributed transaction #839
- Fixed reporting of differences when comparing collections scalar values #835
- Fixed issue with test run failing due to too many transaction invalidators #834
- Fixed randomly occurring error during cursor comparison #827
- utPLSQL install script will now support special characters in passwords #804
- Fixed documentation examples for context annotation #851
- Added description on how to check version of utPLSQL #822
- Implemented Sonar analysis on DBA Views #850
- Finished migration from old-tests #475
- Fixed shell scripts to support multiple unix dialects (especially for macOS) #796
- Added info on project support from Redgate #841
- Added
code_of_conduct#836 - Added issue templates #842
- Added utPLSQL logo #845
- added function
ut_runner.is_test#788 - added function
ut_runner.is_suite#787 - added function
ut_runner.has_suites#786 - added ability to disable automatic rollback for a test-run #784
- when invoked with package name, utPLSQL will now run only tests from specified package even if package has child packages by suitepath #776
- Improved performance of schema-scanning and utPLSQL startup #778
- Improved performance of output-buffer #777
- Improved documentation to mention ability to pass client encoding for HTML & XML reports #775
- Improved documentation for cursor comparison to mention challenges with TIMESTAMP bind variables
- utPLSQL code coverage will now work properly with long object names #716
- utPLSQL installation will now also work properly, when user performing the install has
ANYgrants #737 - fixed documentation bug for
--%contextwith--%displayname#726 - fixed Teamcity reporter issues with missing escape for some characters and long messages #747
- fixed issue with sonar test results reporter when contexts are used #749
- fixed issue with ORA-07455 getting thrown on cursor comparison #752
- fixed issue with wrong failure message for unordered data #764
- fixed missing privilege issue for unordered/join-by cursor data comparison #765 #770
- added suite-level cache to allow for faster retrieval of suite contents and enable implementation of additional features #783
- Added ability to join and compare cursor content by specific columns (PK/UK) #453
- Added support for comma separated list of suite paths/packages when calling
ut.run#479 - Added ability to run a test package that got invalidated due to dependency invalidation #489
- Added support for package level constants and predefined exceptions in
--%throwsannotation #685 - Added support for standalone
--%beforeall,--%beforeeach,--%afterall,--%aftereachannotations with list of procedures to execute #649 - Added support for list of procedure names in before/after annotations #649
- Added support for BLOB/CLOB in
is_empty()matcher #707
- utPLSQL will now provide additional warnings, when unsupported annotations are found in a unit test suite package #624
- utPLSQL will now produce valid XML in UT_JUNIT_REPORTER when dbms_output or test results contain
<![CDATA[text #643 - improved installation process for non-DBA users #658
- added
uninstall_all.sqlscript that completely removes utPLSQL objects #673 - Changed the way contexts are named #674
- Added ability to pass client encoding information for XML/HTML reporting (requires utPLSQL-cli 3.1.1) #676
- Exposed base objects for expectations, so that IDE like DataGrip can provide auto-complete #675
- Both context-name as well as procedure inside context can now be passed as parameter to
ut.run()#679 - Added validation of privileges before installation of utPLSQL #693
- UT_JUNIT_REPORTER does not report tests when procedure names are not all lower-case #659 #696
- Fixed utPLSQL installation order to avoid warnings/failures on install #657
- Fixed uninstall process for utPLSQL #673
- Fixed syntax errors in HTML coverage report #681 #682
- Fixed install requirements documentation #687
- Fixed capturing of DBMS_OUTPUT buffer at the start of test run #686
- Added continuous testing of XML/HTML reports format #684
- Added sonarcloud branch-based and PR code analysis #708
- Added ability to trigger builds on sub-projects #501
Bugfix release for v3.1.0
- #653 Block coverage reporting doesn't work on schema other than framework owner
- #652 Reporter threads timeout and do not produce outputs when running with
utplsql-cliand idle time exceeds 1 minute.
Starting with this release, utPLSQL-sql-cli is no longer supported.
Use utPLSQL-cli release 3.1.0 or above to interact with this and upcoming versions of utPLSQL.
- Added support for extended block coverage on Oracle 12.2 and above. Coverage reporters will now indicate partly covered lines (where applicable by coverage format).
- Added new
ut_tfs_junit_reporterfor MS Team Foundation Server to support old JUnit xml format - Added new coverage reporter
ut_coverage_cobertura_reporter - Fixed compatibility issues with
ut_xunit_reporter. The reporter now conforms to the format specification. - Added
ut_junit_reporteras a base forut_xunit_reporter. Theut_xunit_reporterremains active for backward compatibility but is considered depreciated - Added reporting of differences when comparing cursors, oracle object and table types
- Aligned
ut_documentation_reporterto display tests annotated--%disabledasDISABLED - Added support for reporters that don't provide output to the API (reporters saving data to DB)
- Improved API so that it's possible to support custom reporters from
utPLSQL-java-apiwithout code changes
- added
throwsannotation to simplify writing tests for code that throws an exception - added
contextto enable grouping of tests into sub-suite in a test suite package - added warnings on invalid/misplaced annotations
- added support for multiple declarations of before/after procedures
- added propagation of rollback type defined on parent suite within suitepath
- Added
have_countmatcher for checking cursor rows/collection elements count - Added
include()andexclude()extensions to cursor and object/collection data comparison - Added
difffunctionality for cursor, object and collection data - When comparing cursors, column data-type is now also checked for equality
- #548 - Changed behavior of execution of
ut.expect()on closed cursor. - Added support for cursors with implicitly named columns
- Output buffer for reporting is now reporter-agnostic.
- cli is no longer not interacting with output buffer but uses reporters to retrieve data instead.
- Added ability to mark expectation syntax as deprecated and report warnings on deprecation
- Added ability to get a list of annotations for a schema
- Refactoring of annotation parsing
- Refactoring of suite building
- Migrated part of old script-based tests to new utPLSQL v3 tests
- Documentation fixes and improvements
- Reporters now provide a method to get description
- Test execution continues even when encountered
Existing state of packages was discarded/invalidatedexceptions (ORA-04068/ORA-04061). The whole suite will execute, test result reports will be available and the exception will be re-thrown to the user after the run was finished. (#504)
- #511 Coverage schema had to be explicitly provided, even when using
a_include_objects - #514 / #516 utPLSQL fails to run, when one of suite packages has no newline between
--%suiteand procedure-specific annotations. - #539 Fixed false-negative code coverage reporting on labelled
end loopelements - #547 Fixed issue with invalid suite grouping when running
xunit_reporter - #562 Code coverage was always showing first report gathered in a session
- #572 Wrong format of time in XUnit_reporter when running on German locale (using comma as decimal separator)
- #601 Fixed issue with wrong exception getting thrown when suite failed and there was a pending distributed transaction
- #568 Fixed file-mapper issue where two files were mapped into the same object and caused
ORA-00001: unique constraint (UTP3.UT_COVERAGE_SOURCES_TMP_PK) violated
Bugfixes:
- #509 (#506) Savepoint name is now generated from sys_guid to avoid issues on Windows-based Oracle instances
- #500 (#499/#487) Fixed XML/HTML special characters in reporters and unified handling of failure reporting across reporters
Documentation:
- #503 Fixed link to contributing guide in the doc
- #502 Added example of handling exceptions to documentation
- #486 (#485) Added example for custom expectation-fail message in docs
Enhancements:
- #497 (#478) Removed overloaded procedures
ut_runner.run - #496 (#441) utPLSQL will not not open new transaction when running tests
- #495 (#482) Added buffering of dbms_output before the run
- #494 Removed
ut_expectationsub-types - #492 Restructured annotations and added caching to improve framework start-up time
- #242 Added ability to exclude columns/attributes for cursor/object/collection comparison. Xpath can be used for column/attribute exclusion
- #428 Added reporting to
module,action,client_infofields of thev$session. - #408 Calling
ut_runner.runprocedures can now raise exception if any test failed - #430 Added ability to check version compatibility
ut_runner.version_compatibility_check
- #469 Fixed bug with framework executing multiple packages with similar names when using suitepaths
- #462 Cursor comparison now supports cursors on Global Temporary Table
- #461 Increased allowed chars for annotation name to 250
- #445 Cursor comparison now supports cursors with more than 1000 rows
- #431
dba_views are now used (if available), increasing performance of the framework - #430 Changed how version number reporting in functions
ut_runner.version,ut_run.version - #364 Improved warning message when implicit commit occurs
- #413 Fixed Sonar Unit Test reporting for test suites with suitepth
- #435 Fixed problem with identifying annotations when windows newline is used in package sources
- #467 Moved CONTRIBUTING.md to project root and updated content
- #434 Fixed coverage format documentation
- #439 Small documentation fixes
- #450 Added self-testing using released version of utPLSQL
- #438 Sonar reporting disabled for PRs
- #424 Moved to project-owned Docker images created by scripts from utPLSQL/docker-scripts project
- #212 Added source_path and test_path parameters for coverage reporters
- #420 Changed the way
ut_file_mapperhandles default parameters - #417 Improved performance and stability of access to internal framework tables
- #425 Updated myStats library to v3
- #402
ut_output_bufferis now abstracted from caller
- #399 Documentation now refers to migration project
- #386 Documentation now refers to a valid object name:
ut_file_mapping - #362 Install and Uninstall scripts are now much more readable
- #361 Install guide now provides snippet on how to download latest release on Windows
- #396 Added override user/password/tablespace for install_headless
- #384 Installation is now smooth even if profiler tables already exist
- #407 Fixed rare issue with
ORA-22813: operand value exceeds system limits - #403 Stack trace is now properly parsed on all machines
- #397 The
--%disabledannotation on suite level is now reporting all tests as disabled - #395 Coverage reporting is now properly filtering test packages on that use suitepath
- #390 Line of code for failed expectation is now also shown for unit tests owned by other users
- #380 Line no of failed test is now properly reported when using
ut.fail - #375 Annotation parameter list can now have spaces before/after brackets
- #373 Warnings in documentation reporter are now properly numbered
- #372 Documentation reporter is now providing a timing information for each test
- #370 by xUnit reporter now displays name of the package/procedure if suite/test has no description
- #369 Fixed errors with multi-byte characters in conversion from/to clob
Issues solved in the release:
- #346 ORA-22921: length of input buffer is smaller than amount requested
- #337 Suite/test description gets cut after the inner closing bracket
- #336 Suite/test description gets cut after comma
- #334 Bad/misleading failure message when comparing different datatypes
- #331 running tests in a user containing '$'
- #322 Fix prompts for install of synonyms
- #326 Fix to HTML Coverage
- #332 fixed failed expectation source code line reporting on12c R2
Other changes:
- #320 Fix deployment to gh-pages branch on TAG
- #340, #342, #349 small issues in the documentation
- #328 fixing build number in version
- #353 Add MD5 checksum to release builds
First official release of fully rewritten utPLSQL. The unit testing framework for Oracle database.
Key features
- Compatible with and tested on Oracle 11.2, 12.1 and 12.2
- multiple ways to compare data with matchers
- native comparison of complex types (objects/collections/cursors)
- in-depth and consistent reporting of failures and errors for tests
- tests identified and configured by annotations
- hierarchies of test suites configured controlled by annotations
- automatic (configurable) transaction control using annotations
- Build-in coverage reporting
- Integration with SonarQube, Coveralls, Jenkins and Teamcity using reporters
- plugin architecture for reporters and matchers
- flexible and simple test invocation
- multi-reporting and test real-time progress test-run from using utPLSQL-cli