-
Notifications
You must be signed in to change notification settings - Fork 189
12.2 Oracle Native Block Coverage #604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
287590b
12.2 Stable :
lwasylow 68768f8
12.2 Stable :
lwasylow 76bf869
12.2 Stable :
lwasylow 1f4f5f0
Tests 12.2 Coverage:
lwasylow 90858eb
Added 12.2 coverage
lwasylow d77cf9a
Test 12.2 coverage
lwasylow 4f83357
Added 12.2 Coverage
lwasylow ac40332
Added 12.2 Coverage
lwasylow 5f74db9
Merge pull request #602 from lwasylow/12coveragestab2
lwasylow 9d7f16c
Added conditional install of tests for 12.2 only - when block coverag…
jgebal 20541b5
Refactoring coverage:
lwasylow ab7eb93
Coverage Refactoring:
lwasylow 8dbb1a1
Merge pull request #614 from lwasylow/feature/12cblockcoverage
lwasylow e0b220d
Merge branch 'develop' into feature/12cblockcoverage
lwasylow 2560f5b
Revert "Feature/12cblockcoverage"
lwasylow 6fe32c5
Merge pull request #615 from utPLSQL/revert-614-feature/12cblockcoverage
lwasylow 8235848
Refactor Coverage:
lwasylow 78fdab5
Refactor Coverage:
lwasylow 3a19341
Merge branch 'feature/12cblockcoverage' of github.com:lwasylow/utPLSQ…
lwasylow 466e126
Update test local
lwasylow e968f76
Merge pull request #616 from lwasylow/feature/12cblockcoverage
lwasylow 0f1d789
12.2 coverage
lwasylow faab0fe
Merge pull request #625 from lwasylow/feature/12cblockcoverage
lwasylow 35e5e13
12.2 coverage
lwasylow 1289e99
Merge branch 'feature/12cblockcoverage' of github.com:lwasylow/utPLSQ…
lwasylow d3ce10c
Merge pull request #626 from lwasylow/feature/12cblockcoverage
lwasylow c0ca9d3
Fixing error in package name
lwasylow f151a6e
Update test
lwasylow 28f7653
Statement Coverage First Commit
lwasylow 1f51049
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow 9c87b06
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/12c…
lwasylow d8b8e87
Updated coverage with statement level information
lwasylow 49b1b84
Move get_cov_sql function into common package to remove code duplication
lwasylow ab7eb24
Refactor Coverage to now enrich profile for partially covered lines u…
lwasylow 36279fa
Update tests and fixed typo in original coverage reporter
lwasylow 661ef74
Merge branch 'feature/12cblockcoverage' of https://github.com/utPLSQL…
lwasylow 57f7a4f
Updated coverage
lwasylow 3a2ff00
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow e6c2be2
Merge pull request #640 from lwasylow/feature/12cov_extended
lwasylow c9cb004
Fixes to conditional compilation
lwasylow a862b95
Fixes to new asso array during mock coverage id.
lwasylow 57ee184
Merge pull request #641 from lwasylow/feature/12cblockcoverage
lwasylow 4561795
Update test
lwasylow 0556fbe
Update test
lwasylow b91e51d
Merge branch 'feature/12cblockcoverage' of github.com:utPLSQL/utPLSQL…
lwasylow d19f941
Update test/core/reporters/test_extended_coverage.pkb
lwasylow e2e1437
Updated html reporter to show a information about the partially cover…
lwasylow a112e36
Added support for block coverage in sonar and cobertura reporters.
jgebal f0e2653
Clean-up and removal of unnecessary reporters
lwasylow 4458dff
Unify reporters
lwasylow 2027421
Update test
lwasylow 924eb9b
Update issue with part covered being zero.
lwasylow a111c6d
Update for test with timestamp
lwasylow 2d6c7d3
Merge branch 'develop' into feature/12cblockcoverage
lwasylow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| create or replace package body ut_coverage_extended is | ||
| /* | ||
| utPLSQL - Version 3 | ||
| Copyright 2016 - 2017 utPLSQL Project | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"): | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| /** | ||
| * Public functions | ||
| */ | ||
|
|
||
| function get_extended_coverage(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage is | ||
| l_result_block ut_coverage.t_coverage; | ||
| l_result_profiler_enrich ut_coverage.t_coverage; | ||
| l_object ut_coverage.t_full_name; | ||
| l_line_no binary_integer; | ||
| begin | ||
| -- Get raw data for both reporters, order is important as tmp table will skip headers and dont populate | ||
| -- tmp table for block again. | ||
| l_result_profiler_enrich:= ut_coverage_proftab.get_coverage_data_profiler(a_coverage_options => a_coverage_options); | ||
|
|
||
| l_result_block := ut_coverage_block.get_coverage_data_block(a_coverage_options => a_coverage_options); | ||
|
|
||
| -- Enrich profiler results with some of the block results | ||
| l_object := l_result_profiler_enrich.objects.first; | ||
| while (l_object is not null) | ||
| loop | ||
| l_line_no := l_result_profiler_enrich.objects(l_object).lines.first; | ||
| while (l_line_no is not null) | ||
| loop | ||
| if l_result_block.objects(l_object).lines.exists(l_line_no) then | ||
| -- enrich line level stats | ||
| l_result_profiler_enrich.objects(l_object).lines(l_line_no).partcove := l_result_block.objects(l_object).lines(l_line_no).partcove; | ||
| -- enrich object level stats | ||
| l_result_profiler_enrich.objects(l_object).partcovered_lines := nvl(l_result_profiler_enrich.objects(l_object).partcovered_lines,0) + l_result_block.objects(l_object).lines(l_line_no).partcove; | ||
| end if; | ||
| --At the end go to next line | ||
| l_line_no := l_result_profiler_enrich.objects(l_object).lines.next(l_line_no); | ||
| end loop; | ||
| --total level stats enrich | ||
| l_result_profiler_enrich.partcovered_lines := nvl(l_result_profiler_enrich.partcovered_lines,0) + l_result_profiler_enrich.objects(l_object).partcovered_lines; | ||
| -- At the end go to next object | ||
| l_object := l_result_profiler_enrich.objects.next(l_object); | ||
| end loop; | ||
|
|
||
| return l_result_profiler_enrich; | ||
|
|
||
| end get_extended_coverage; | ||
|
|
||
| end; | ||
| / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| create or replace package ut_coverage_extended authid current_user is | ||
| /* | ||
| utPLSQL - Version 3 | ||
| Copyright 2016 - 2017 utPLSQL Project | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"): | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| function get_extended_coverage(a_coverage_options ut_coverage_options) return ut_coverage.t_coverage; | ||
|
|
||
| end; | ||
| / |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create warning here?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its something we could consider. However if we want to warn then probably at the coverage_start function.
I could create a new type of error and raise an error at the start of the coverage something like:
Requested reporter is not available, please check you install and documentation.
that would stop running rest of test which is probably valid as when you request coverage you don't want to continue without it.
Another option would be to force user to switch to profiler instead however some information would have to be displayed not a really big fan of forcing solutions.