com.plumtree.uiinfrastructure.diagnostic
Class IndividualTestProgressTracker

java.lang.Object
  extended by com.plumtree.uiinfrastructure.diagnostic.IndividualTestProgressTracker
All Implemented Interfaces:
IProgressTracker

public class IndividualTestProgressTracker
extends java.lang.Object
implements IProgressTracker

Manages the test results for a single task. Used to build up a report array that can be used to record results. Has hooks back to progress manager class.

Author:
DavidP

Constructor Summary
IndividualTestProgressTracker()
           
 
Method Summary
 void complete()
          Called by testrunner when test completes
 void decrement()
          Called by testrunner when a test step fails and has to be backtracked
 boolean getCompleted()
          Returns true if the overall task completed, no matter what the status
 int getCompletedSteps()
          Gets the number of steps completed
 int getCurTask()
          Returns number of tasks to be run
 int getNumSteps()
          Returns maximum value of progress indicator for this test
 int getNumTasks()
          Returns number of tasks to be run
 ReturnValue getRetval(int step)
          Gets a specific return value for a step.
 void increment()
          Called by testrunner for each test step
 void init(int iTask, int iNumTasks, boolean verbose)
          Sets the number of tasks to be run
 void notifyevent(int iStep, ReturnValue retval)
          Called by testrunner to add a message to the message log
 void notifyevent(java.lang.String message, boolean verbose)
          Called by testrunner to add a message to the message log
 void setCompleted(boolean bCompleted)
          sets the completed boolean
 void setManager(ProgressManager mgr)
          Distinct hook back to manager for notify markers
 void setName(java.lang.String name)
          Tracks th ename of this task.
 void setNumSteps(int max)
          Sets the maximum for progress tracking
 void setRetval(int step, ReturnValue retval)
          Sets a specific return value for a step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndividualTestProgressTracker

public IndividualTestProgressTracker()
Method Detail

init

public void init(int iTask,
                 int iNumTasks,
                 boolean verbose)
Sets the number of tasks to be run

Specified by:
init in interface IProgressTracker

setName

public void setName(java.lang.String name)
Description copied from interface: IProgressTracker
Tracks th ename of this task.

Specified by:
setName in interface IProgressTracker

getNumTasks

public int getNumTasks()
Returns number of tasks to be run

Specified by:
getNumTasks in interface IProgressTracker
Returns:

getCurTask

public int getCurTask()
Returns number of tasks to be run

Specified by:
getCurTask in interface IProgressTracker
Returns:

getNumSteps

public int getNumSteps()
Description copied from interface: IProgressTracker
Returns maximum value of progress indicator for this test

Specified by:
getNumSteps in interface IProgressTracker
Returns:

setNumSteps

public void setNumSteps(int max)
Description copied from interface: IProgressTracker
Sets the maximum for progress tracking

Specified by:
setNumSteps in interface IProgressTracker

setRetval

public void setRetval(int step,
                      ReturnValue retval)
Description copied from interface: IProgressTracker
Sets a specific return value for a step. Step 0 is init.

Specified by:
setRetval in interface IProgressTracker

getRetval

public ReturnValue getRetval(int step)
Description copied from interface: IProgressTracker
Gets a specific return value for a step. Step 0 is init.

Specified by:
getRetval in interface IProgressTracker

increment

public void increment()
Description copied from interface: IProgressTracker
Called by testrunner for each test step

Specified by:
increment in interface IProgressTracker

decrement

public void decrement()
Description copied from interface: IProgressTracker
Called by testrunner when a test step fails and has to be backtracked

Specified by:
decrement in interface IProgressTracker

complete

public void complete()
Description copied from interface: IProgressTracker
Called by testrunner when test completes

Specified by:
complete in interface IProgressTracker

notifyevent

public void notifyevent(java.lang.String message,
                        boolean verbose)
Description copied from interface: IProgressTracker
Called by testrunner to add a message to the message log

Specified by:
notifyevent in interface IProgressTracker

notifyevent

public void notifyevent(int iStep,
                        ReturnValue retval)
Description copied from interface: IProgressTracker
Called by testrunner to add a message to the message log

Specified by:
notifyevent in interface IProgressTracker

setManager

public void setManager(ProgressManager mgr)
Distinct hook back to manager for notify markers

Parameters:
mgr -

getCompleted

public boolean getCompleted()
Returns true if the overall task completed, no matter what the status

Specified by:
getCompleted in interface IProgressTracker

setCompleted

public void setCompleted(boolean bCompleted)
sets the completed boolean

Specified by:
setCompleted in interface IProgressTracker

getCompletedSteps

public int getCompletedSteps()
Description copied from interface: IProgressTracker
Gets the number of steps completed

Specified by:
getCompletedSteps in interface IProgressTracker



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.