db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r506340 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/TestSummaryCreatorTask.java
Date Mon, 12 Feb 2007 07:04:11 GMT
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");



Mime
View raw message