Class EUnitTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.epsilon.workflow.tasks.EpsilonTask
org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask
org.eclipse.epsilon.workflow.tasks.EUnitTask
- All Implemented Interfaces:
Cloneable
,EUnitTestListener
Ant task for running EUnit test suites.
- Version:
- 1.0
- Author:
- Antonio Garcia-Dominguez
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
class
Class for a nested element which allows to specify a list of custom comparators, which take precedence over any registered OSGi extensions.class
class
Class for a nested element which simply contains tasks.Nested classes/interfaces inherited from class org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask
ExecutableModuleTask.ModuleProperty
-
Field Summary
Fields inherited from class org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask
assertions, code, debugPort, exportsVariableNestedElements, fine, modelNestedElements, module, moduleImplementationClass, parameterNestedElements, result, setBeans, src, uri, usesVariableNestedElements
Fields inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
failOnErrors, failOnWarnings, profile
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
Fields inherited from interface org.eclipse.epsilon.eunit.EUnitTestListener
EXTENSION_POINT_ID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCase
(EUnitModule module, EUnitTest test) Notification sent after running a test case.void
beforeCase
(EUnitModule module, EUnitTest test) Notification sent before running a test case.protected void
examine()
Returns the package in which all tests will be contained.getToDir()
Returns the destination directory for the JUnit-like report.protected void
boolean
isReport()
Returnstrue
if a XML report compatible with the <junit> Ant task should be generated.boolean
Returnstrue
if any detected model differences will be saved to a file, named after the test suite package, test suite class, and test name.protected void
saveModelDeltas
(EUnitModule module, EUnitTest test, PrintStream err, Throwable testException) void
setPackage
(String packageName) Changes the package in which all tests will be contained.void
setReport
(boolean generate) Changes whether an XML report compatible with the <junit> Ant task should be generated.void
setSaveModelDeltas
(boolean save) Changes whether model differences will be saved to a file (when set totrue
) or not (when set tofalse
).void
Changes the destination directory for the JUnit-like report.Methods inherited from class org.eclipse.epsilon.workflow.tasks.ExecutableModuleTask
addText, addVariables, configureModule, createAlternativeModule, createExports, createModel, createModule, createModuleProperty, createParameter, createUses, executeImpl, exportVariable, getDebugPort, getModuleImplementation, getSrc, getTaskName, getUri, isAssertions, isDebug, isFine, isGUI, isSetBeans, populateModelRepository, setAssertions, setDebug, setDebugPort, setFine, setGUI, setModuleImplementation, setSetBeans, setSrc, setUri, useResults, useVariable
Methods inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
execute, fail, getActiveTransactions, getBaseDir, getExtendedProperties, getModelRepository, getProjectRepository, getProjectStackFrame, isFailOnErrors, isFailOnWarnings, isProfile, setFailOnErrors, setFailOnWarnings, setProfile, setProjectRepository, usesSharedModelRepository, warn
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
EUnitTask
public EUnitTask()
-
-
Method Details
-
initialize
- Specified by:
initialize
in classExecutableModuleTask
- Throws:
Exception
-
examine
- Specified by:
examine
in classExecutableModuleTask
- Throws:
Exception
-
createDefaultModule
- Specified by:
createDefaultModule
in classExecutableModuleTask
-
beforeCase
Description copied from interface:EUnitTestListener
Notification sent before running a test case.- Specified by:
beforeCase
in interfaceEUnitTestListener
- Parameters:
module
- EUnit module under execution.test
- Description of the test case: its result has not been set yet.
-
afterCase
Description copied from interface:EUnitTestListener
Notification sent after running a test case.- Specified by:
afterCase
in interfaceEUnitTestListener
- Parameters:
module
- EUnit module under execution.test
- Test case, with its result set.
-
saveModelDeltas
protected void saveModelDeltas(EUnitModule module, EUnitTest test, PrintStream err, Throwable testException) -
createModelTasks
-
createComparators
-
getToDir
Returns the destination directory for the JUnit-like report. By default, it is the base directory of the Ant project. -
setToDir
Changes the destination directory for the JUnit-like report. SeegetToDir()
for the default value. -
getPackage
Returns the package in which all tests will be contained. By default, it is set toEUnitModule.DEFAULT_PACKAGE
. -
setPackage
Changes the package in which all tests will be contained. Empty or null arguments are ignored. -
isReport
public boolean isReport()Returnstrue
if a XML report compatible with the <junit> Ant task should be generated. -
setReport
public void setReport(boolean generate) Changes whether an XML report compatible with the <junit> Ant task should be generated. By default, it will be generated.- Parameters:
generate
- Iftrue
, the XML report will be generated. Otherwise, it will not be generated.
-
isSaveModelDeltas
public boolean isSaveModelDeltas()Returnstrue
if any detected model differences will be saved to a file, named after the test suite package, test suite class, and test name. The extension will depend on the comparator being used. -
setSaveModelDeltas
public void setSaveModelDeltas(boolean save) Changes whether model differences will be saved to a file (when set totrue
) or not (when set tofalse
).
-