org.apache.fop.tools.anttasks
Class RunTest
Task
org.apache.fop.tools.anttasks.RunTest
public class RunTest
extends Task
Testing ant task.
This task is used to test FOP as a build target.
This uses the TestConverter (with weak code dependency)
to run the tests and check the results.
void | execute() - This creates the reference output, if required, then tests
the current build.
|
protected Map | runConverter(ClassLoader loader, String dest, String compDir) - Run the Converter.
|
protected void | runReference() - Run the tests for the reference jar file.
|
void | setBasedir(String str) - Sets the base directory.
|
void | setRefVersion(String str) - Sets the reference version.
|
void | setReference(String str) - Sets the reference directory.
|
void | setTestSuite(String str) - Sets the test suite name.
|
protected void | testNewBuild() - Test the current build.
|
execute
public void execute()
throws BuildException
This creates the reference output, if required, then tests
the current build.
runConverter
protected Map runConverter(ClassLoader loader,
String dest,
String compDir)
Run the Converter.
Runs the test converter using the specified class loader.
This loads the TestConverter using the class loader and
then runs the test suite for the current test suite
file in the base directory.
(Note class loader option provided to allow for different
fop.jar and other libraries to be activated.)
loader
- the class loader to use to run the tests withdest
- destination directorycompDir
- comparison directory
runReference
protected void runReference()
throws BuildException
Run the tests for the reference jar file.
This checks that the reference output has not already been
run and then checks the version of the reference jar against
the version required.
The reference output is then created.
setBasedir
public void setBasedir(String str)
Sets the base directory.
setRefVersion
public void setRefVersion(String str)
Sets the reference version.
setReference
public void setReference(String str)
Sets the reference directory.
str
- reference directory
setTestSuite
public void setTestSuite(String str)
Sets the test suite name.
str
- name of the test suite
testNewBuild
protected void testNewBuild()
Test the current build.
This uses the current jar file (in build/fop.jar) to run the
tests with.
The output is then compared with the reference output.
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.