17
17
18
18
import java .awt .Dimension ;
19
19
import java .awt .Toolkit ;
20
+ import java .net .URL ;
20
21
import java .sql .Connection ;
21
22
import java .text .SimpleDateFormat ;
22
23
import java .util .Date ;
@@ -71,24 +72,28 @@ public class UtplsqlRunner implements RealtimeReporterEventConsumer {
71
72
private Thread producerThread ;
72
73
private Thread consumerThread ;
73
74
private boolean debug = false ;
75
+ private final URL htmlReportAssetPath ;
74
76
75
77
public UtplsqlRunner (final List <String > pathList , final String connectionName ) {
76
78
this .withCodeCoverage = false ;
77
79
this .pathList = pathList ;
78
80
this .schemaList = null ;
79
81
this .includeObjectList = null ;
80
82
this .excludeObjectList = null ;
83
+ this .htmlReportAssetPath = null ;
81
84
setConnection (connectionName );
82
85
this .context = Context .newIdeContext ();
83
86
}
84
87
85
88
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 ) {
87
91
this .withCodeCoverage = true ;
88
92
this .pathList = pathList ;
89
93
this .schemaList = schemaList ;
90
94
this .includeObjectList = includeObjectList ;
91
95
this .excludeObjectList = excludeObjectList ;
96
+ this .htmlReportAssetPath = htmlReportAssetPath ;
92
97
setConnection (connectionName );
93
98
this .context = Context .newIdeContext ();
94
99
}
@@ -102,21 +107,23 @@ public UtplsqlRunner(final List<String> pathList, final Connection producerConn,
102
107
this .schemaList = null ;
103
108
this .includeObjectList = null ;
104
109
this .excludeObjectList = null ;
110
+ this .htmlReportAssetPath = null ;
105
111
this .producerConn = producerConn ;
106
112
this .consumerConn = consumerConn ;
107
113
}
108
114
109
115
/**
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 )
111
117
*/
112
118
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 ) {
115
121
this .withCodeCoverage = true ;
116
122
this .pathList = pathList ;
117
123
this .schemaList = schemaList ;
118
124
this .includeObjectList = includeObjectList ;
119
125
this .excludeObjectList = excludeObjectList ;
126
+ this .htmlReportAssetPath = null ;
120
127
this .producerConn = producerConn ;
121
128
this .consumerConn = consumerConn ;
122
129
}
@@ -314,7 +321,7 @@ private void produce() {
314
321
logger .fine (() -> "Running utPLSQL tests and producing events via reporter id " + realtimeReporterId + "..." );
315
322
final RealtimeReporterDao dao = new RealtimeReporterDao (producerConn );
316
323
if (withCodeCoverage ) {
317
- dao .produceReportWithCoverage (realtimeReporterId , coverageReporterId , pathList , schemaList , includeObjectList , excludeObjectList );
324
+ dao .produceReportWithCoverage (realtimeReporterId , coverageReporterId , pathList , schemaList , includeObjectList , excludeObjectList , htmlReportAssetPath );
318
325
} else {
319
326
if (!debug ) {
320
327
dao .produceReport (realtimeReporterId , pathList );
0 commit comments