com.googlecode.lightest.core
Class DefaultDetailsReporter

java.lang.Object
  extended by com.googlecode.lightest.core.LightestReporter
      extended by com.googlecode.lightest.core.DefaultDetailsReporter
All Implemented Interfaces:
ILightestReporter, groovy.lang.GroovyObject

public class DefaultDetailsReporter
extends LightestReporter
implements groovy.lang.GroovyObject

This reporter creates XML files for each test method result containing task information throughout the test run, and creates an HTML report at the end.


Field Summary
static String DEFAULT_STYLESHEET_REF
          the default stylesheet to the XML report detail files will reference
static String SUITE_FILE_NAME
          the name of the file to which the suite XML will be saved
 
Fields inherited from class com.googlecode.lightest.core.LightestReporter
DEFAULT_COOLDOWN_FACTOR
 
Constructor Summary
DefaultDetailsReporter()
           
DefaultDetailsReporter(groovy.util.AntBuilder ant)
           
 
Method Summary
 void generateBaseReport(TestRegistry testRegistry, String outputDir)
          Copies some resource files to the output directory.
 SimpleDateFormat getDateFormatter()
           
 List getInfoSourceClassNames()
           
protected  List getInfoSources()
           
 groovy.lang.MetaClass getMetaClass()
           
 boolean getPreformatDetailedMessage()
           
 Object getProperty(String name)
           
protected  String getStatusString(int testResultStatus)
           
protected  Map getTaskResultAttributes(ITaskResult taskResult)
           
protected  groovy.lang.Closure getTaskResultMarkup(ITaskResult taskResult)
           
 String getXmlStylesheetRef()
           
 Object invokeMethod(String name, Object args)
           
 boolean isPreformatDetailedMessage()
           
 void setDateFormatter(SimpleDateFormat value)
           
 void setInfoSourceClassNames(List value)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setPreformatDetailedMessage(boolean value)
           
 void setProperty(String name, Object value)
           
 void setXmlStylesheetRef(String value)
           
 void updateReport(ISuite suite, TestRegistry testRegistry, String outputDir)
          Copies the XML rendering of the suite to the appropriate location under the output directory.
 void updateReport(LightestTestResult result, TestRegistry testRegistry, List xmlSuites, List suites, String outputDir)
          Writes out a detail file.
 
Methods inherited from class com.googlecode.lightest.core.LightestReporter
getConfigText, getCooldownFactor, getScheduled, isScheduled, onUpdateDeferred, setConfigText, setCooldownFactor, setScheduled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STYLESHEET_REF

public static final String DEFAULT_STYLESHEET_REF
the default stylesheet to the XML report detail files will reference


SUITE_FILE_NAME

public static final String SUITE_FILE_NAME
the name of the file to which the suite XML will be saved

Constructor Detail

DefaultDetailsReporter

public DefaultDetailsReporter()

DefaultDetailsReporter

public DefaultDetailsReporter(groovy.util.AntBuilder ant)
Parameters:
ant - the AntBuilder that will be used to perform ant operations. This should be specified only for testing purposes; the default behavior is to create a new AntBuilder for each set of operations, which results in better memory behavior.
Method Detail

getDateFormatter

public SimpleDateFormat getDateFormatter()

setDateFormatter

public void setDateFormatter(SimpleDateFormat value)

getXmlStylesheetRef

public String getXmlStylesheetRef()

setXmlStylesheetRef

public void setXmlStylesheetRef(String value)

getPreformatDetailedMessage

public boolean getPreformatDetailedMessage()

isPreformatDetailedMessage

public boolean isPreformatDetailedMessage()

setPreformatDetailedMessage

public void setPreformatDetailedMessage(boolean value)

getInfoSourceClassNames

public List getInfoSourceClassNames()

setInfoSourceClassNames

public void setInfoSourceClassNames(List value)

generateBaseReport

public void generateBaseReport(TestRegistry testRegistry,
                               String outputDir)
Copies some resource files to the output directory.

Specified by:
generateBaseReport in interface ILightestReporter
Overrides:
generateBaseReport in class LightestReporter
Parameters:
testRegistry - the registry contains all known information about pending tests.

updateReport

public void updateReport(ISuite suite,
                         TestRegistry testRegistry,
                         String outputDir)
Copies the XML rendering of the suite to the appropriate location under the output directory.

Specified by:
updateReport in interface ILightestReporter
Overrides:
updateReport in class LightestReporter
Parameters:
suite - the suite that is about to run
testRegistry - the registry contains all known information about pending and completed tests

updateReport

public void updateReport(LightestTestResult result,
                         TestRegistry testRegistry,
                         List xmlSuites,
                         List suites,
                         String outputDir)
Writes out a detail file.

Specified by:
updateReport in interface ILightestReporter
Overrides:
updateReport in class LightestReporter
Parameters:
result -
testRegistry -
outputDir -

getInfoSources

protected List getInfoSources()

getTaskResultMarkup

protected groovy.lang.Closure getTaskResultMarkup(ITaskResult taskResult)

getTaskResultAttributes

protected Map getTaskResultAttributes(ITaskResult taskResult)

getStatusString

protected String getStatusString(int testResultStatus)

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class LightestReporter

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class LightestReporter

invokeMethod

public Object invokeMethod(String name,
                           Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class LightestReporter

getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class LightestReporter

setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class LightestReporter


Copyright © 2009. All Rights Reserved.