kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
plexus 2020-12-02T06:50:34.180200Z

Are you on the latest version? Using short names for built-in plugins is supposed to work.

2020-12-02T15:06:08.181300Z

@plexus I tried a few more attempts to retry failed tests (and moved it to a different project entirely), but I can't find a way to actually make it work properly https://github.com/AndreaCrotti/kaocha-retry/blob/main/src/kaocha/plugin/retry.clj

2020-12-02T15:06:27.182100Z

the retrying in general happens but then the reporting is still messed up

2020-12-02T15:07:54.183400Z

maybe I just have to do it outside of kaocha like it was currently done with lein test, recording the failed tests and re-running them

2020-12-02T15:08:52.184100Z

starting to suspect that with a plugin I won't really get it working

plexus 2020-12-02T15:09:55.184500Z

I'm pretty sure you can do this with a plugin.

plexus 2020-12-02T15:10:47.184900Z

rebind the reporter in wrap-run to capture events until you know if you want a test to pass or fail

plexus 2020-12-02T15:11:35.185900Z

(with-redefs [t/report (fn [e] (swap! recorded-events conj e))]
  (apply run args))

plexus 2020-12-02T15:11:54.186200Z

then replay them for the final run of a test

plexus 2020-12-02T15:12:07.186600Z

(run! t/report @recorded-events)

2020-12-02T15:12:32.187200Z

ah nice didn't think about that, with-redefsis a bit o a nuclear option though

2020-12-02T15:12:43.187700Z

but if there is no other way it's fine I guess

plexus 2020-12-02T15:12:59.188200Z

but make sure your special handling in wrap-run only kicks in for leaf tests

plexus 2020-12-02T15:13:13.188700Z

t/report is meant to be rebound like that, that's what kaocha also does

2020-12-02T15:13:32.189200Z

ah ok cool, and yeah I saw the issue with leafs and non leafs tests

2020-12-02T15:13:43.189600Z

ok thanks I can try that then

plexus 2020-12-02T15:14:14.190Z

👍