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

Skip to content

Commit bd661a5

Browse files
authored
Merge branch 'develop' into feature/dbms_applicaiton_info
2 parents 51ef47d + 84f4084 commit bd661a5

6 files changed

Lines changed: 43 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ before_script:
7171
script:
7272
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/install.sh; fi
7373
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/run_examples_and_tests.sh; fi
74-
- if [ "${TRAVIS_TAG}" = "" ] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ]; then sonar-scanner; fi
74+
- if [ "${TRAVIS_TAG}" = "" ] && [ "${TRAVIS_REPO_SLUG}" = "${UTPLSQL_REPO}" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then sonar-scanner; fi
7575
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/coveralls_uploader.sh; fi
7676
- bash .travis/build_docs.sh
7777
- if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/push_release_version.sh; fi

docs/userguide/coverage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Note:
1313
To obtain information about code coverage of your Unit Tests, all you need to do is run your unit tests with one of build-in code coverage reporters.
1414
Following code coverage reporters are supplied with utPLSQL:
1515
* `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-
* `ut_coveralls_reporter` - generates a JSON 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-
* `ut_coverage_sonar_reporter` - generates a JSON coverage report providing detailed information on code coverage with line numbers. This coverage report is designed to be consumed by local services like [sonarqube](https://about.sonarqube.com/)
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+
* `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/)
1818

1919
## Security model
2020
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)

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ select * from table(ut.run());
7373

7474
The above commands will run all the suites in the current schema and provide report to dbms_output or as a select statement.
7575

76-
# Command lien clients
76+
# Command line clients
7777

7878
To have more control over how the tests are invoked, use one of the utPLSQL command line clients: [utPLSQL-sql-cli](https://github.com/utPLSQL/utPLSQL-sql-cli) or [utPLSQL-cli](https://github.com/utPLSQL/utPLSQL-cli).
7979

source/core/ut_metadata.pkb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ create or replace package body ut_metadata as
128128
-- we fetch the source explicitly as dbms_preprocessor is very sow on 12.1 and 12.2 when grabbing the sources.
129129
l_lines := sys.dbms_preprocessor.get_post_processed_source(l_lines);
130130
for i in 1..l_lines.count loop
131-
ut_utils.append_to_clob(l_source, l_lines(i));
131+
ut_utils.append_to_clob(l_source, replace(l_lines(i), chr(13)||chr(10), chr(10)));
132132
end loop;
133133
return l_source;
134134
end;

tests/RunAll.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ exec ut_coverage.coverage_start_develop();
4949
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParsePackageLevelAnnotationWithKeyValue.sql
5050
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParsePackageLevelAnnotationWithMultilineComment.sql
5151
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.spaceBeforeAnnotationParams.sql
52+
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParseAnnotationWithWindowsNewline.sql
5253
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
5354
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
5455
@@ut_expectations/ut.expect.not_to_be_null.sql
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
PROMPT Parse package level annotations with windows newline
2+
3+
--Arrange
4+
declare
5+
l_source clob;
6+
l_parsing_result ut_annotations.typ_annotated_package;
7+
l_expected ut_annotations.typ_annotated_package;
8+
l_ann_param ut_annotations.typ_annotation_param;
9+
10+
begin
11+
l_source := 'PACKAGE test_tt AS
12+
-- %suite
13+
-- %displayname(Name of suite)' || chr(13) || chr(10)
14+
|| ' -- %suitepath(all.globaltests)
15+
END;';
16+
17+
--Act
18+
l_parsing_result := ut_annotations.parse_package_annotations(l_source);
19+
20+
--Assert
21+
l_ann_param := null;
22+
l_ann_param.val := 'Name of suite';
23+
l_expected.package_annotations('suite').params := cast( null as ut_annotations.tt_annotation_params);
24+
l_expected.package_annotations('displayname').params(1) := l_ann_param;
25+
26+
l_ann_param := null;
27+
l_ann_param.val := 'all.globaltests';
28+
l_expected.package_annotations('suitepath').params(1) := l_ann_param;
29+
30+
check_annotation_parsing(l_expected, l_parsing_result);
31+
32+
if ut_expectation_processor.get_status = ut_utils.tr_success then
33+
:test_result := ut_utils.tr_success;
34+
end if;
35+
36+
end;
37+
/

0 commit comments

Comments
 (0)