|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.support.AbstractArgumentChecker
org.schmant.task.junit4.suitereporter.JUnit4TestSuiteReporter
public class JUnit4TestSuiteReporter
The JUnit4TestSuiteReporter
is a JUnit4Reporter
used for
reporting results from several test suites. It saves the results from each
test run in an XML file and when printReport()
is called, it
assembles the results, uses a JUnit4TestSuiteReportPrinter
to format
the report, and prints it to the build thread's
Report
(usually to standard out and err).
The files are stored in the target directory set with
setTarget(Object)
. If no target is set, a new temporary directory is
created for the output files.
The XML files are named [prefix][integer].xml
. The default value for
the prefix is DEFAULT_XML_FILE_PREFIX
(another prefix can be set
with setXmlFilePrefix(String)
). The integer is an index number that
starts with 1 and is incremented for each test suite run.
By default, a SimpleJUnit4TestSuiteReportPrinter
is used to format
the report. To use another implementation, set it with
setReportFormatter(JUnit4TestSuiteReportPrinter)
.
Constructor Summary | |
---|---|
JUnit4TestSuiteReporter()
|
Method Summary | |
---|---|
Map<String,String> |
getJavaSystemProperties(List<String> testSuiteClasses)
Get the Map of Java system properties that the RunListener will use to configure itself. |
String |
getRunListenerClassName()
Get the fully qualified name of the RunListener class. |
void |
printReport()
This method prints the report to the thread's current Report (which often means that the report ends
up being printed to standard out and err). |
void |
printReport(Report r)
Print the test suite report to the supplied Report . |
JUnit4TestSuiteReporter |
setReportFormatter(JUnit4TestSuiteReportPrinter f)
Set the report formatter to be used by printReport() . |
JUnit4TestSuiteReporter |
setTarget(Object o)
Set the target directory where XML files will be created. |
JUnit4TestSuiteReporter |
setXmlFilePrefix(String s)
Set the file prefix for the XML files. |
void |
validateConfiguration(Collection<String> errMsgs)
Validate the configuration. |
Methods inherited from class org.schmant.support.AbstractArgumentChecker |
---|
check, check, check, check |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JUnit4TestSuiteReporter()
Method Detail |
---|
public JUnit4TestSuiteReporter setTarget(Object o)
If no target is set, a new temporary directory will be created for the generated XML files.
o
- The target directory. The argument is interpreted with
InterpretAsFileStrategy
.
this
.public JUnit4TestSuiteReporter setXmlFilePrefix(String s)
s
- The file prefix.
this
.public JUnit4TestSuiteReporter setReportFormatter(JUnit4TestSuiteReportPrinter f)
printReport()
.
f
- The report formatter.
this
.public String getRunListenerClassName()
JUnit4Reporter
RunListener
class.
getRunListenerClassName
in interface JUnit4Reporter<JUnit4TestSuiteReporter>
public void validateConfiguration(Collection<String> errMsgs)
JUnit4Reporter
validateConfiguration
in interface JUnit4Reporter<JUnit4TestSuiteReporter>
errMsgs
- The collection to add error messages to.public Map<String,String> getJavaSystemProperties(List<String> testSuiteClasses)
JUnit4Reporter
Map
of Java system properties that the RunListener
will use to configure itself. This method may return null
if the RunListener
does not use any properties.
getJavaSystemProperties
in interface JUnit4Reporter<JUnit4TestSuiteReporter>
testSuiteClasses
- A list of all test classes to run.
public void printReport()
Report
(which often means that the report ends
up being printed to standard out and err).
public void printReport(Report r)
Report
.
r
- The Report
to print the test suite report to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |