Package org.fest.swing.junit.ant
Class ReportTransformer
java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
org.fest.swing.junit.ant.ReportTransformer
public class ReportTransformer
extends org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
Transforms a JUnit XML report. The default transformation generates an HTML report in either framed or non-framed
style.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer.Format
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.tools.ant.types.Path
private static int
Used to ensure the uniqueness of a property.private static final org.apache.tools.ant.util.FileUtils
Instance of a utility class to use for file operations.private final List<org.apache.tools.ant.taskdefs.XSLTProcess.Param>
The parameters that will be sent to the XSL transformation.private static final String
Fields inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
dbfactory, document, format, FRAMES, NOFRAMES, styleDir, task, toDir
-
Constructor Summary
ConstructorsConstructorDescriptionReportTransformer
(org.apache.tools.ant.Task task) Creates a new
.ReportTransformer
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.tools.ant.types.Path
Creates the current classpath.private void
createNewParams
(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) private void
createOutputDirParam
(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) org.apache.tools.ant.taskdefs.XSLTProcess.Param
Create an instance of an XSL parameter for configuration by Ant.private void
protected org.apache.tools.ant.types.Resource
Access the stylesheet to be used as a resource.private File
outputFile
(org.apache.tools.ant.taskdefs.TempFile tempFileTask) void
setClasspath
(org.apache.tools.ant.types.Path classpath) Sets an additional classpath.void
setClasspathRef
(org.apache.tools.ant.types.Reference r) Sets a reference to a classpath.private void
setUpTempFileTask
(org.apache.tools.ant.taskdefs.TempFile tempFileTask, String tempFileProperty) private org.apache.tools.ant.taskdefs.TempFile
void
Performs the XSLT transformation to generate the HTML report.private org.apache.tools.ant.taskdefs.XSLTProcess
xsltTask()
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
checkOptions, configureForRedirectExtension, createFactory, getDocumentBuilderFactory, getStylesheetSystemId, setExtension, setFormat, setStyledir, setTodir, setXmlDocument, setXmlfile
-
Field Details
-
XSL_FILE_PATH
- See Also:
-
classpath
private org.apache.tools.ant.types.Path classpath -
params
The parameters that will be sent to the XSL transformation. -
FILE_UTILS
private static final org.apache.tools.ant.util.FileUtils FILE_UTILSInstance of a utility class to use for file operations. -
counter
private static int counterUsed to ensure the uniqueness of a property.
-
-
Constructor Details
-
ReportTransformer
public ReportTransformer(org.apache.tools.ant.Task task) Creates a new
.ReportTransformer
- Parameters:
task
- task delegating to this class.
-
-
Method Details
-
createParam
public org.apache.tools.ant.taskdefs.XSLTProcess.Param createParam()Create an instance of an XSL parameter for configuration by Ant.- Overrides:
createParam
in classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
- Returns:
- an instance of the
Param
class to be configured.
-
transform
public void transform() throws org.apache.tools.ant.BuildExceptionPerforms the XSLT transformation to generate the HTML report.- Overrides:
transform
in classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
- Throws:
org.apache.tools.ant.BuildException
- thrown if something goes wrong with the transformation.
-
xsltTask
private org.apache.tools.ant.taskdefs.XSLTProcess xsltTask() -
getStylesheet
protected org.apache.tools.ant.types.Resource getStylesheet()Access the stylesheet to be used as a resource.- Overrides:
getStylesheet
in classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
- Returns:
- stylesheet as a resource
-
tempFileTask
private org.apache.tools.ant.taskdefs.TempFile tempFileTask() -
outputFile
-
setUpTempFileTask
private void setUpTempFileTask(org.apache.tools.ant.taskdefs.TempFile tempFileTask, String tempFileProperty) -
createNewParams
private void createNewParams(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) -
createOutputDirParam
private void createOutputDirParam(org.apache.tools.ant.taskdefs.XSLTProcess xsltTask) -
delete
-
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path classpath) Sets an additional classpath.- Parameters:
classpath
- the additional classpath to append to the current one.
-
setClasspathRef
public void setClasspathRef(org.apache.tools.ant.types.Reference r) Sets a reference to a classpath.- Parameters:
r
- the reference to set.
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()Creates the current classpath.- Overrides:
createClasspath
in classorg.apache.tools.ant.taskdefs.optional.junit.AggregateTransformer
- Returns:
- the created classpath.
-