JET

edu.utep.cs.jet.rat
Class TestRunner

java.lang.Object
  extended by edu.utep.cs.jet.rat.TestRunner

public class TestRunner
extends Object

A class to execute test cases and determine test results.

Author:
Yoonsik Cheon

Field Summary
static int TEST_FAILURE
          Constant denoting a test failure.
static int TEST_MEANINGLESS
          Constant denoting a meaningless test.
static int TEST_SUCCESS
          Constant denoting a test success.
 
Constructor Summary
TestRunner()
           
 
Method Summary
 Throwable getException()
          Returns the exception, if exists, caught during the last test execution.
 int run(Member mut, TestCase tc)
          Runs the given method or constructor with the given test case and returns the test result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_SUCCESS

public static final int TEST_SUCCESS
Constant denoting a test success.

See Also:
Constant Field Values

TEST_FAILURE

public static final int TEST_FAILURE
Constant denoting a test failure.

See Also:
Constant Field Values

TEST_MEANINGLESS

public static final int TEST_MEANINGLESS
Constant denoting a meaningless test. A test is meaningless if the given test case doesn't satisfy the precondition of the method being tested.

See Also:
Constant Field Values
Constructor Detail

TestRunner

public TestRunner()
Method Detail

run

public int run(Member mut,
               TestCase tc)
Runs the given method or constructor with the given test case and returns the test result. The given member should be a method or constructor, and the test case should be appropriate (e.g., number of arguments and their types) to test the given method or constructor. The return value is TEST_SUCCESS, TEST_FAILURE, or TEST_MEANINGLESS.


getException

public Throwable getException()
Returns the exception, if exists, caught during the last test execution. If no exception was caught, returns null.


JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.