   (try
     (let [opts (apply hash-map (map-indexed #(if (even? %1) (subs %2 1) %2) (rest args)))
           _ (println "running with arguments:" opts)
+          tests-file (first args)
           xml-report (or (opts "report")
-                         (str "target/" (str/replace (first args) #"\.csv" "-results.xml")))
-          results (-> args first tests-from (exec-tests opts) summarise-results)]
-      ((juxt #(junit-report xml-report %) print-test-results) results)
+                         (str "target/" (str/replace tests-file #"\.csv" "-results.xml")))
+          results (-> tests-file tests-from (exec-tests opts) summarise-results)]
+      ((juxt #(junit-report xml-report tests-file %) print-test-results) results)
       (System/exit (- (results :total 0) (results :success 0))))
     (finally
       (shutdown-agents))))

  (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

      (print (if (:success test) "\u001B[32m [v] " "\u001B[31m [x] "))
      (println (:test test) "\t" (or result :success) "\u001B[0m"))))

(defn junit-report [dest-file src-file {:keys [suites]}]
  (make-parents dest-file)
  (with-open [out (writer dest-file)]
    (indent (sexp-as-element
