JTR 5.0 API Documentation

jtr.test
Interface IOutcome<T extends AbstractRunner>

All Superinterfaces:
java.lang.Comparable, java.io.Serializable
All Known Implementing Classes:
DefaultOutcome

public interface IOutcome<T extends AbstractRunner>
extends java.io.Serializable, java.lang.Comparable

This interface defines what an outcome is for the JTRunner framework.
An outcome is composed by:

1. an epoch
2. a run
3. an enterprise configuration
4. a set of parameters
5. an exception
6. a JTR-node
7. a timestamp 8. a duration
What it means is that durig epoch epoch at run run, an IRunner has experienced an exception using the given enterprise configuration and its set of parameters.

Since:
1.0
Version:
5.0
Author:
Francesco Russo (frusso@dev.java.net)
See Also:
IOutcomeFactory

Nested Class Summary
static class IOutcome.OutcomeType
          Categorization of the different admitted outcome types.
 
Method Summary
 EnterpriseConfig getEnterpriseConfig()
          Get the enterprise configuration
 java.lang.Integer getEpoch()
          Get the epoch.
 java.lang.Throwable getException()
          Get the exception
 NodeInfo getNode()
          Return the JTR-node the runner that produced this outcome belongs to.
 ParametersMap getParametersMap()
          Returns the parameters the IRunner was working with at the moment of the exception
 java.lang.Integer getRun()
          Get the run
 java.lang.Long getRunDuration()
          Get the duration of the described run.
 java.lang.Class getRunnerCategory()
          Returns the category the runner that produced this outcome belogns to.
 java.lang.String getRunnerId()
          Returns the unique ID of the runner that produced this outcome.
 java.util.Date getTimeStamp()
          Get the run's timestamp.
 IOutcome.OutcomeType getType()
          Get the type of the outcome
 java.io.Serializable getUserObject()
          Get a user-object that can be used to add any user-defined information to the output of the test.
 boolean isFailure()
          Returs Boolean.TRUE iff the type equals OutcomeType.FAILURE.
 void setEnterpriseConfig(EnterpriseConfig cfg)
          Set the enterprise configuration active at the moment of the exception
 void setEpoch(java.lang.Integer epoch)
          Set the epoch when the exception happened.
 void setException(java.lang.Throwable t)
          Set the exception
 void setNode(NodeInfo node)
          Set the JTR-node the runner that produced this outcome belongs to.
 void setParametersMap(ParametersMap params)
          Sets the parameters the IRunner that experiences the excepion was working with
 void setRun(java.lang.Integer run)
          Set the run when the exception happened
 void setRunDuration(java.lang.Long duration)
          Set the duration of the described run.
 void setRunnerCategory(java.lang.Class<T> category)
          Set the category the runner that produced this outcome belogns to.
 void setRunnerId(java.lang.String id)
          Set the unique ID of the runner that produced this outcome.
 void setTimeStamp(java.util.Date ts)
          Set the timestamp indicating when the run has been started.
 void setType(IOutcome.OutcomeType type)
          Set the type of the outcome
 void setUserObject(java.io.Serializable obj)
          Set a user-object that can be used to add any user-defined information to the output of the test.
 java.lang.String toString()
          Return a description of the outcome
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

setEpoch

void setEpoch(java.lang.Integer epoch)
Set the epoch when the exception happened.

Parameters:
epoch - The epoch

getEpoch

java.lang.Integer getEpoch()
Get the epoch.

Returns:
int The epoch of the exception

setRun

void setRun(java.lang.Integer run)
Set the run when the exception happened

Parameters:
run - The run

getRun

java.lang.Integer getRun()
Get the run

Returns:
int The run

setEnterpriseConfig

void setEnterpriseConfig(EnterpriseConfig cfg)
Set the enterprise configuration active at the moment of the exception

Parameters:
cfg - The enterprise configuration

getEnterpriseConfig

EnterpriseConfig getEnterpriseConfig()
Get the enterprise configuration

Returns:
EnterpriseConfig

setParametersMap

void setParametersMap(ParametersMap params)
Sets the parameters the IRunner that experiences the excepion was working with

Parameters:
params - The IRunner's parameters

getParametersMap

ParametersMap getParametersMap()
Returns the parameters the IRunner was working with at the moment of the exception

Returns:
ParametersMap

setException

void setException(java.lang.Throwable t)
Set the exception

Parameters:
t - The exception

getException

java.lang.Throwable getException()
Get the exception

Returns:
Throwable The exception

setType

void setType(IOutcome.OutcomeType type)
Set the type of the outcome


getType

IOutcome.OutcomeType getType()
Get the type of the outcome


isFailure

boolean isFailure()
Returs Boolean.TRUE iff the type equals OutcomeType.FAILURE.


getRunnerCategory

java.lang.Class getRunnerCategory()
Returns the category the runner that produced this outcome belogns to.


getRunnerId

java.lang.String getRunnerId()
Returns the unique ID of the runner that produced this outcome.


setRunnerCategory

void setRunnerCategory(java.lang.Class<T> category)
Set the category the runner that produced this outcome belogns to.


setRunnerId

void setRunnerId(java.lang.String id)
Set the unique ID of the runner that produced this outcome.


getNode

NodeInfo getNode()
Return the JTR-node the runner that produced this outcome belongs to.


setNode

void setNode(NodeInfo node)
Set the JTR-node the runner that produced this outcome belongs to.


setRunDuration

void setRunDuration(java.lang.Long duration)
Set the duration of the described run.


getRunDuration

java.lang.Long getRunDuration()
Get the duration of the described run.


setTimeStamp

void setTimeStamp(java.util.Date ts)
Set the timestamp indicating when the run has been started.


getTimeStamp

java.util.Date getTimeStamp()
Get the run's timestamp.


setUserObject

void setUserObject(java.io.Serializable obj)
Set a user-object that can be used to add any user-defined information to the output of the test. Every user-object must have a valid toString method implementation too.


getUserObject

java.io.Serializable getUserObject()
Get a user-object that can be used to add any user-defined information to the output of the test. Every user-object must have a valid toString method implementation too.


toString

java.lang.String toString()
Return a description of the outcome

Overrides:
toString in class java.lang.Object
Returns:
String

The JTR Project is licensed under GPL version 2