public class TestSuiteReport extends AbstractReport<TestSuiteReport,TestSuiteReportBuilder> implements WithConfigurationReport
Report
implementation that represents any report information related to a test suite.
Apart from the basic implementation it also provides some additional information:
TestSuiteReport
Constructor and Description |
---|
TestSuiteReport()
Creates an instance of
TestSuiteReport |
TestSuiteReport(String name)
Creates an instance of
TestSuiteReport with the given String set as a name as UnknownStringKey |
TestSuiteReport(StringKey name)
Creates an instance of
TestSuiteReport with the given StringKey set as a name |
Modifier and Type | Method and Description |
---|---|
Report |
addNewReport(Report newReport,
Class<? extends Report> expectedReportTypeClass)
Takes the given
Report and if the given expectedReportTypeClass:
is a ConfigurationReport class then it adds it into the list of
sub-reports contained in this report's configuration-report.
is a TestClassReport class then it adds it into the list of test-class-reports
is any other type of Report class then it adds it into the list of sub-reports
|
ConfigurationReport |
getConfiguration()
Returns the
ConfigurationReport |
Class<TestSuiteReportBuilder> |
getReportBuilderClass()
Returns a
ReportBuilder class that should be used as a builder for the report implementations |
String |
getStart()
Returns time when the test suite execution started
|
String |
getStop()
Returns time when the test suite execution stopped
|
List<TestClassReport> |
getTestClassReports()
Returns a list of
TestClassReport s associated with test classes run in the corresponding test suite |
TestSuiteReport |
merge(TestSuiteReport newReport)
Apart from the default functionality of merging (
AbstractReport.defaultMerge(AbstractReport) )
it also manages the additional types of information. |
void |
setConfiguration(ConfigurationReport configuration)
Sets the given
ConfigurationReport |
void |
setStop(String stop)
Sets the given time as time when an associated test suite execution stopped
|
defaultMerge, getEntries, getName, getSubReports, setEntries, setName, setSubReports
public TestSuiteReport()
TestSuiteReport
public TestSuiteReport(StringKey name)
TestSuiteReport
with the given StringKey
set as a namename
- A StringKey
to be set as a namepublic TestSuiteReport(String name)
TestSuiteReport
with the given String set as a name as UnknownStringKey
name
- A String to be set as a name as UnknownStringKey
public ConfigurationReport getConfiguration()
WithConfigurationReport
ConfigurationReport
getConfiguration
in interface WithConfigurationReport
ConfigurationReport
public void setConfiguration(ConfigurationReport configuration)
WithConfigurationReport
ConfigurationReport
setConfiguration
in interface WithConfigurationReport
configuration
- A ConfigurationReport
to be setpublic List<TestClassReport> getTestClassReports()
TestClassReport
s associated with test classes run in the corresponding test suiteTestClassReport
s associated with test classes run in the corresponding test suitepublic String getStart()
public String getStop()
public void setStop(String stop)
stop
- Stop time to be setpublic TestSuiteReport merge(TestSuiteReport newReport)
AbstractReport.defaultMerge(AbstractReport)
)
it also manages the additional types of information. The default just takes the entries and sub-reports contained
in the given TestSuiteReport
and adds them into the list of entries and sub-reports respectively withing this
instance of report. In addition, TestSuiteReport
takes the ConfigurationReport
and merges it with
the current one. The list of TestClassReport
s is taken as well and added into the corresponding list contained in this report.
The last thing is that it check if the new report contains stop time and if yes, then it sets it as stop time in this report.merge
in interface Report<TestSuiteReport,TestSuiteReportBuilder>
newReport
- A TestSuiteReport
to be mergedTestSuiteReport
public Report addNewReport(Report newReport, Class<? extends Report> expectedReportTypeClass)
Report
and if the given expectedReportTypeClass:
ConfigurationReport
class then it adds it into the list of
sub-reports contained in this report's configuration-report.TestClassReport
class then it adds it into the list of test-class-reportsReport
class then it adds it into the list of sub-reportsaddNewReport
in interface Report<TestSuiteReport,TestSuiteReportBuilder>
newReport
- A Report
to be addedexpectedReportTypeClass
- A Report
class of a type that is expected as the default one of the given reportReport
that has been added, null otherwisepublic Class<TestSuiteReportBuilder> getReportBuilderClass()
Report
ReportBuilder
class that should be used as a builder for the report implementationsgetReportBuilderClass
in interface Report<TestSuiteReport,TestSuiteReportBuilder>
ReportBuilder
class that should be used as a builder for the report implementationsCopyright © 2017 JBoss by Red Hat. All rights reserved.