junitx.ddtunit
Class DDTTestResult

java.lang.Object
  extended by junit.framework.TestResult
      extended by junitx.ddtunit.DDTTestResult

public class DDTTestResult
extends junit.framework.TestResult

Extends class TestResultof JUnit
This class will contain extra results from test execution based on xml data testcases.

Author:
jg

Field Summary
protected  List<junit.framework.TestFailure> fMethodTestErrors
          Vector containing all errors caught during test execution
protected  List<junit.framework.TestFailure> fMethodTestFailures
          Vector containing all caught failures during test execution
protected  int fRunMethodTests
          Number of executed tests inside of a testmethod
 
Fields inherited from class junit.framework.TestResult
fErrors, fFailures, fListeners, fRunTests
 
Constructor Summary
DDTTestResult()
           
DDTTestResult(junit.framework.TestResult result)
          Instanciate DDTTestResult by using JUnit TestResult as base info.
 
Method Summary
 void addMethodTestError(junit.framework.Test test, String testName, Throwable throwable)
          Add error of a method test execution for later statistic
 void addMethodTestFailure(junit.framework.Test test, String testName, junit.framework.AssertionFailedError assertError)
          Add assertion failure of a method test execution for later statistic
 junit.framework.TestResult copyContent(junit.framework.TestResult result)
          DOCUMENT ME!
 void endMethodTest(IDDTTestCase test, String methodName)
          Notify about end of method test
 int methodTestErrorCount()
           
 int methodTestFailureCount()
           
 ListIterator<junit.framework.TestFailure> methodTestFailures()
           
protected  void run(junit.framework.TestCase test)
          Runs a TestCase.
 int runMethodTestCount()
           
 void runProtected(junit.framework.Test test, junit.framework.Protectable protectedRunner)
          Runs a TestCase.
 void startMethodTest(IDDTTestCase test, String methodName)
          Notify about start of method test
 
Methods inherited from class junit.framework.TestResult
addError, addFailure, addListener, endTest, errorCount, errors, failureCount, failures, removeListener, runCount, shouldStop, startTest, stop, wasSuccessful
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fMethodTestFailures

protected List<junit.framework.TestFailure> fMethodTestFailures
Vector containing all caught failures during test execution


fMethodTestErrors

protected List<junit.framework.TestFailure> fMethodTestErrors
Vector containing all errors caught during test execution


fRunMethodTests

protected int fRunMethodTests
Number of executed tests inside of a testmethod

Constructor Detail

DDTTestResult

public DDTTestResult()

DDTTestResult

public DDTTestResult(junit.framework.TestResult result)
              throws DDTException
Instanciate DDTTestResult by using JUnit TestResult as base info.

Parameters:
result - of JUnit TestResult
Throws:
DDTException
Method Detail

copyContent

public junit.framework.TestResult copyContent(junit.framework.TestResult result)
DOCUMENT ME!

Parameters:
result - DOCUMENT ME!
Returns:
DOCUMENT ME!

run

protected void run(junit.framework.TestCase test)
Runs a TestCase.

Overrides:
run in class junit.framework.TestResult
Parameters:
test - to run

runProtected

public void runProtected(junit.framework.Test test,
                         junit.framework.Protectable protectedRunner)
Runs a TestCase.

Overrides:
runProtected in class junit.framework.TestResult
Parameters:
test - to run
protectedRunner - executes testmethod and and throws Throwable if any error occures

addMethodTestError

public void addMethodTestError(junit.framework.Test test,
                               String testName,
                               Throwable throwable)
Add error of a method test execution for later statistic

Parameters:
test - to run
testName - of dataset actually processed in testmethod
throwable - caught during execution of test
See Also:
DDTTestListener.addMethodTestError(junit.framework.Test, java.lang.String, java.lang.Throwable)

addMethodTestFailure

public void addMethodTestFailure(junit.framework.Test test,
                                 String testName,
                                 junit.framework.AssertionFailedError assertError)
Add assertion failure of a method test execution for later statistic

Parameters:
test - to run
testName - of dataset actually processed in testmethod
assertError - caught during execution of test
See Also:
DDTTestListener.addMethodTestFailure(junit.framework.Test, java.lang.String, junit.framework.AssertionFailedError)

endMethodTest

public void endMethodTest(IDDTTestCase test,
                          String methodName)
Notify about end of method test

Parameters:
test - to run
methodName - of actually processed method
See Also:
junitx.ddtunit.DDTTestListener#endMethodTest(junitx.ddtunit.DDTTestCase, java.lang.String)

startMethodTest

public void startMethodTest(IDDTTestCase test,
                            String methodName)
Notify about start of method test

Parameters:
test - to run
methodName - of actually processed method
See Also:
junitx.ddtunit.DDTTestListener#startMethodTest(junitx.ddtunit.DDTTestCase, java.lang.String)

runMethodTestCount

public int runMethodTestCount()
Returns:
number of xml based tests run

methodTestFailureCount

public int methodTestFailureCount()
Returns:
number of method test failures were caught during execution

methodTestErrorCount

public int methodTestErrorCount()
Returns:
number of method test errors were caught during execution

methodTestFailures

public ListIterator<junit.framework.TestFailure> methodTestFailures()


Copyright © 2004-2011. All Rights Reserved.