public class JUnitTestTask extends TestTask
JUnitTestTask is a TestTask that
executes a number of JUnit TestCases.DistributedTestCase,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected String |
lastFail
The name of the last test to fail
|
protected String |
lastPass
The name of the last test to pass
|
protected String |
testInProgress
The name of the test that is currently executing
|
static String |
XML_REPORTS_DIR
The directory to write xml reports to
|
ALWAYS, CLOSETASK, DEFAULT_RUN_MODE, DYNAMIC, DYNAMICCLOSETASK, DYNAMICINITTASK, ENDTASK, INITTASK, ONCE, STARTTASK, TASK, UNITTEST| Constructor and Description |
|---|
JUnitTestTask()
Creates a new
JUnitTestTask |
| Modifier and Type | Method and Description |
|---|---|
TestTaskResult |
execute()
Executes the JUnit tests using Ant's execution harness, or a
TestSuite if Ant is not available. |
static void |
foolHydra()
This method is the "selector" of this task.
|
protected static String |
getClassName(junit.framework.Test test)
Returns the name of the given test's class
|
Set |
getTestClasses()
Returns an immutable
Set of the names of
TestCase classes to be run by this task. |
void |
logHangResult(ClientRecord client,
String msg)
In addition to doing all of the usual logging when Hydra detects
that a test has hung, also write a file with a special name in
the DUnit "failures" directory.
|
protected static void |
reportFailure(junit.framework.Test test,
String message)
Writes a failure message to a file in the "failures" directory
|
acceptsStopSchedulingOrder, acceptsStopSchedulingTaskOnClientOrder, addElapsedTime, addThreadGroup, addThreadGroupName, batch, clone, decrementNumTimesInUse, getClientNames, getElapsedTimes, getEndInterval, getMaxThreads, getMaxTimesToRun, getNumTimesInUse, getNumTimesRun, getReceiver, getRunMode, getRunModeString, getSelector, getStartInterval, getTaskAttributes, getTaskIndex, getTaskThreadGroupId, getTaskType, getTaskTypeString, getThreadGroupNames, getThreadGroups, getTotalThreads, getWeight, incrementNumTimesInUse, incrementNumTimesRun, logHangResult, logTaskResult, logUnitTestResult, receivedAllStopSchedulingTaskOnClientOrders, receivedStopSchedulingTaskOnClientOrder, receivedStopSchedulingTaskOnClientOrder, receiveStopSchedulingTaskOnClientOrder, satisfiesEndInterval, satisfiesStartInterval, sequential, setBatch, setClientNames, setEndInterval, setEndTimes, setMaxThreads, setMaxTimesToRun, setNumClients, setReceiver, setRunMode, setSelector, setSequential, setStartInterval, setStartTimes, setTaskAttribute, setTaskIndex, setTaskType, setThreadGroupNames, setWeight, toShortString, toSortedMap, toString, updateEndTimes, updateStartTimes, usesThreadGrouppublic static final String XML_REPORTS_DIR
protected String testInProgress
protected String lastPass
protected String lastFail
public static void foolHydra()
public TestTaskResult execute()
TestSuite if Ant is not available.protected static String getClassName(junit.framework.Test test)
protected static void reportFailure(junit.framework.Test test,
String message)
public void logHangResult(ClientRecord client, String msg)
logHangResult in class TestTaskpublic Set getTestClasses()
Set of the names of
TestCase classes to be run by this task.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.