|
4 | 4 | import com.beust.jcommander.Parameters;
|
5 | 5 | import org.utplsql.api.*;
|
6 | 6 | import org.utplsql.api.compatibility.CompatibilityProxy;
|
7 |
| -import org.utplsql.api.compatibility.OptionalFeatures; |
8 |
| -import org.utplsql.api.exception.DatabaseNotCompatibleException; |
9 | 7 | import org.utplsql.api.exception.SomeTestsFailedException;
|
| 8 | +import org.utplsql.api.reporter.CoverageHTMLReporter; |
10 | 9 | import org.utplsql.api.reporter.Reporter;
|
11 | 10 | import org.utplsql.api.reporter.ReporterFactory;
|
12 | 11 | import org.utplsql.cli.exception.DatabaseConnectionFailed;
|
|
15 | 14 | import java.io.FileNotFoundException;
|
16 | 15 | import java.io.FileOutputStream;
|
17 | 16 | import java.io.PrintStream;
|
| 17 | +import java.nio.file.Paths; |
18 | 18 | import java.sql.Connection;
|
19 | 19 | import java.sql.SQLException;
|
20 | 20 | import java.util.ArrayList;
|
@@ -219,6 +219,13 @@ private List<Reporter> initReporters( Connection conn, List<ReporterOptions> rep
|
219 | 219 |
|
220 | 220 | for (ReporterOptions ro : reporterOptionsList) {
|
221 | 221 | Reporter reporter = ReporterFactory.createReporter(ro.getReporterName());
|
| 222 | + |
| 223 | + // Quick-hack for CoverageHTML Reporter |
| 224 | + if ( reporter instanceof CoverageHTMLReporter && ro.outputToFile() ) { |
| 225 | + ((CoverageHTMLReporter)reporter).setAssetsPath(ro.getOutputFileName()+"_assets/"); |
| 226 | + CoverageHTMLReporter.writeReportAssetsTo(Paths.get(ro.getOutputFileName()+"_assets/")); |
| 227 | + } |
| 228 | + |
222 | 229 | reporter.init(conn);
|
223 | 230 | ro.setReporterObj(reporter);
|
224 | 231 | reporterList.add(reporter);
|
|
0 commit comments