public class JUnit4RunListener extends RunListener
Modifier and Type | Field and Description |
---|---|
protected RunListener |
reporter |
Constructor and Description |
---|
JUnit4RunListener(RunListener reporter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected SimpleReportEntry |
createReportEntry(Description description) |
protected StackTraceWriter |
createStackTraceWriter(Failure failure) |
static String |
extractClassName(Description description) |
static String |
extractMethodName(Description description) |
String |
getClassName(Description description) |
static void |
rethrowAnyTestMechanismFailures(Result run) |
void |
testAssumptionFailure(Failure failure) |
void |
testFailure(Failure failure)
Called when a specific test has failed.
|
void |
testFinished(Description description)
Called after a specific test has finished.
|
void |
testIgnored(Description description)
Called when a specific test has been skipped (for whatever reason).
|
void |
testStarted(Description description)
Called when a specific test has started.
|
testRunFinished, testRunStarted
protected final RunListener reporter
public JUnit4RunListener(RunListener reporter)
reporter
- the reporter to log testing events topublic void testIgnored(Description description) throws Exception
testIgnored
in class RunListener
Exception
RunListener.testIgnored(org.junit.runner.Description)
public void testStarted(Description description) throws Exception
testStarted
in class RunListener
Exception
RunListener.testStarted(org.junit.runner.Description)
public void testFailure(Failure failure) throws Exception
testFailure
in class RunListener
Exception
RunListener.testFailure(org.junit.runner.notification.Failure)
protected StackTraceWriter createStackTraceWriter(Failure failure)
public void testAssumptionFailure(Failure failure)
public void testFinished(Description description) throws Exception
testFinished
in class RunListener
Exception
RunListener.testFinished(org.junit.runner.Description)
protected SimpleReportEntry createReportEntry(Description description)
public String getClassName(Description description)
public static String extractClassName(Description description)
public static String extractMethodName(Description description)
public static void rethrowAnyTestMechanismFailures(Result run) throws TestSetFailedException
TestSetFailedException
Copyright © 2004–2014 The Apache Software Foundation. All rights reserved.