|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.app.test.TestConverter
public class TestConverter
TestConverter is used to process a set of tests specified in a testsuite. This class retrieves the data in the testsuite and uses FOray to convert the xml and xsl file into either an xml representation of the area tree or a pdf document. The area tree can be used for automatic comparisons between different versions of FOray or the pdf can be view for manual checking and pdf rendering.
Constructor Summary | |
---|---|
TestConverter()
Constructor. |
Method Summary | |
---|---|
protected Node |
locateResult(Node testcase,
String id)
Find and return the result node. |
static void |
main(String[] args)
This main method can be used to run the test converter from the command line. |
protected void |
runTest(Node testcase,
Node test)
Run a particular test. |
protected void |
runTestCase(Node tcase)
Run a test case. |
Map<String,Boolean> |
runTests(String fname,
String dest)
Run the Tests. |
void |
setBaseDir(String str)
Sets the base directory to be used. |
void |
setFailOnly(boolean fail)
Sets the fail only flag. |
void |
setOutputPDF(boolean pdf)
Sets the flag indicating whether the output should be to PDF or not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestConverter()
Method Detail |
---|
public static void main(String[] args)
args
- The command line options, which are:
-b to set the base directory for where the testsuite and associated
files are
-failOnly to process only the tests which are specified as fail in the
test results
-pdf to output the result as pdfpublic void setOutputPDF(boolean pdf)
pdf
- The new flag value.public void setFailOnly(boolean fail)
fail
- The new flag value.public void setBaseDir(String str)
str
- The new base directory.public Map<String,Boolean> runTests(String fname, String dest) throws FOrayException
fname
- The name of the file containing the tests to be run.dest
- The name of the directory (relative to the base directory)
into which the output should be placed.
FOrayException
- For errors processing the tests.protected void runTestCase(Node tcase) throws FOrayException
tcase
- The testcase node.
FOrayException
- For errors processing the test.protected void runTest(Node testcase, Node test) throws FOrayException
testcase
- The test case node.test
- The test node.
FOrayException
- For errors processing the test.protected Node locateResult(Node testcase, String id)
testcase
- The testcase node being tested.id
- The id of the result node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |