Package com.sun.javatest.report
Class Report
- java.lang.Object
-
- com.sun.javatest.report.Report
-
public class Report extends java.lang.Object
A report generator for sets of test results.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Report.CustomReportManager
static class
Report.Settings
Deprecated.Use com.sun.javatest.report.ReportSettings insteadstatic interface
Report.StartGenListener
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INDEX_FILE_NAME
static java.lang.String
MARKER_FILE_NAME
static java.lang.String
REPORT_FORMATS_TO_LOAD
If this system property is defined then its value is expected to contain comma-separated list of ReportFormat subclasses to load, which would be put in use instead of those loaded by ServiceLoader from the dedicated file.
-
Constructor Summary
Constructors Constructor Description Report()
Report(InterviewParameters params, java.io.File dir)
Deprecated.It is expected that you call writeReport() if you use this constructor.Report(InterviewParameters params, java.io.File dir, TestFilter tf)
Deprecated.It is expected that you call writeReport() if you use this constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addStartGenListener(Report.StartGenListener l)
static java.lang.String[]
getHtmlReportFilenames()
java.io.File
getReportDir()
Gets the report directory that is currently defined.static ReportSettings
getSettingsPrefs()
static boolean
isReportDirectory(java.io.File d)
Checks if the input directory contains JT Harness reports.void
removeStartGeneratingListener(Report.StartGenListener l)
static void
writePrefs(ReportSettings s)
void
writeReport(Report.Settings s, java.io.File dir)
Deprecated.use writeReports(ReportSettings s, File dir)void
writeReport(java.lang.String... types)
Writes a report about a set of test results.void
writeReports(ReportSettings s, java.io.File dir)
Write report files using the given settings, to the given location.
-
-
-
Field Detail
-
MARKER_FILE_NAME
public static final java.lang.String MARKER_FILE_NAME
- See Also:
- Constant Field Values
-
INDEX_FILE_NAME
public static final java.lang.String INDEX_FILE_NAME
- See Also:
- Constant Field Values
-
REPORT_FORMATS_TO_LOAD
public static final java.lang.String REPORT_FORMATS_TO_LOAD
If this system property is defined then its value is expected to contain comma-separated list of ReportFormat subclasses to load, which would be put in use instead of those loaded by ServiceLoader from the dedicated file.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Report
public Report()
-
Report
@Deprecated public Report(InterviewParameters params, java.io.File dir)
Deprecated.It is expected that you call writeReport() if you use this constructor.Creates and initializes an instance of the report generator.- Parameters:
params
- Configuration parameters to be included in the report.dir
- The directory to which to write the report.
-
Report
@Deprecated public Report(InterviewParameters params, java.io.File dir, TestFilter tf)
Deprecated.It is expected that you call writeReport() if you use this constructor.Creates and initializes an instance of the report generator.- Parameters:
params
- Configuration parameters to be included in the report.dir
- The directory to which to write the report.tf
- The test filter to be used to filter out tests in the report.
-
-
Method Detail
-
isReportDirectory
public static boolean isReportDirectory(java.io.File d)
Checks if the input directory contains JT Harness reports.- Parameters:
d
- The directory to be checked.- Returns:
- true if the directory contains JT Harness reports.
-
getHtmlReportFilenames
public static java.lang.String[] getHtmlReportFilenames()
-
writePrefs
public static void writePrefs(ReportSettings s)
-
getSettingsPrefs
public static ReportSettings getSettingsPrefs()
-
writeReport
@Deprecated public void writeReport(Report.Settings s, java.io.File dir) throws java.io.IOException
Deprecated.use writeReports(ReportSettings s, File dir)- Throws:
java.io.IOException
-
writeReports
public void writeReports(ReportSettings s, java.io.File dir) throws java.io.IOException
Write report files using the given settings, to the given location. This is the execution entry point for GUI mode. The settings used are written into the JT Harness preferences automatically at the end of this method, unless this method exits with an exception.- Parameters:
s
- Settings to use for this report run, never null.dir
- Output location, never null.- Throws:
java.io.IOException
- May occur at any time during the writing of the reports or creating the directories to store them in.
-
writeReport
public void writeReport(java.lang.String... types) throws java.io.IOException
Writes a report about a set of test results. This is the execution entry point for batch mode. The default settings from the preferences will be used.- Parameters:
types
- The report type identifiers, may be a custom type. null for default generated reports- Throws:
java.lang.IllegalArgumentException
- if the type parameter does not identify a proper report type.java.io.IOException
- If an error occurs writing any of the files.
-
getReportDir
public java.io.File getReportDir()
Gets the report directory that is currently defined.- Returns:
- The report directory.
-
addStartGenListener
public void addStartGenListener(Report.StartGenListener l)
-
removeStartGeneratingListener
public void removeStartGeneratingListener(Report.StartGenListener l)
-
-