Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cactus.internal.server.runner
Class WebappTestRunner

    java.lang.Object
      junit.runner.BaseTestRunner
          org.apache.cactus.internal.server.runner.WebappTestRunner

All Implemented Interfaces:
  junit.framework.TestListener

public class WebappTestRunner
extends junit.runner.BaseTestRunner

JUnit Test Runner that can load test cases that are in the classpath of a webapp. This test runner is supposed to be executed from within the webapp.

Version:
  $Id: WebappTestRunner.java 238991 2004-05-22 11:34:50Z vmassol $

Field Summary

Fields inherited from class junit.runner.BaseTestRunner
`SUITE_METHODNAME`

Constructor Summary
`WebappTestRunner()`

Method Summary
`void` | `addError(junit.framework.Test theTest, java.lang.Throwable theThrowable)`
`void` | `addFailure(junit.framework.Test theTest, junit.framework.AssertionFailedError theAssertionFailedError)`
`void` | `endTest(junit.framework.Test theTest)`
`java.lang.String` | `getErrorMessage()`
`junit.runner.TestSuiteLoader` | `getLoader()` Overridden from BaseTestRunner in order to use either the context class loader or the webapp one.
`protected void` | `runFailed(java.lang.String theMessage)` Event called by the base test runner when it fails to load a test suite.
`void` | `startTest(junit.framework.Test theTest)`
`void` | `testEnded(java.lang.String theTestName)` Event called by the base test runner when the test ends.
`void` | `testFailed(int theStatus, junit.framework.Test theTest, java.lang.Throwable theThrowable)` Event called by the base test runner when the test fails.
`void` | `testStarted(java.lang.String theTestName)` Event called by the base test runner when the test starts.

Methods inherited from class junit.runner.BaseTestRunner
`clearStatus, elapsedTimeAsString, extractClassName, getFilteredTrace, getFilteredTrace, 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

### WebappTestRunner

    public WebappTestRunner()

Method Detail

### getLoader

    public junit.runner.TestSuiteLoader getLoader()

  Overridden from BaseTestRunner in order to use either the context class loader or the webapp one.

  Returns:
    a loader that loads classes using the context class loader or the webapp class loader.

### runFailed

    protected void runFailed(java.lang.String theMessage)

  Event called by the base test runner when it fails to load a test suite.

  Parameters:
    `theMessage` - the message of the failure

### getErrorMessage

    public java.lang.String getErrorMessage()

  Returns:
    the error message provided by `BaseTestRunner` if it failed to load the test suite

### testEnded

    public void testEnded(java.lang.String theTestName)

  Event called by the base test runner when the test ends.

  Parameters:
    `theTestName` - the test case name

### testFailed

    public void testFailed(int theStatus,
                           junit.framework.Test theTest,
                           java.lang.Throwable theThrowable)

  Event called by the base test runner when the test fails.

  Parameters:
    `theStatus` - the status code of the error
    `theTest` - the test object that failed
    `theThrowable` - the exception that was thrown

### testStarted

    public void testStarted(java.lang.String theTestName)

  Event called by the base test runner when the test starts.

  Parameters:
    `theTestName` - the test case name

### addError

    public void addError(junit.framework.Test theTest,
                         java.lang.Throwable theThrowable)

  See Also:
    `BaseTestRunner.addError(Test, Throwable)`

### addFailure

    public void addFailure(junit.framework.Test theTest,
                           junit.framework.AssertionFailedError theAssertionFailedError)

  See Also:
    `BaseTestRunner.addFailure(Test, AssertionFailedError)`

### endTest

    public void endTest(junit.framework.Test theTest)

  See Also:
    `BaseTestRunner.endTest(Test)`

### startTest

    public void startTest(junit.framework.Test theTest)

  See Also:
    `BaseTestRunner.startTest(Test)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.