       (clojure.pprint/pprint testsuite)
       (throw t))))
 
+(def default-failure-report
+  {:errors 0
+   :failures 0
+   :tests 0
+   :skipped 0})
+
+(defn merge-default [m]
+  (merge default-failure-report m))
+
 (defn find-failures [dir]
   (when dir
     (->> dir

            [clojure.string :as str]
            [net.cgrand.enlive-html :as x]))

(defn testcase-meta [xml]
  (-> xml
      (x/select [[(x/attr= :errors)

                  (x/attr= :tests)]])
      first
      :attrs
      (rename-keys {:skip :skipped})
      (maybe-update [:errors :failures :tests :skipped]
                    #(Integer/parseInt %))))

(defn content-text [xml]
  (apply str (map x/text xml)))
