org.flexunit.ant.report
Class Report

java.lang.Object
  extended by org.flexunit.ant.report.Report

public class Report
extends java.lang.Object


Field Summary
private static java.lang.String CLASSNAME_ATTRIBUTE
           
private  org.dom4j.Document document
           
private static java.lang.String ERROR
           
private static java.lang.String ERROR_ATTRIBUTE_LABEL
           
private static java.lang.String ERROR_SAVING_REPORT
           
private static java.lang.String ERRORED_TEST
           
private static java.lang.String FAILED_TEST
           
private static java.lang.String FAILURE
           
private static java.lang.String FAILURE_ATTRIBUTE_LABEL
           
private static java.lang.String FILENAME_EXTENSION
           
private static java.lang.String FILENAME_PREFIX
           
private static java.lang.String HOSTNAME_ATTRIBUTE_LABEL
           
private static java.lang.String IGNORE
           
private static java.lang.String IGNORE_ATTRIBUTE_LABEL
           
private static java.lang.String IGNORED_TEST
           
private static java.lang.String NAME_ATTRIBUTE
           
private static java.lang.String NAME_ATTRIBUTE_LABEL
           
private  java.util.List<java.lang.String> recordedRuns
           
private static java.lang.String STATUS_ATTRIBUTE
           
protected  Suite suite
           
private static java.lang.String TEST_INFO
           
private static java.lang.String TEST_SUITE
           
private static java.lang.String TESTS_ATTRIBUTE_LABEL
           
private static java.lang.String TIME_ATTRIBUTE
           
private static java.lang.String TIME_ATTRIBUTE_LABEL
           
private static java.lang.String TIMESTAMP_ATTRIBUTE_LABEL
           
 
Constructor Summary
Report(Suite suite)
           
 
Method Summary
 void addTest(org.dom4j.Document test)
          Adds the test to the suite report given an XML test document
private  void checkForStatus(org.dom4j.Document test)
          Updates counts for failed, error, and ignore on suite as well as logs what failed if told to use logging.
private  java.lang.String formatTime(long time)
           
private  java.lang.String getHostname()
           
 java.lang.String getSummary()
           
 boolean hasFailures()
          Determines if any failures (errors or failures) have occurred in this report.
 void save(java.io.File reportDir)
          Write the report XML document out to file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAILURE

private static final java.lang.String FAILURE
See Also:
Constant Field Values

ERROR

private static final java.lang.String ERROR
See Also:
Constant Field Values

IGNORE

private static final java.lang.String IGNORE
See Also:
Constant Field Values

TEST_SUITE

private static final java.lang.String TEST_SUITE
See Also:
Constant Field Values

NAME_ATTRIBUTE_LABEL

private static final java.lang.String NAME_ATTRIBUTE_LABEL
See Also:
Constant Field Values

FAILURE_ATTRIBUTE_LABEL

private static final java.lang.String FAILURE_ATTRIBUTE_LABEL
See Also:
Constant Field Values

ERROR_ATTRIBUTE_LABEL

private static final java.lang.String ERROR_ATTRIBUTE_LABEL
See Also:
Constant Field Values

IGNORE_ATTRIBUTE_LABEL

private static final java.lang.String IGNORE_ATTRIBUTE_LABEL
See Also:
Constant Field Values

TIME_ATTRIBUTE_LABEL

private static final java.lang.String TIME_ATTRIBUTE_LABEL
See Also:
Constant Field Values

TESTS_ATTRIBUTE_LABEL

private static final java.lang.String TESTS_ATTRIBUTE_LABEL
See Also:
Constant Field Values

HOSTNAME_ATTRIBUTE_LABEL

private static final java.lang.String HOSTNAME_ATTRIBUTE_LABEL
See Also:
Constant Field Values

TIMESTAMP_ATTRIBUTE_LABEL

private static final java.lang.String TIMESTAMP_ATTRIBUTE_LABEL
See Also:
Constant Field Values

FILENAME_PREFIX

private static final java.lang.String FILENAME_PREFIX
See Also:
Constant Field Values

FILENAME_EXTENSION

private static final java.lang.String FILENAME_EXTENSION
See Also:
Constant Field Values

FAILED_TEST

private static final java.lang.String FAILED_TEST
See Also:
Constant Field Values

ERRORED_TEST

private static final java.lang.String ERRORED_TEST
See Also:
Constant Field Values

IGNORED_TEST

private static final java.lang.String IGNORED_TEST
See Also:
Constant Field Values

TEST_INFO

private static final java.lang.String TEST_INFO
See Also:
Constant Field Values

ERROR_SAVING_REPORT

private static final java.lang.String ERROR_SAVING_REPORT
See Also:
Constant Field Values

CLASSNAME_ATTRIBUTE

private static final java.lang.String CLASSNAME_ATTRIBUTE
See Also:
Constant Field Values

NAME_ATTRIBUTE

private static final java.lang.String NAME_ATTRIBUTE
See Also:
Constant Field Values

STATUS_ATTRIBUTE

private static final java.lang.String STATUS_ATTRIBUTE
See Also:
Constant Field Values

TIME_ATTRIBUTE

private static final java.lang.String TIME_ATTRIBUTE
See Also:
Constant Field Values

suite

protected Suite suite

document

private org.dom4j.Document document

recordedRuns

private java.util.List<java.lang.String> recordedRuns
Constructor Detail

Report

public Report(Suite suite)
Method Detail

addTest

public void addTest(org.dom4j.Document test)
Adds the test to the suite report given an XML test document


formatTime

private java.lang.String formatTime(long time)

checkForStatus

private void checkForStatus(org.dom4j.Document test)
Updates counts for failed, error, and ignore on suite as well as logs what failed if told to use logging.

Parameters:
test - Test XML document

hasFailures

public boolean hasFailures()
Determines if any failures (errors or failures) have occurred in this report.


save

public void save(java.io.File reportDir)
          throws org.apache.tools.ant.BuildException
Write the report XML document out to file

Parameters:
reportDir - Directory to hold report file.
Throws:
org.apache.tools.ant.BuildException

getHostname

private java.lang.String getHostname()

getSummary

public java.lang.String getSummary()