You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,15 @@ The framework follows industry standards and best patterns of modern Unit Testin
7
7
8
8
## Demo project
9
9
10
-
Have a look at our [demo project](https://github.com/utPLSQL/utPLSQL-demo-project/).
10
+
Have a look at [utPLSQL demo project](https://github.com/utPLSQL/utPLSQL-demo-project/) to see:
11
11
12
-
It uses [Travis CI](https://travis-ci.org/utPLSQL/utPLSQL-demo-project) to build on every commit, runs all tests, publishes test results and code coverage to [SonarCloud](https://sonarcloud.io/project/overview?id=utPLSQL:utPLSQL-demo-project).
12
+
- sample code and tests
13
+
- demo of deployment automation that leverages:
14
+
- Flyway / Liquidbase for scripting and deployment of DB changes
15
+
- Docker container with Oracle XE Database
16
+
- GitHub Actions and Azure Pipelines to orchestrate the deployment and testing process
17
+
- utPLSQL framework for writhing, execution of tests as well as reporting test results and code coverage
18
+
-[Sonar]((https://sonarcloud.io/project/overview?id=utPLSQL:utPLSQL-demo-project).) for code quality gate, test results and code coverage reporting
13
19
14
20
## Three steps
15
21
@@ -31,6 +37,7 @@ Check out the sections on [annotations](userguide/annotations.md) and [expectati
31
37
You can use the utPLSQL command line client [utPLSQL-cli](https://github.com/utPLSQL/utPLSQL-cli) to run tests without the need for Oracle Client or any IDE like SQLDeveloper/TOAD etc.
32
38
33
39
Amongst many benefits they provide ability to:
40
+
34
41
* see the progress of test execution for long-running tests - real-time reporting
35
42
* use many reporting formats simultaneously and save reports to files (publish)
36
43
* map your project source files and test files into database objects
@@ -40,8 +47,7 @@ See [project readme](https://github.com/utPLSQL/utPLSQL-cli/blob/develop/README.
40
47
41
48
## Coverage
42
49
43
-
If you want to have code coverage gathered on your code , it's best to use `ut_run` to execute your tests with multiple reporters and have both test execution report as well as coverage report saved to a file.
44
-
50
+
It is best to use utPLSQL-cli or execute tests and gather code coverage from command line.
45
51
Check out the [coverage documentation](userguide/coverage.md) for options of coverage reporting
Copy file name to clipboardExpand all lines: docs/userguide/advanced_data_comparison.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ When specifying column/attribute names, keep in mind that the names are **case s
48
48
## Excluding elements from data comparison
49
49
50
50
Consider the following examples
51
-
```sql
51
+
```sql linenums="1"
52
52
declare
53
53
l_expected sys_refcursor;
54
54
l_actual sys_refcursor;
@@ -86,7 +86,7 @@ The actual data is equal/contains expected, when those columns are excluded.
86
86
## Selecting columns for data comparison
87
87
88
88
Consider the following example
89
-
```sql
89
+
```sql linenums="1"
90
90
declare
91
91
l_actual sys_refcursor;
92
92
l_expected sys_refcursor;
@@ -125,7 +125,7 @@ The actual data is equal/contains expected, when only those columns are included
125
125
You can chain the advanced options in an expectation and mix the `varchar2` with `ut_varchar2_list` arguments.
126
126
When doing so, the final list of items to include/exclude will be a concatenation of all items.
127
127
128
-
```sql
128
+
```sql linenums="1"
129
129
declare
130
130
l_actual sys_refcursor;
131
131
l_expected sys_refcursor;
@@ -163,7 +163,7 @@ SUCCESS
163
163
164
164
Example of `include / exclude` for anydata.convertCollection
165
165
166
-
```sql
166
+
```sql linenums="1"
167
167
create or replacetypepersonas object(
168
168
name varchar2(100),
169
169
age integer
@@ -219,7 +219,7 @@ Unordered option allows for quick comparison of two compound data types without
219
219
220
220
Result of such comparison will be limited to only information about row existing or not existing in given set without actual information about exact differences.
221
221
222
-
```sql
222
+
```sql linenums="1"
223
223
declare
224
224
l_actual sys_refcursor;
225
225
l_expected sys_refcursor;
@@ -267,7 +267,7 @@ The extra or missing rows will be presented to user as well as all non-matching
267
267
Join by option can be used in conjunction with include or exclude options.
268
268
However if any of the join keys is part of exclude set, comparison will fail and report to user that sets could not be joined on specific key, as the key was excluded.
269
269
270
-
```sql
270
+
```sql linenums="1"
271
271
declare
272
272
l_actual sys_refcursor;
273
273
l_expected sys_refcursor;
@@ -305,7 +305,7 @@ FAILURE
305
305
306
306
You can use `join_by` syntax in combination with `contain` matcher.
307
307
308
-
```sql
308
+
```sql linenums="1"
309
309
declare
310
310
l_actual sys_refcursor;
311
311
l_expected sys_refcursor;
@@ -322,7 +322,7 @@ end;
322
322
```
323
323
324
324
Above test will indicate that in actual data-set
325
-
```sql
325
+
```sql linenums="1"
326
326
FAILURE
327
327
Actual: refcursor [ count =28 ] was expected to contain: refcursor [ count =29 ]
328
328
Diff:
@@ -335,7 +335,7 @@ FAILURE
335
335
336
336
You can specify multiple columns in `join_by`
337
337
338
-
```sql
338
+
```sql linenums="1"
339
339
declare
340
340
l_actual sys_refcursor;
341
341
l_expected sys_refcursor;
@@ -371,7 +371,7 @@ To reference attribute as PK, use slash symbol `/` to separate nested elements.
371
371
372
372
In the below example, cursors are joined using the `NAME` attribute of object in column `SOMEONE`
373
373
374
-
```sql
374
+
```sql linenums="1"
375
375
create or replacetypepersonas object(
376
376
name varchar2(100),
377
377
age integer
@@ -414,7 +414,7 @@ FAILURE
414
414
> `join_by` does not support joining on individual elements of nested table. You can still use data of the nested table as a PK value.
415
415
> When collection is referenced in `join_by`, test will fail with appropriate message, as it cannot perform a join.
416
416
417
-
```sql
417
+
```sql linenums="1"
418
418
create or replacetypepersonas object(
419
419
name varchar2(100),
420
420
age integer
@@ -463,7 +463,7 @@ You may provide items for `include`/`exclude`/`join_by` as a a ut_varchar2_list
463
463
- nested table and varray items type attributes are nested under `<ARRAY><OBJECTY_TYPE>` elements
464
464
465
465
Example of a valid parameter to include columns: `RN`, `A_Column`, `SOME_COL` in data comparison.
466
-
```sql
466
+
```sql linenums="1"
467
467
declare
468
468
l_actual sys_refcursor;
469
469
l_expected sys_refcursor;
@@ -494,7 +494,7 @@ Expectations that compare compound data type data with `unordered_columns` optio
494
494
495
495
This option can be useful whn we have no control over the ordering of the column or the column order is not of importance from testing perspective.
0 commit comments