org.apache.jackrabbit.tck
Class TckTestRunner

java.lang.Object
  extended byjunit.runner.BaseTestRunner
      extended byorg.apache.jackrabbit.tck.TckTestRunner
All Implemented Interfaces:
junit.framework.TestListener

public class TckTestRunner
extends junit.runner.BaseTestRunner

The TckTestRunner class implements the TestListener interface.


Field Summary
 
Fields inherited from class junit.runner.BaseTestRunner
SUITE_METHODNAME
 
Constructor Summary
TckTestRunner(javax.servlet.jsp.JspWriter writer)
          The constructor inits the result map and sets the writer
 
Method Summary
 void endTest(junit.framework.Test test)
          This method is called everytime a test is finished.
 int getNumberOfTests()
           
 java.util.Map getResults()
          Returns all results
 void resetNumberOfTests()
           
protected  void runFailed(java.lang.String message)
          The test could not be started.
 void setInteractionString(java.lang.String interactionString)
           
 void setLogString(java.lang.String logString)
           
 void setNewTestString(java.lang.String newTestString)
           
 void startTest(junit.framework.Test test)
          This method is called everytime a test is executed.
 void testEnded(java.lang.String testName)
           
 void testFailed(int status, junit.framework.Test test, java.lang.Throwable t)
          This method is called when a Test failed.
 void testStarted(java.lang.String testName)
           
 
Methods inherited from class junit.runner.BaseTestRunner
addError, addFailure, clearStatus, elapsedTimeAsString, extractClassName, getFilteredTrace, getFilteredTrace, getLoader, getPreference, getPreference, getPreferences, getTest, inVAJava, loadSuiteClass, processArguments, savePreferences, setLoading, setPreference, setPreferences, showStackRaw, truncate, useReloadingTestSuiteLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TckTestRunner

public TckTestRunner(javax.servlet.jsp.JspWriter writer)
The constructor inits the result map and sets the writer

Parameters:
writer -
Method Detail

startTest

public void startTest(junit.framework.Test test)
This method is called everytime a test is executed. The result object is "reset". the state is "reset" to its default value. The startTime is set.

Parameters:
test - The Test which will be executed

runFailed

protected void runFailed(java.lang.String message)
The test could not be started. This should not happen...

Parameters:
message - error message

endTest

public void endTest(junit.framework.Test test)
This method is called everytime a test is finished. it does not matter if the test was successful or not. The TestResult is added to the results list.

Parameters:
test - the current Test

testFailed

public void testFailed(int status,
                       junit.framework.Test test,
                       java.lang.Throwable t)
This method is called when a Test failed. The "error" code is passed:
  • - an error occured while testing
  • - the test failed And the Throwable object with the information why the test failed is passed as well.

    Parameters:
    status - "error" code
    test - current Test
    t - Throwable of error/failure

  • getResults

    public java.util.Map getResults()
    Returns all results

    Returns:
    all test results

    setLogString

    public void setLogString(java.lang.String logString)

    setInteractionString

    public void setInteractionString(java.lang.String interactionString)

    setNewTestString

    public void setNewTestString(java.lang.String newTestString)

    testStarted

    public void testStarted(java.lang.String testName)

    testEnded

    public void testEnded(java.lang.String testName)

    getNumberOfTests

    public int getNumberOfTests()

    resetNumberOfTests

    public void resetNumberOfTests()


    Copyright © -2005 . All Rights Reserved.