testing

Testing tools, testing philosophy & methodology...
plexus 2019-11-08T08:49:36.016200Z

if you want to do custom processing on the timing information you can gather them up in a post-run hook

plexus 2019-11-08T09:10:56.016400Z

(ns kaocha-demo.hooks
  (:require [kaocha.testable :as testable]
            [kaocha.hierarchy :as hierarchy]))

(def post-run [test-result]
  (spit "timing.edn"
        (pr-str
         (into {}
               (comp (filter hierarchy/leaf?)
                     (map (juxt ::testable/id :kaocha.plugin.profiling/duration)))
               (testable/test-seq test-result))))
  test-result)

tws 2019-11-08T15:40:09.016800Z

perfect! thanks both