Author: sichen
Date: Wed Nov 14 11:55:41 2007
New Revision: 595025
URL:
http://svn.apache.org/viewvc?rev=595025&view=revLog:
Fix problem in unit test framework where the stacktrace is not printed, thus making it very hard to find the source of a test failure due to an Exception.
Modified:
ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestRunContainer.java
Modified: ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestRunContainer.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestRunContainer.java?rev=595025&r1=595024&r2=595025&view=diff==============================================================================
--- ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestRunContainer.java (original)
+++ ofbiz/trunk/framework/testtools/src/org/ofbiz/testtools/TestRunContainer.java Wed Nov 14 11:55:41 2007
@@ -144,7 +144,11 @@
Debug.log("None");
} else {
while (err.hasMoreElements()) {
- Debug.log("--> " + err.nextElement(), module);
+ Object error = err.nextElement();
+ Debug.log("--> " + error, module);
+ if (error instanceof TestFailure) {
+ Debug.log(((TestFailure) error).trace());
+ }
}
}
Debug.log("[JUNIT] ------------------------------------------------------------------ [JUNIT]", module);