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/userguide/coverage.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ Following code coverage reporters are supplied with utPLSQL:
15
15
*`ut_coverage_html_reporter` - generates a HTML coverage report providing summary and detailed information on code coverage. The html reporter is based on open-source [simplecov-html](https://github.com/colszowka/simplecov-html) reporter for Ruby. It includes source code of the code that was covered (if possible)
16
16
*`ut_coveralls_reporter` - generates a [Coveralls compatible JSON](https://coveralls.zendesk.com/hc/en-us/articles/201774865-API-Introduction) coverage report providing detailed information on code coverage with line numbers. This coverage report is designed to be consumed by cloud services like [coveralls](https://coveralls.io)
17
17
*`ut_coverage_sonar_reporter` - generates a [Sonar Compatible XML](https://docs.sonarqube.org/display/SONAR/Generic+Test+Data) coverage report providing detailed information on code coverage with line numbers. This coverage report is designed to be consumed by services like [sonarqube/sonarcloud](https://about.sonarcloud.io/)
18
+
*`ut_coverage_cobertura_reporter` - generates a basic cobertura coverage (http://cobertura.sourceforge.net/xml/coverage-04.dtd) report providing detailed information on code coverage with line numbers. This coverage report is designed to be consumed by services like TFS, Jenkins. Please see example of XML generated by java : https://raw.githubusercontent.com/jenkinsci/cobertura-plugin/master/src/test/resources/hudson/plugins/cobertura/coverage-with-data.xml
18
19
19
20
## Security model
20
21
Code coverage is using DBMS_PROFILER to gather information about execution of code under test and therefore follows the [DBMS_PROFILER's Security Model](https://docs.oracle.com/database/121/ARPLS/d_profil.htm#ARPLS67465)
@@ -338,7 +338,7 @@ The matcher will also fail when comparing a `timestamp` to a `timestamp with tim
338
338
The matcher enables detection data-type changes.
339
339
If you expect your variable to be a number and it is now some other type, the test will fail and give you early indication of a potential problem.
340
340
341
-
To keep it simple, the `equal` will only succeed if you compare apples to apples.
341
+
To keep it simple, the `equal`matcher will only succeed if you compare apples to apples.
342
342
343
343
Example usage
344
344
```sql
@@ -415,8 +415,9 @@ create or replace package body test_animals_getter is
415
415
end;
416
416
```
417
417
418
-
**Comparing NULLs is by default!**
418
+
**Comparing NULLs is by default a success!**
419
419
The `a_nulls_are_equal` parameter controls the behavior of a `null = null` comparison.
420
+
To change the behavior of `NULL = NULL` comparison pass the `a_nulls_are_equal => false` to the `equal` matcher.
420
421
421
422
422
423
## Comparing objects, cursors, collections of data
@@ -427,9 +428,9 @@ utPLSQL is capable of comparing compound data-types including:
427
428
- nested table/varray types
428
429
429
430
### Notes on comparison of compound data
430
-
- Compound data can contain elements of any data-type. This includes blob, clob, object type, nested table, varray or nested-cursor.
431
+
- Compound data can contain elements of any data-type. This includes blob, clob, object type, nested table, varray or even a nested-cursor within a cursor.
431
432
- Cursors, nested table and varray types are compared as **ordered lists of elements**. If order of elements differ, expectation will fail.
432
-
- Comparison of compound data does not currently support data-type check on attribute/column level. This might be changed in the future.
433
+
- Comparison of compound data is data-type aware. So a column `ID NUMBER` in a cursor is not the same as `ID VARCHAR2(100)`, even if they both hold the same numeric values.
433
434
- Comparison of cursor columns containing `DATE` will only compare date part **and ignore time** by default. See [Comparing cursor data containing DATE fields](#comparing-cursor-data-containing-date-fields) to check how to enable date-time comparison in cursors.
434
435
- To compare nested table/varray type you need to convert it to `anydata` by using `anydata.convertCollection()`
435
436
- To compare object type you need to convert it to `anydata` by using `anydata.convertObject()`
0 commit comments