Jetif v1.8.0

jetif
Class CaseResult

java.lang.Object
  extended byjetif.CaseResult
All Implemented Interfaces:
Serializable

public class CaseResult
extends Object
implements Serializable

A CaseResult is a result object for a test case. It consists of serveral method result and some result information about the test case, such as name, status and elapsed time of test case.

Author:
Vicky Wang
See Also:
Serialized Form

Field Summary
static int FAILED
          The int value representing the failed state.
static int PASSED
          The int value representing the passed state.
static int SKIPPED
          The int value representing the skipped state.
static int UNKNOWN
          The int value representing the unknown state.
 
Method Summary
 List getComments()
          Returns all comments of this test case.
 long getElapsedTime()
          Returns elapsed time of this test case.
 List getMethodResults()
          Returns list contains all results of test methods which has been ran.
 Vector getMethods()
          Deprecated. use the getMethodResults() instead
 String getName()
          Returns the name of this case.
 CaseSpec getSpec()
          Returns the spec of this test case.
 int getState()
          Returns the state of this test case, the returned value maybe one of UNKNOWN, PASSED, FAILED, SKIPPED.
 void setName(String name)
          Set the name of this case result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
The int value representing the unknown state.

See Also:
Constant Field Values

PASSED

public static final int PASSED
The int value representing the passed state.

See Also:
Constant Field Values

FAILED

public static final int FAILED
The int value representing the failed state.

See Also:
Constant Field Values

SKIPPED

public static final int SKIPPED
The int value representing the skipped state.

See Also:
Constant Field Values
Method Detail

setName

public void setName(String name)
Set the name of this case result.

Parameters:
name - the name of test case.

getName

public String getName()
Returns the name of this case.


getMethodResults

public List getMethodResults()
Returns list contains all results of test methods which has been ran. A test case will break if any test method failed, and the returned vector may not contains results of all methods defined in the spec.

Returns:
all method results.

getMethods

public Vector getMethods()
Deprecated. use the getMethodResults() instead

Returns vector contains all results of test methods which has been ran. A test case will break if any test method failed, and the returned vector may not contains results of all methods defined in the spec.

Returns:
all method results.

getComments

public List getComments()
Returns all comments of this test case.

Returns:
a Vector object with String element.

getElapsedTime

public long getElapsedTime()
Returns elapsed time of this test case. Note: This elapsed time is not accurate and for reference only.

Returns:
the elapsed time in milliseconds.

getState

public int getState()
Returns the state of this test case, the returned value maybe one of UNKNOWN, PASSED, FAILED, SKIPPED.

Returns:
the state of this test case.

getSpec

public CaseSpec getSpec()
Returns the spec of this test case.

Returns:
the case spec.

Jetif v1.8.0

Copyright © 2004,2005 Vicky Wang - All Rights Reserved.