               (for [{:keys [name tests total failure error skipped]} suites]
                 [:testsuite {:name name :errors error :tests total :failures failure}
                  (for [test tests]
-                   [:testcase {:name (:test test) :time 0}
+                   [:testcase {:name (:test test) :time (:time test)}
                     (condp test nil
                       :error :>> #(vector :error {:message %})
                       :failure :>> #(vector :failure {:message %} (:resp test))

  (let [test (if (:error test) test (prepare-test test @opts))]
    (if (:error test) test
        (let [resp (mk-request test)
              delta (verify-response resp test)]
          (if delta
            (assoc test :failure delta :resp resp)
            (do

    ldiff))

(defn coerce-payload [payload content-type]
  (try (condp re-find (or content-type "")
         #"xml" (parse-str payload)
         #"text" payload
         (json->clj payload))
       (catch Exception e
         (log/error e "failed coercing payload") payload)))

(defn mk-request [{:keys[test url verb headers params payload] :as  req}]
  (log/info "executing" test ": " verb " " url)
  (-> (try
        (client/request {:url url
                         :method (keyword (str/lower-case verb))
                         ;; :content-type :json
                         :headers headers
                         :query-params params
                         :body (if (string? payload) payload
                                   (and (seq payload) (json/generate-string payload)))
                         :insecure? true})
        (catch ExceptionInfo e
          (.getData e)))
      (#(update % :body coerce-payload (get-in % [:headers "Content-Type"])))))

(defn extract-data [{:keys [status body headers] :as resp} extractions]
  (into {} (for [[name path] extractions]
