Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49c0768

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/exclude_paths
2 parents 0d64c08 + 68e625f commit 49c0768

21 files changed

+100
-76
lines changed

docs/about/authors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
### utPLSQL v3 Major Contributors
44

docs/about/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Version Information
44

docs/about/project-details.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# utPLSQL Project Details
44

docs/about/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# How to get support
44

docs/compare_version2_to_3.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
For version 3 has been a complete rewrite of the framework, the way it can be used is different to
2+
the previous versions, but also more in line with other modern unit-testing frameworks like JUnit and RSpec.
3+
4+
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.
5+
6+
# Feature comparison
7+
8+
| Feature | Version 2 | Version 3 |
9+
| -------------------------------------- | ---------------------- | ---------------------- |
10+
| Easy to install | Yes | Yes |
11+
| Documentation | Yes | Yes |
12+
| License | GPL v2 | Apache 2.0 |
13+
| **Tests Creation** | | |
14+
| Declarative test configuration | No | Yes - Annotations<sup>1</sup>|
15+
| Tests as Packages | Yes | Yes |
16+
| Multiple Tests in a single Package | Yes | Yes |
17+
| Optional Setup/Teardown | No | Yes |
18+
| Different Setup/Teardown <br/> For Each Test in a Single Package| No | Yes - Annotations<sup>1</sup> |
19+
| Suite Definition Storage | Tables | Package - Annotations<sup>1</sup> |
20+
| Multiple Suites | Yes | Yes |
21+
| Suites can contain Suites | No | Yes |
22+
| Automatic Test detection | No | Yes - Annotations<sup>1</sup>|
23+
| Unconstrained naming of Test packages | No - prefixes | Yes - name not relevant|
24+
| Require Prefix on Test procedures | No - prefixes | Yes - name not relevant|
25+
| Auto Compilation of Tests | Yes | No (Let us know if you use this) |
26+
| Assertion Library | 30 assertions<sup>2</sup> | 26 matchers (13 + 13 negated) |
27+
| Extendable assertions | No | Yes - custom matchers |
28+
| 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)|
29+
| Test Skeleton Generation | Yes | No (Let us know if you use this) |
30+
| **Test Execution<sup>3</sup>** | | |
31+
| Single Test Package Execution | Yes | Yes |
32+
| Single Test Procedure Execution | No | Yes |
33+
| Test Suite Execution | Yes | Yes |
34+
| Subset of Suite Execution | No | Yes |
35+
| Multiple Suite Execution | No | Yes |
36+
| Organizing Suites into hierarchies | No | Yes |
37+
| **Code Coverage Reporting** | No | Yes |
38+
| Html Coverage Report | No | Yes |
39+
| Sonar XML Coverage Report | No | Yes |
40+
| Coveralls Json Coverage Report | No | Yes |
41+
| Framework Transaction Control | No | Yes - Annotations<sup>1</sup> |
42+
| **Test Output** | | |
43+
| Real-time test execution progress reporting | No | Yes |
44+
| Multiple Output Reporters can be used during test execution | No| Yes |
45+
| DBMS_OUTPUT | Yes | Yes (clean formatting) |
46+
| File | Yes (to db server only)| Yes (on client side) |
47+
| Stored in Table | Yes | No (can be added as custom reporter) |
48+
| XUnit format support | No | Yes |
49+
| HTML Format | Yes | No |
50+
| Custom Output reporter | Yes-needs configuration| Yes - no config needed |
51+
52+
<sup>1</sup> 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.
53+
54+
<sup>2</sup> **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
55+
56+
<sup>3</sup> 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.

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Introduction to utPLSQL
44

@@ -25,6 +25,7 @@ The framework follows industry standards and best patterns of modern Unit Testin
2525
- [License](about/license.md)
2626
- [Support](about/support.md)
2727
- [Authors](about/authors.md)
28+
- [Version 2 to Version 3 Comparison](compare_version2_to_3.md)
2829

2930
# Demo project
3031

docs/userguide/advanced_data_comparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Advanced data comparison
44

docs/userguide/annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Annotations
44

docs/userguide/best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Best Practices
44

docs/userguide/coverage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Coverage
44
utPLSQL comes with a built-in coverage reporting engine. The code coverage reporting is based on the DBMS_PROFILER package provided with Oracle database.

docs/userguide/exception-reporting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Exception handling and reporting
44

docs/userguide/expectations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Expectation concepts
44
Validation of the code under test (the tested logic of procedure/function etc.) is performed by comparing the actual data against the expected data.

docs/userguide/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Getting started with TDD and utPLSQL
44

docs/userguide/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Downloading latest version of utPLSQL
44

docs/userguide/querying_suites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Qyerying for test suites
44

docs/userguide/reporters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
utPLSQL provides the following reporting formats.
44

docs/userguide/running-unit-tests.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Running tests
44

@@ -282,6 +282,21 @@ select * from table(ut.run('hr.test_apply_bonus', a_random_test_order_seed => 30
282282
**Note**
283283
>Random order seed must be a positive number within range of 1 .. 1 000 000 000.
284284
285+
# Run by Tags
286+
287+
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)).
288+
Multiple tags are separated by comma. If multiple tags are set, all tests with __any__ of them specified are run.
289+
290+
```sql
291+
begin
292+
ut.run('hr.test_apply_bonus', a_tags => 'test1,test2');
293+
end;
294+
```
295+
```sql
296+
select * from table(ut.run('hr.test_apply_bonus', a_tags => 'suite1'))
297+
```
298+
299+
285300
# Keeping uncommitted data after test-run
286301

287302
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.

docs/userguide/upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![version](https://img.shields.io/badge/version-v3.1.9.3226--develop-blue.svg)
1+
![version](https://img.shields.io/badge/version-v3.1.9.3237--develop-blue.svg)
22

33
# Upgrading from version 2
44

readme.md

Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -168,62 +168,6 @@ To sign up to the chat use [this link](http://utplsql-slack-invite.herokuapp.com
168168
----------
169169
[__Authors__](docs/about/authors.md)
170170

171-
----------
172-
__Version 2 to Version 3 Comparison__
173-
174-
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/).
175-
176-
177-
| Feature | Version 2 | Version 3 |
178-
| -------------------------------------- | ---------------------- | ---------------------- |
179-
| Easy to install | Yes | Yes |
180-
| Documentation | Yes | Yes |
181-
| License | GPL v2 | Apache 2.0 |
182-
| **Tests Creation** | | |
183-
| Declarative test configuration | No | Yes - Annotations<sup>1</sup>|
184-
| Tests as Packages | Yes | Yes |
185-
| Multiple Tests in a single Package | Yes | Yes |
186-
| Optional Setup/Teardown | No | Yes |
187-
| Different Setup/Teardown <br/> For Each Test in a Single Package| No | Yes - Annotations<sup>1</sup> |
188-
| Suite Definition Storage | Tables | Package - Annotations<sup>1</sup> |
189-
| Multiple Suites | Yes | Yes |
190-
| Suites can contain Suites | No | Yes |
191-
| Automatic Test detection | No | Yes - Annotations<sup>1</sup>|
192-
| Unconstrained naming of Test packages | No - prefixes | Yes - name not relevant|
193-
| Require Prefix on Test procedures | No - prefixes | Yes - name not relevant|
194-
| Auto Compilation of Tests | Yes | No (Let us know if you use this) |
195-
| Assertion Library | 30 assertions<sup>2</sup> | 26 matchers (13 + 13 negated) |
196-
| Extendable assertions | No | Yes - custom matchers |
197-
| 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)|
198-
| Test Skeleton Generation | Yes | No (Let us know if you use this) |
199-
| **Test Execution<sup>3</sup>** | | |
200-
| Single Test Package Execution | Yes | Yes |
201-
| Single Test Procedure Execution | No | Yes |
202-
| Test Suite Execution | Yes | Yes |
203-
| Subset of Suite Execution | No | Yes |
204-
| Multiple Suite Execution | No | Yes |
205-
| Organizing Suites into hierarchies | No | Yes |
206-
| **Code Coverage Reporting** | No | Yes |
207-
| Html Coverage Report | No | Yes |
208-
| Sonar XML Coverage Report | No | Yes |
209-
| Coveralls Json Coverage Report | No | Yes |
210-
| Framework Transaction Control | No | Yes - Annotations<sup>1</sup> |
211-
| **Test Output** | | |
212-
| Real-time test execution progress reporting | No | Yes |
213-
| Multiple Output Reporters can be used during test execution | No| Yes |
214-
| DBMS_OUTPUT | Yes | Yes (clean formatting) |
215-
| File | Yes (to db server only)| Yes (on client side) |
216-
| Stored in Table | Yes | No (can be added as custom reporter) |
217-
| XUnit format support | No | Yes |
218-
| HTML Format | Yes | No |
219-
| Custom Output reporter | Yes-needs configuration| Yes - no config needed |
220-
221-
<sup>1</sup> 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.
222-
223-
<sup>2</sup> **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
224-
225-
<sup>3</sup> 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.
226-
227171

228172
----------
229173
__Project Directories__
@@ -236,7 +180,15 @@ __Project Directories__
236180
* source - The installation code for utPLSQL
237181
* tests - Tests for utPLSQL framework
238182

239-
-----------
183+
----------
184+
185+
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/).
186+
187+
188+
# Version 2 to Version 3 Comparison
189+
190+
[Version 2 to Version 3 Comparison](docs/compare_version2_to_3.md)
191+
240192
# Supporters
241193

242194
The utPLSQL project is community-driven and is not commercially motivated. Nonetheless, donations and other contributions are always welcome, and are detailed below.

source/core/ut_utils.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ create or replace package body ut_utils is
766766
/**
767767
* Change string into unicode to match xmlgen format _00<unicode>_
768768
* 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
769-
* secion v3.1.9.3226-develop
769+
* secion v3.1.9.3237-develop
770770
*/
771771
function char_to_xmlgen_unicode(a_character varchar2) return varchar2 is
772772
begin

source/core/ut_utils.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is
2121
*
2222
*/
2323

24-
gc_version constant varchar2(50) := 'v3.1.9.3226-develop';
24+
gc_version constant varchar2(50) := 'v3.1.9.3237-develop';
2525

2626
subtype t_executable_type is varchar2(30);
2727
gc_before_all constant t_executable_type := 'beforeall';

0 commit comments

Comments
 (0)