GeezerVison is showing github.com — Code coverage report does not load if you have no internet connection · Issue #518 · utPLSQL/utPLSQL
Code coverage report does not load if you have no internet connection #518DescriptionI try this in a virtual box (prebuilt oracle otn developer day machine). Is there any reference to Internet in the generated HTML? Activityjgebal commented on Nov 20, 2017 Hi.
The coverage HTML report is using resource files (JS,css) from https://github.com/utPLSQL/utPLSQL-coverage-html
If you do not have Internet connection, you need to store them locally.
When invoking coverage reporter , you can pass a location to those files.
- This feature is not documented unfortunately.
- this is a good candidate to add to java-client or java-api so that resource files are available locally.
jgebal commented on Nov 20, 2017 You can call the reporter in the following way:
begin
ut.run( ut_coverage_html_reporter( a_html_report_assets_path => 'c:\temp\assets\' ) );
end;
/
or
begin
ut.run( ut_coverage_html_reporter( null, 'c:\temp\assets\' ) );
end;
/
By default, of no assets path is given, the path is: https://utplsql.github.io/utPLSQL-coverage-html/assets/
Here is the constructor of html_coverage:
|
a_html_report_assets_path varchar2 := null |
tkleiber commented on Nov 20, 2017 Is there similar in the Java CLI? jgebal commented on Nov 20, 2017 Hi @tkleiber
It is not part of cli neither documented, as I didn't have a full concept of how it would be handled.
The constructor parameters for reporter are outstanding from the reporter standard reporter API, where reporter has no parameters.
Following is an idea for implementation in utplsql-cli:
We could add parameter like --local_coverage_assets_path=path or -lcov=path (naming to be decided).
When the parameter is provided and running with ut_coverage_html_reporter, the client would:
- create assets directory
- save assets into that directory
- pass
assets directory path to reporter
The outcome html would be pointing to assets in that directory.
The path could be either relative (from the point of invocation) or absolute.
The parent directory needs to exist.
The directory content would be deleted before populating it again or we would overwrite files when invoked to avoid exceptions.
@pesse, @viniciusam, @Pazus what do you think? jgebal commented on Nov 20, 2017 @tkleiber for now I would suggest you to change the default value in ut_utils and download assets locally pesse commented on Nov 20, 2017 I think this will also require a change in java API and how reporters are composed there.
In general I think cli should have the same features as the framework so including the possibility for reporter parameters seems a necessity.
Having the assets as resources in java- API seems also very handy.
Will have to think about how to integrate best (also with upcoming Jason config files in mind) jgebal commented on Nov 21, 2017 On the java-API I would like to keep it simple as long as we can.
The idea to have parameter-less reporters is working fine so far (except the html-coverage).
The java-API would not expose the html coverage reporter constructor parameters anyway but rather use them.
So for now I would just have special handling for this one reporter as a quick-win and handle situation where user wants/needs-to to use local assets.
When building api project, we could use the assets stored in the https://github.com/utPLSQL/utPLSQL-coverage-html project jgebal commented on Feb 5, 2018 @tkleiber
I'm closing the issue in this project as it is getting addressed in utPLSQL-cli and utPLSQL-java-api
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|