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

Skip to content

Commit 9e03e76

Browse files
committed
Improving documentation
1 parent 7925a75 commit 9e03e76

13 files changed

Lines changed: 475 additions & 406 deletions

docs/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ The framework follows industry standards and best patterns of modern Unit Testin
77

88
## Demo project
99

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:
1111

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
1319

1420
## Three steps
1521

@@ -31,6 +37,7 @@ Check out the sections on [annotations](userguide/annotations.md) and [expectati
3137
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.
3238

3339
Amongst many benefits they provide ability to:
40+
3441
* see the progress of test execution for long-running tests - real-time reporting
3542
* use many reporting formats simultaneously and save reports to files (publish)
3643
* 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.
4047

4148
## Coverage
4249

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.
4551
Check out the [coverage documentation](userguide/coverage.md) for options of coverage reporting
4652

4753

docs/userguide/advanced_data_comparison.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ When specifying column/attribute names, keep in mind that the names are **case s
4848
## Excluding elements from data comparison
4949

5050
Consider the following examples
51-
```sql
51+
```sql linenums="1"
5252
declare
5353
l_expected sys_refcursor;
5454
l_actual sys_refcursor;
@@ -86,7 +86,7 @@ The actual data is equal/contains expected, when those columns are excluded.
8686
## Selecting columns for data comparison
8787

8888
Consider the following example
89-
```sql
89+
```sql linenums="1"
9090
declare
9191
l_actual sys_refcursor;
9292
l_expected sys_refcursor;
@@ -125,7 +125,7 @@ The actual data is equal/contains expected, when only those columns are included
125125
You can chain the advanced options in an expectation and mix the `varchar2` with `ut_varchar2_list` arguments.
126126
When doing so, the final list of items to include/exclude will be a concatenation of all items.
127127

128-
```sql
128+
```sql linenums="1"
129129
declare
130130
l_actual sys_refcursor;
131131
l_expected sys_refcursor;
@@ -163,7 +163,7 @@ SUCCESS
163163

164164
Example of `include / exclude` for anydata.convertCollection
165165

166-
```sql
166+
```sql linenums="1"
167167
create or replace type person as object(
168168
name varchar2(100),
169169
age integer
@@ -219,7 +219,7 @@ Unordered option allows for quick comparison of two compound data types without
219219

220220
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.
221221

222-
```sql
222+
```sql linenums="1"
223223
declare
224224
l_actual sys_refcursor;
225225
l_expected sys_refcursor;
@@ -267,7 +267,7 @@ The extra or missing rows will be presented to user as well as all non-matching
267267
Join by option can be used in conjunction with include or exclude options.
268268
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.
269269

270-
```sql
270+
```sql linenums="1"
271271
declare
272272
l_actual sys_refcursor;
273273
l_expected sys_refcursor;
@@ -305,7 +305,7 @@ FAILURE
305305
306306
You can use `join_by` syntax in combination with `contain` matcher.
307307

308-
```sql
308+
```sql linenums="1"
309309
declare
310310
l_actual sys_refcursor;
311311
l_expected sys_refcursor;
@@ -322,7 +322,7 @@ end;
322322
```
323323

324324
Above test will indicate that in actual data-set
325-
```sql
325+
```sql linenums="1"
326326
FAILURE
327327
Actual: refcursor [ count = 28 ] was expected to contain: refcursor [ count = 29 ]
328328
Diff:
@@ -335,7 +335,7 @@ FAILURE
335335

336336
You can specify multiple columns in `join_by`
337337

338-
```sql
338+
```sql linenums="1"
339339
declare
340340
l_actual sys_refcursor;
341341
l_expected sys_refcursor;
@@ -371,7 +371,7 @@ To reference attribute as PK, use slash symbol `/` to separate nested elements.
371371

372372
In the below example, cursors are joined using the `NAME` attribute of object in column `SOMEONE`
373373

374-
```sql
374+
```sql linenums="1"
375375
create or replace type person as object(
376376
name varchar2(100),
377377
age integer
@@ -414,7 +414,7 @@ FAILURE
414414
> `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.
415415
> When collection is referenced in `join_by`, test will fail with appropriate message, as it cannot perform a join.
416416
417-
```sql
417+
```sql linenums="1"
418418
create or replace type person as object(
419419
name varchar2(100),
420420
age integer
@@ -463,7 +463,7 @@ You may provide items for `include`/`exclude`/`join_by` as a a ut_varchar2_list
463463
- nested table and varray items type attributes are nested under `<ARRAY><OBJECTY_TYPE>` elements
464464

465465
Example of a valid parameter to include columns: `RN`, `A_Column`, `SOME_COL` in data comparison.
466-
```sql
466+
```sql linenums="1"
467467
declare
468468
l_actual sys_refcursor;
469469
l_expected sys_refcursor;
@@ -494,7 +494,7 @@ Expectations that compare compound data type data with `unordered_columns` optio
494494

495495
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.
496496

497-
```sql
497+
```sql linenums="1"
498498
declare
499499
l_actual sys_refcursor;
500500
l_expected sys_refcursor;

0 commit comments

Comments
 (0)