public class Funtest extends Task
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_EXCEPTION
Application exception : "Application Exception"
|
static String |
APPLICATION_FORCIBLY_SHUT_DOWN
"Application forcibly shut down"
|
static String |
SHUTDOWN_INTERRUPTED
"Shutdown interrupted"
|
static String |
SKIPPING_TESTS
"Condition failed -skipping tests"
|
static String |
TEARDOWN_EXCEPTION
Teardown exception : "Teardown Exception"
|
static String |
WARN_OVERRIDING
"Overriding previous definition of "
|
Constructor and Description |
---|
Funtest() |
Modifier and Type | Method and Description |
---|---|
void |
addApplication(Sequential sequence)
Add an application.
|
void |
addBlock(BlockFor sequence)
Add a block.
|
void |
addReporting(Sequential sequence)
set reporting sequence of tasks.
|
void |
addSetup(Sequential sequence)
Add a setup sequence.
|
void |
addTeardown(Sequential sequence)
set teardown sequence of tasks.
|
void |
addTests(Sequential sequence)
add tests.
|
ConditionBase |
createCondition()
Add a condition element.
|
void |
execute()
Run the functional test sequence.
|
BuildException |
getApplicationException()
Get the application exception.
|
BuildException |
getTaskException()
Get the task exception.
|
BuildException |
getTeardownException()
Get the teardown exception.
|
BuildException |
getTestException()
Get the test exception.
|
protected void |
ignoringThrowable(String type,
Throwable thrown)
log that we are ignoring something rather than rethrowing it.
|
protected void |
processExceptions()
Now faults are analysed.
|
void |
setFailOnTeardownErrors(boolean failOnTeardownErrors)
Set the failOnTeardownErrors attribute.
|
void |
setFailureMessage(String failureMessage)
Set the failureMessage attribute.
|
void |
setFailureProperty(String failureProperty)
Set the failureProperty attribute.
|
void |
setShutdownTime(long shutdownTime)
Set the shutdownTime attribute.
|
void |
setShutdownUnit(WaitFor.Unit unit)
Set the shutdownunit attribute.
|
void |
setTimeout(long timeout)
Set the timeout attribute.
|
void |
setTimeoutUnit(WaitFor.Unit unit)
Set the timeoutunit attribute.
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
public static final String APPLICATION_EXCEPTION
public static final String APPLICATION_FORCIBLY_SHUT_DOWN
public static final String SHUTDOWN_INTERRUPTED
public static final String SKIPPING_TESTS
public static final String TEARDOWN_EXCEPTION
public static final String WARN_OVERRIDING
public void addApplication(Sequential sequence)
sequence
- the application to add.public void addBlock(BlockFor sequence)
sequence
- the block for to add.public void addReporting(Sequential sequence)
sequence
- a reporting sequence to use.public void addSetup(Sequential sequence)
sequence
- the setup sequence to add.public void addTeardown(Sequential sequence)
sequence
- a teardown sequence to use.public void addTests(Sequential sequence)
sequence
- a sequence to add.public ConditionBase createCondition()
ConditionBase
.public void execute() throws BuildException
This is a fairly complex workflow -what is going on is that we try to clean up no matter how the run ended, and to retain the innermost exception that got thrown during cleanup. That is, if teardown fails after the tests themselves failed, it is the test failing that is more important.
execute
in class Task
BuildException
- if something was caught during the run or teardown.public BuildException getApplicationException()
public BuildException getTaskException()
public BuildException getTeardownException()
public BuildException getTestException()
protected void ignoringThrowable(String type, Throwable thrown)
type
- name of exceptionthrown
- what was thrownprotected void processExceptions()
The priority is
public void setFailOnTeardownErrors(boolean failOnTeardownErrors)
failOnTeardownErrors
- the value to use.public void setFailureMessage(String failureMessage)
failureMessage
- the value to use.public void setFailureProperty(String failureProperty)
failureProperty
- the value to use.public void setShutdownTime(long shutdownTime)
shutdownTime
- the value to use.public void setShutdownUnit(WaitFor.Unit unit)
unit
- the value to use.public void setTimeout(long timeout)
timeout
- the value to use.public void setTimeoutUnit(WaitFor.Unit unit)
unit
- the value to use.