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 java.lang.String |
lastFail
The name of the last test to fail
|
protected java.lang.String |
lastPass
The name of the last test to pass
|
protected java.lang.String |
testInProgress
The name of the test that is currently executing
|
static java.lang.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 java.lang.String |
getClassName(junit.framework.Test test)
Returns the name of the given test's class
|
java.util.Set |
getTestClasses()
Returns an immutable
Set of the names of
TestCase classes to be run by this task. |
void |
logHangResult(ClientRecord client,
java.lang.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,
java.lang.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 java.lang.String XML_REPORTS_DIR
protected java.lang.String testInProgress
protected java.lang.String lastPass
protected java.lang.String lastFail
public static void foolHydra()
public TestTaskResult execute()
TestSuite if Ant is not available.protected static java.lang.String getClassName(junit.framework.Test test)
protected static void reportFailure(junit.framework.Test test,
java.lang.String message)
public void logHangResult(ClientRecord client, java.lang.String msg)
logHangResult in class TestTaskpublic java.util.Set getTestClasses()
Set of the names of
TestCase classes to be run by this task.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.