JTR 5.0 API Documentation

jtr.test
Class TestOutcomeTable<T extends IOutcome>

java.lang.Object
  extended by jtr.test.TestOutcomeTable<T>
All Implemented Interfaces:
java.io.Serializable

public class TestOutcomeTable<T extends IOutcome>
extends java.lang.Object
implements java.io.Serializable

This class is meant to be a repository of different IOutcome instances.
Whenever an IRunner faces an exception, an IOutcome is instantiated and added to this repository.
Once the test is done, the content of the TestOutcomeTable is provided to the user as a briefing of what happened during the runs.

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

Nested Class Summary
static class TestOutcomeTable.TestBriefing
          This class defines the briefing of the JTR test session represented by the hosting TestOutcomeTable.
 
Constructor Summary
TestOutcomeTable(NodeInfo node)
          The constructor.
 
Method Summary
 void addAll(TestOutcomeTable outcome)
           
 void addDistributionError(DistributionError error)
           
 TestOutcomeTable.TestBriefing getBriefing()
           
 java.util.Set<java.lang.Class> getCategories(NodeInfo n)
           
 int getCategoriesCount(NodeInfo node)
           
 java.lang.Object getCategory(NodeInfo node, int index)
           
 java.lang.Object getEpoch(java.lang.String s, int index)
           
 int getEpochsCount(java.lang.String s)
           
 java.lang.String getInstance(java.lang.Class c, int index)
           
 java.util.Set<java.lang.String> getInstances(java.lang.Class c)
           
 int getInstancesCount(java.lang.Class c)
           
 java.lang.Object getNode()
           
 java.util.Set<NodeInfo> getNodes()
           
 java.util.SortedSet<IOutcome> getOrderedOutcomes(java.lang.String instance)
           
 java.util.List<IOutcome> getOutcomes(java.lang.String instance)
           
 int getRunsCount(java.lang.Integer epoch)
           
 void put(java.lang.String runner, T outcome)
          Add a new outcome to the repository.
 void setEndTime()
           
 void setStartTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestOutcomeTable

public TestOutcomeTable(NodeInfo node)
The constructor.

Parameters:
node -
Method Detail

setStartTime

public void setStartTime()

setEndTime

public void setEndTime()

addDistributionError

public void addDistributionError(DistributionError error)

put

public void put(java.lang.String runner,
                T outcome)
Add a new outcome to the repository.

Parameters:
runner - The unique name of the IRunner that faced the exception. This is its thread-name automatically generated by the JTR runtime
outcome - The outcome

getBriefing

public TestOutcomeTable.TestBriefing getBriefing()

getNode

public java.lang.Object getNode()

getCategory

public java.lang.Object getCategory(NodeInfo node,
                                    int index)

getCategoriesCount

public int getCategoriesCount(NodeInfo node)

getInstance

public java.lang.String getInstance(java.lang.Class c,
                                    int index)

getInstancesCount

public int getInstancesCount(java.lang.Class c)

getEpoch

public java.lang.Object getEpoch(java.lang.String s,
                                 int index)

getEpochsCount

public int getEpochsCount(java.lang.String s)

getRunsCount

public int getRunsCount(java.lang.Integer epoch)

getOutcomes

public java.util.List<IOutcome> getOutcomes(java.lang.String instance)

getOrderedOutcomes

public java.util.SortedSet<IOutcome> getOrderedOutcomes(java.lang.String instance)

addAll

public void addAll(TestOutcomeTable outcome)

getNodes

public java.util.Set<NodeInfo> getNodes()

getCategories

public java.util.Set<java.lang.Class> getCategories(NodeInfo n)

getInstances

public java.util.Set<java.lang.String> getInstances(java.lang.Class c)

The JTR Project is licensed under GPL version 2