org.apache.anteater.test.log
Class DebugLogger

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.types.DataType
              |
              +--org.apache.anteater.test.BaseDataType
                    |
                    +--org.apache.anteater.test.log.BaseLogger
                          |
                          +--org.apache.anteater.test.log.DebugLogger
All Implemented Interfaces:
Groupable, Logger

public class DebugLogger
extends BaseLogger
implements Logger

A Logger that just prints println messages indicating which methods have been called.

Since:
June 15, 2002
Version:
$Revision: 1.7 $ $Date: 2002/07/04 12:59:08 $
Author:
Jeff Turner

Nested Class Summary
 
Nested classes inherited from class org.apache.anteater.test.log.BaseLogger
BaseLogger.TestLog
 
Field Summary
 
Fields inherited from class org.apache.anteater.test.log.BaseLogger
_destDir, _dt, _errors, _extension, _failures, _filenameFormat, _overwrite, _t0, _tasks, _testLog, _useFile, DEFAULT_LOGDIR
 
Fields inherited from class org.apache.anteater.test.BaseDataType
debug, debugWasSet
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, description, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
DebugLogger()
           
 
Method Summary
 void actionTaskError(String msg, Exception e)
          Indicates that an error occurred before any of the tests were attempted.
 void endActionTask(ActionTask task)
          Indicates that an ActionTask has ended.
 void endTest(MatcherTest test)
          Indicates that a test against the retrieved response has completed.
 void startActionTask(ActionTask task)
          Indicates that an ActionTask (aka HTTP operation) has started.
 void startTest(MatcherTest test)
          Indicates the start of a test against the retrieved Response.
 void testError(String msg, Exception e)
          ActionTasks may fail unexpectedly, and these are classed as Errors and should be reported here.
 void testFailure(String msg, Exception e)
          If the ActionTask fails to validate the service, then a failure should be recorded via this method.
 void testLog(String msg)
          ActionTasks may log anything they think relevant to the user here.
 
Methods inherited from class org.apache.anteater.test.log.BaseLogger
setExtension, setFilenameFormat, setOverwrite, setTodir, setUseFile
 
Methods inherited from class org.apache.anteater.test.BaseDataType
debug, getDataTypeName, getDebug, getGroup, getRef, print, println, setDebug, setGroup, setGroup, setRefid
 
Methods inherited from class org.apache.tools.ant.types.DataType
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.anteater.test.log.Logger
setExtension, setFilenameFormat, setOverwrite, setTodir, setUseFile
 
Methods inherited from interface org.apache.anteater.test.Groupable
setGroup, setGroup
 

Constructor Detail

DebugLogger

public DebugLogger()
Method Detail

startActionTask

public void startActionTask(ActionTask task)
Description copied from interface: Logger
Indicates that an ActionTask (aka HTTP operation) has started. At this point the underlying implementation should start a timer. We can also conceptually start writing a new testsuite file, and fill in a blank header:

Specified by:
startActionTask in interface Logger
Overrides:
startActionTask in class BaseLogger

startTest

public void startTest(MatcherTest test)
Description copied from interface: Logger
Indicates the start of a test against the retrieved Response. An internal test timer should start. Can start writing: The 'tests' field of the actiontask will be incremented

Specified by:
startTest in interface Logger
Overrides:
startTest in class BaseLogger

actionTaskError

public void actionTaskError(String msg,
                            Exception e)
Description copied from interface: Logger
Indicates that an error occurred before any of the tests were attempted. Eg, if the HTTP request times out, or the DNS lookup fails.

If this event occurs, no further tests are expected to be logged.

Specified by:
actionTaskError in interface Logger

testLog

public void testLog(String msg)
Description copied from interface: Logger
ActionTasks may log anything they think relevant to the user here.

Specified by:
testLog in interface Logger
Overrides:
testLog in class BaseLogger

testError

public void testError(String msg,
                      Exception e)
Description copied from interface: Logger
ActionTasks may fail unexpectedly, and these are classed as Errors and should be reported here. This will add an child to the current . The 'errors' field of the actiontask will be incremented.

Specified by:
testError in interface Logger
Overrides:
testError in class BaseLogger

testFailure

public void testFailure(String msg,
                        Exception e)
Description copied from interface: Logger
If the ActionTask fails to validate the service, then a failure should be recorded via this method. This will add a child to the current . The 'failures' field of the actiontask will be incremented.

Specified by:
testFailure in interface Logger
Overrides:
testFailure in class BaseLogger

endTest

public void endTest(MatcherTest test)
Description copied from interface: Logger
Indicates that a test against the retrieved response has completed. An internal test timer should end. If the request succeeded, an entry like: is written. If the request failed or generated an error, the @testError or

Specified by:
endTest in interface Logger
Overrides:
endTest in class BaseLogger

endActionTask

public void endActionTask(ActionTask task)
Description copied from interface: Logger
Indicates that an ActionTask has ended. The actiontask timer should be stopped Here we can also write the assembled actiontask to a file.

Specified by:
endActionTask in interface Logger
Overrides:
endActionTask in class BaseLogger


Ant Functional Tester -- see Project home page for details