UTF-X, Unit Testing Framework - Xslt

utfx.printers
Class XMLResultPrinter

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by utfx.printers.ResultPrinter
                  extended by utfx.printers.XMLResultPrinter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable, junit.framework.TestListener

public class XMLResultPrinter
extends ResultPrinter

XML Result Printer.

Copyright © 2004 - University of Southern Queensland.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

$Source: /cvs/utf-x/framework/src/java/utfx/printers/XMLResultPrinter.java,v $

Version:
$Revision: 1.3.2.2 $ $Date: 2006/08/24 04:29:22 $ $Name: release_0_0_8_alpha $
Author:
Jacek Radajewski

Field Summary
 
Fields inherited from class utfx.printers.ResultPrinter
indentString, log, suiteDepth, testCaseCount
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
XMLResultPrinter(java.io.OutputStream os)
          Create a new XML result printer.
 
Method Summary
 void addError(junit.framework.Test test, java.lang.Throwable t)
          Nothing to do here.
 void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
          Nothing to do here.
 void close()
          This method is called after all result printing has been completed.
 void endTestCase(junit.framework.TestCase testCase)
          End of a test case.
 void endTestSuite(junit.framework.TestSuite suite)
          End of a test suite.
 void printErrors(junit.framework.TestResult result)
          Print the errors.
 void printFailures(junit.framework.TestResult result)
          Print a list of tests that failed.
 void printFooter(junit.framework.TestResult result)
          End of the regression test.
 void printHeader(junit.framework.TestResult result)
          Print summary header.
 void printSummary(junit.framework.TestResult result)
          Print the result summary.
 void start()
          Start of the regression test.
 void startTestCase(junit.framework.TestCase testCase)
          Start of a test case.
 void startTestSuite(junit.framework.TestSuite suite)
          Start of a test suite.
 
Methods inherited from class utfx.printers.ResultPrinter
endTest, getIndent, printElapsedTimeMillis, printIndent, setIndentString, startTest
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLResultPrinter

public XMLResultPrinter(java.io.OutputStream os)
Create a new XML result printer.

Method Detail

start

public void start()
Start of the regression test.

Overrides:
start in class ResultPrinter

close

public void close()
This method is called after all result printing has been completed. It flushes and closes the PrintStream.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.PrintStream

printSummary

public void printSummary(junit.framework.TestResult result)
Print the result summary. This method should be called at the end of a test run to produce a regression test report.

Overrides:
printSummary in class ResultPrinter
Parameters:
result - test result

printHeader

public void printHeader(junit.framework.TestResult result)
Print summary header. The summary contains the following information: run time, run count, error count and failure count.

Specified by:
printHeader in class ResultPrinter

printFooter

public void printFooter(junit.framework.TestResult result)
End of the regression test.

Specified by:
printFooter in class ResultPrinter

printFailures

public void printFailures(junit.framework.TestResult result)
Print a list of tests that failed. If no tests failed then do not print anything.

Specified by:
printFailures in class ResultPrinter
Parameters:
result - result of the test

printErrors

public void printErrors(junit.framework.TestResult result)
Print the errors. If no tests failed then do not print anything.

Specified by:
printErrors in class ResultPrinter
Parameters:
result - result of the test

addError

public void addError(junit.framework.Test test,
                     java.lang.Throwable t)
Nothing to do here. Generate report after all tests complete


addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
Nothing to do here. Generate report after all tests complete


startTestCase

public void startTestCase(junit.framework.TestCase testCase)
Description copied from class: ResultPrinter
Start of a test case.

Specified by:
startTestCase in class ResultPrinter
Parameters:
testCase - the TestSuite we are entering.
See Also:
TestListener.startTest(Test)

endTestCase

public void endTestCase(junit.framework.TestCase testCase)
Description copied from class: ResultPrinter
End of a test case.

Specified by:
endTestCase in class ResultPrinter
See Also:
TestListener.endTest(Test)

startTestSuite

public void startTestSuite(junit.framework.TestSuite suite)
Start of a test suite.

Specified by:
startTestSuite in class ResultPrinter
Parameters:
suite - the TestSuite we are entering.

endTestSuite

public void endTestSuite(junit.framework.TestSuite suite)
End of a test suite.

Specified by:
endTestSuite in class ResultPrinter
Parameters:
suite - the test suite we are leaving

UTF-X, Unit Testing Framework - Xslt