15
15
*/
16
16
package org .utplsql .sqldev .dal ;
17
17
18
+ import java .net .URL ;
18
19
import java .sql .CallableStatement ;
19
20
import java .sql .Connection ;
20
21
import java .sql .SQLException ;
@@ -907,12 +908,14 @@ public OutputLines doInCallableStatement(final CallableStatement cs) throws SQLE
907
908
* @param excludeObjectList
908
909
* list of objects to be excluded from coverage analysis. None, if
909
910
* empty
911
+ * @param htmlReportAssetPath
912
+ * path of the assets for the coverage report. Default, if null
910
913
* @return HTML code coverage report in HTML format
911
914
* @throws DataAccessException
912
915
* if there is a problem
913
916
*/
914
917
public String htmlCodeCoverage (final List <String > pathList , final List <String > schemaList ,
915
- final List <String > includeObjectList , final List <String > excludeObjectList ) {
918
+ final List <String > includeObjectList , final List <String > excludeObjectList , final URL htmlReportAssetPath ) {
916
919
StringBuilder sb = new StringBuilder ();
917
920
sb .append ("SELECT column_value\n " );
918
921
sb .append (" FROM table(\n " );
@@ -935,7 +938,14 @@ public String htmlCodeCoverage(final List<String> pathList, final List<String> s
935
938
sb .append (StringTools .getCSV (excludeObjectList , 16 ));
936
939
sb .append (" ),\n " );
937
940
}
938
- sb .append (" a_reporter => ut_coverage_html_reporter()\n " );
941
+ sb .append (" a_reporter => ut_coverage_html_reporter(\n " );
942
+ sb .append (" a_html_report_assets_path => '" );
943
+ if (htmlReportAssetPath != null ) {
944
+ // empty string is handled as NULL in Oracle Database
945
+ sb .append (htmlReportAssetPath .toExternalForm ());
946
+ }
947
+ sb .append ("'\n " );
948
+ sb .append (" )\n " );
939
949
sb .append (" )\n " );
940
950
sb .append (" )" );
941
951
final String sql = sb .toString ();
0 commit comments