8000 add optional htmlReportAssetPath field to UtplsqlRunner · utPLSQL/utPLSQL-SQLDeveloper@762b4ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 762b4ba

Browse files
add optional htmlReportAssetPath field to UtplsqlRunner
1 parent a4f5942 commit 762b4ba

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

sqldev/src/main/java/org/utplsql/sqldev/runner/UtplsqlRunner.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.awt.Dimension;
1919
import java.awt.Toolkit;
20+
import java.net.URL;
2021
import java.sql.Connection;
2122
import java.text.SimpleDateFormat;
2223
import java.util.Date;
@@ -71,24 +72,28 @@ public class UtplsqlRunner implements RealtimeReporterEventConsumer {
7172
private Thread producerThread;
7273
private Thread consumerThread;
7374
private boolean debug = false;
75+
private final URL htmlReportAssetPath;
7476

7577
public UtplsqlRunner(final List<String> pathList, final String connectionName) {
7678
this.withCodeCoverage = false;
7779
this.pathList = pathList;
7880
this.schemaList = null;
7981
this.includeObjectList = null;
8082
this.excludeObjectList = null;
83+
this.htmlReportAssetPath = null;
8184
setConnection(connectionName);
8285
this.context = Context.newIdeContext();
8386
}
8487

8588
public UtplsqlRunner(final List<String> pathList, final List<String> schemaList,
86-
final List<String> includeObjectList, final List<String> excludeObjectList, final String connectionName) {
89+
final List<String> includeObjectList, final List<String> excludeObjectList,
90+
final URL htmlReportAssetPath, final String connectionName) {
8791
this.withCodeCoverage = true;
8892
this.pathList = pathList;
8993
this.schemaList = schemaList;
9094
this.includeObjectList = includeObjectList;
9195
this.excludeObjectList = excludeObjectList;
96+
this.htmlReportAssetPath = htmlReportAssetPath;
9297
setConnection(connectionName);
9398
this.context = Context.newIdeContext();
9499
}
@@ -102,21 +107,23 @@ public UtplsqlRunner(final List<String> pathList, final Connection producerConn,
102107
this.schemaList = null;
103108
this.includeObjectList = null;
104109
this.excludeObjectList = null;
110+
this.htmlReportAssetPath = null;
105111
this.producerConn = producerConn;
106112
this.consumerConn = consumerConn;
107113
}
108114

109115
/**
110-
* this constructor is intended for tests only (with code coverage)
116+
* this constructor is intended for tests only (with code coverage and default htmlReportAssetPath)
111117
*/
112118
public UtplsqlRunner(final List<String> pathList, final List<String> schemaList,
113-
final List<String> includeObjectList, final List<String> excludeObjectList, final Connection producerConn,
114-
final Connection consumerConn) {
119+
final List<String> includeObjectList, final List<String> excludeObjectList,
120+
final Connection producerConn, final Connection consumerConn) {
115121
this.withCodeCoverage = true;
116122
this.pathList = pathList;
117123
this.schemaList = schemaList;
118124
this.includeObjectList = includeObjectList;
119125
this.excludeObjectList = excludeObjectList;
126+
this.htmlReportAssetPath = null;
120127
this.producerConn = producerConn;
121128
this.consumerConn = consumerConn;
122129
}
@@ -314,7 +321,7 @@ private void produce() {
314321
logger.fine(() -> "Running utPLSQL tests and producing events via reporter id " + realtimeReporterId + "...");
315322
final RealtimeReporterDao dao = new RealtimeReporterDao(producerConn);
316323
if (withCodeCoverage) {
317-
dao.produceReportWithCoverage(realtimeReporterId, coverageReporterId, pathList, schemaList, includeObjectList, excludeObjectList);
324+
dao.produceReportWithCoverage(realtimeReporterId, coverageReporterId, pathList, schemaList, includeObjectList, excludeObjectList, htmlReportAssetPath);
318325
} else {
319326
if (!debug) {
320327
dao.produceReport(realtimeReporterId, pathList);

0 commit comments

Comments
 (0)
0