You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2007/02/12 08:04:11 UTC

svn commit: r506340 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java

Author: tomdz
Date: Sun Feb 11 23:04:10 2007
New Revision: 506340

URL: http://svn.apache.org/viewvc?view=rev&rev=506340
Log:
Fixed bugs in the test summary task

Modified:
    db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java

Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java?view=diff&rev=506340&r1=506339&r2=506340
==============================================================================
--- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java (original)
+++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java Sun Feb 11 23:04:10 2007
@@ -162,10 +162,14 @@
     		// we ignore the attribute name then
     		return ((Attribute)node).getValue();
     	}
-    	else
+    	else if (node != null)
     	{
     		return node.valueOf("@" + attrName);
     	}
+        else
+        {
+            return null;
+        }
     }
     
     /**
@@ -241,7 +245,7 @@
                 String  testSuiteName = testSuiteNode.attributeValue("name");
 
                 // since tests have failed, we add it to the summary
-                for (Iterator it = testSuiteNode.elementIterator("testcase"); it.hasNext();)
+                for (Iterator it = testSuiteNode.selectNodes("testcase[failure or error]").iterator(); it.hasNext();)
                 {
                     Element failedTestElement = (Element)it.next();
                     Element newTestElement    = summaryDoc.getRootElement().addElement("failedTest");