com.canoo.webtest.reporting
Class StepResult

java.lang.Object
  extended by com.canoo.webtest.reporting.StepResult
Direct Known Subclasses:
RootStepResult

public class StepResult
extends Object

Result holder for the execution of a step (or task) and his children.

Author:
Marc Guillemot

Constructor Summary
protected StepResult(RuntimeConfigurable taskWrapper)
          Constructs a result for a non executed task (and his children).
  StepResult(String taskName)
           
 
Method Summary
 void addChild(StepResult result)
           
protected  void addLostChildren(Iterator iter)
          Adds report information for non executed child tasks
protected  void addNotExecutedChildren(Task task)
          Tries to find the child tasks that haven't been executed and adds them to the current result.
 Map<String,String> getAttributes()
          Gets the attributes of the task
 List<StepResult> getChildren()
           
 long getDuration()
          Gets the duration of the task execution.
 Date getEndDate()
          Gets the date at which the execution of the task finished
 List getHtmlParserMessages()
           
 Location getLocation()
          Gets the location of the task
 Date getStartDate()
          Gets the date at which the execution of the task started
 String getTaskDescription()
          Gets the description of the task
 String getTaskName()
           
 boolean isCompleted()
          Indicates if the step has been executed (may be successfull or failed)
 boolean isSuccessful()
          Indicates if the step has been successfully completed
protected  void retrieveNestedText(RuntimeConfigurable taskWrapper)
          Retrieves the nested text configured within the task, if any, taking care to remove "noise" as Ant does
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StepResult

protected StepResult(RuntimeConfigurable taskWrapper)
Constructs a result for a non executed task (and his children). This allows to present information in report about configured tasks that haven't been executed due to an error in a step before them.

Parameters:
taskWrapper - the configurable for the task

StepResult

public StepResult(String taskName)
Method Detail

retrieveNestedText

protected void retrieveNestedText(RuntimeConfigurable taskWrapper)
Retrieves the nested text configured within the task, if any, taking care to remove "noise" as Ant does

Parameters:
taskWrapper - the current task wrapper

addChild

public void addChild(StepResult result)
Parameters:
result - the child to add

addLostChildren

protected void addLostChildren(Iterator iter)
Adds report information for non executed child tasks

Parameters:
iter - the iterator over RuntimeConfigurable child task

addNotExecutedChildren

protected void addNotExecutedChildren(Task task)
Tries to find the child tasks that haven't been executed and adds them to the current result.

Parameters:
task - the failing task

getAttributes

public Map<String,String> getAttributes()
Gets the attributes of the task

Returns:
the attributes

getChildren

public List<StepResult> getChildren()
Returns:
the children.

getDuration

public long getDuration()
Gets the duration of the task execution.

Returns:
the task duration, -1 if the task hasn't be executed

getEndDate

public Date getEndDate()
Gets the date at which the execution of the task finished

Returns:
null if the task has not been completed

getHtmlParserMessages

public List getHtmlParserMessages()

getLocation

public Location getLocation()
Gets the location of the task

Returns:
null if unknown

getStartDate

public Date getStartDate()
Gets the date at which the execution of the task started

Returns:
null if the task has not been started

getTaskDescription

public String getTaskDescription()
Gets the description of the task

Returns:
null if unknown or no description set

getTaskName

public String getTaskName()
Returns:
the task name.

isCompleted

public boolean isCompleted()
Indicates if the step has been executed (may be successfull or failed)

Returns:
true if executed

isSuccessful

public boolean isSuccessful()
Indicates if the step has been successfully completed

Returns:
true if successful

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