com.canoo.webtest.reporting
Class StepExecutionListener

java.lang.Object
  extended by com.canoo.webtest.engine.NOPBuildListener
      extended by com.canoo.webtest.reporting.StepExecutionListener
All Implemented Interfaces:
IPropertyExpansionListener, IStepResultListener, EventListener, BuildListener

public class StepExecutionListener
extends NOPBuildListener
implements IStepResultListener, IPropertyExpansionListener

Listens for task execution to extract StepResults to generate the report.

Author:
Marc Guillemot

Constructor Summary
StepExecutionListener(Context context)
           
 
Method Summary
protected  List getLastHtmlParserMessages()
          Gets the html messages that have been catched since for the step beeing executed
 RootStepResult getRootResult()
           
protected  boolean isEventForMe()
          Test if event is intended for this listener.
protected  boolean isInteresting(Task task)
          Indicates if report information should be captured for this task
protected  boolean isToIgnore(Task task)
           
 void propertiesExpanded(String originalValue, String expanded)
          Notifies a property expansion
 void stepResults(Map results)
          Called by Step to notify computed values resulting of the execution of a step.
 void taskFinished(BuildEvent event)
          Does nothing
 void taskStarted(BuildEvent event)
          Called by Ant when a task is started.
 void webtestFinished()
          Called when the test execution finished.
 
Methods inherited from class com.canoo.webtest.engine.NOPBuildListener
buildFinished, buildStarted, messageLogged, targetFinished, targetStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepExecutionListener

public StepExecutionListener(Context context)
Method Detail

getLastHtmlParserMessages

protected List getLastHtmlParserMessages()
Gets the html messages that have been catched since for the step beeing executed

Returns:
a (possibly empty) list of HtmlParserMessage

getRootResult

public RootStepResult getRootResult()
Returns:
the fRootResult.

isInteresting

protected boolean isInteresting(Task task)
Indicates if report information should be captured for this task

Parameters:
task - the task
Returns:
true if report information should be captured

isToIgnore

protected boolean isToIgnore(Task task)

propertiesExpanded

public void propertiesExpanded(String originalValue,
                               String expanded)
Description copied from interface: IPropertyExpansionListener
Notifies a property expansion

Specified by:
propertiesExpanded in interface IPropertyExpansionListener
Parameters:
originalValue - the original value (like "${myProp}")
expanded - the expanded value (like "blabla")
See Also:
IPropertyExpansionListener.propertiesExpanded(java.lang.String,java.lang.String)

stepResults

public void stepResults(Map results)
Called by Step to notify computed values resulting of the execution of a step.

Specified by:
stepResults in interface IStepResultListener
See Also:
IStepResultListener.stepResults(java.util.Map)

taskFinished

public void taskFinished(BuildEvent event)
Description copied from class: NOPBuildListener
Does nothing

Specified by:
taskFinished in interface BuildListener
Overrides:
taskFinished in class NOPBuildListener
See Also:
BuildListener.taskFinished(org.apache.tools.ant.BuildEvent)

taskStarted

public void taskStarted(BuildEvent event)
Called by Ant when a task is started. Captures the started task (in fact its wrapper) for report.

Specified by:
taskStarted in interface BuildListener
Overrides:
taskStarted in class NOPBuildListener
See Also:
BuildListener.taskStarted(org.apache.tools.ant.BuildEvent)

isEventForMe

protected boolean isEventForMe()
Test if event is intended for this listener. When many threads run in parallel to execute of the same project, the listeners will "see" the events for the other and they should ignore them


webtestFinished

public void webtestFinished()
Called when the test execution finished. Here it does nothing, but it is intended for users extending this class.


Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved.