kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
2020-12-07T10:04:41.242200Z

Hi. I have a question wrt. the reloading/watch feature: is it possible to run a function before refresh, like you would do in a manual refresh?

plexus 2020-12-07T10:07:40.242600Z

what's the use case exactly?

2020-12-07T10:37:38.243100Z

another question about the kaocha-retry plugin, I was wondering how to report it in a usable way

2020-12-07T10:38:03.244Z

one idea would be to add something to the counters, maybe the actual map with test-id->number-of-failures

2020-12-07T10:38:24.244600Z

would that be a good thing or that map of counters should not be modified?

2020-12-07T10:46:45.245700Z

also related to the hierarchy question, is there anything to navigate in the hierarchy and get from a leaf testable to the group (like :unit for example) where the settings would be defined?

plexus 2020-12-07T11:00:32.249800Z

@andrea.crotti some feedback on your code - get rid of those top level atoms, you should be able to stick them in the test plan / testable - for the configuration, I would propagate (copy) from each testable to its children. So you can set it at the top level config, or at a test suite. Either way it'll get copied to the leaves so you can just check it there. - Might also be really useful to allow setting these from metadata, so you can mark specific flaky tests. (deftest ^{:andreacrotti.kaocha-retry/max-retries 5} my-flaky-test) - For reporting I would use post-summary and print out a separate "flaky tests" report, stick the fail/pass numbers (or even all the captured events) onto the testable, then walk the tree and print out messages foo-bar failed 3 times out of 4 or something like that

plexus 2020-12-07T11:01:33.250100Z

hope that makes sense!

2020-12-07T11:04:14.250200Z

ah yes that's brilliant thanks great feedback

2020-12-07T11:04:41.250400Z

yeah I'm not sure about using andreacrotti as the prefix, maybe I'll go with ac for all my libraries

2020-12-07T11:04:50.250600Z

at least is shorter and not my full name 😄

plexus 2020-12-07T11:05:16.250800Z

do you own any domain names you could use?

2020-12-07T11:05:17.251Z

but yeah everything sounds good

2020-12-07T11:05:35.251200Z

a few domains but nothing I could use for libraries really

2020-12-07T11:06:00.251400Z

maybe time to register one 😄

plexus 2020-12-07T11:06:44.251600Z

ac seems very short and potentially ambigious... but I'm not here to police that. and plenty of people in the clojure world could/should reconsider how they deal with naming prefixes.

plexus 2020-12-07T11:08:35.252800Z

could you use general hooks for that? start it in a pre-run , stop it in a post-run?

2020-12-07T11:10:25.253200Z

Hadn't looked into hooks yet, will give it a try. Thanks!

2020-12-07T11:18:32.253300Z

ah ok thanks

2020-12-07T11:45:38.253500Z

I'm fine with andreacrotti being the group-id, a bit more annoying as library ns prefix I guess

2020-12-07T11:45:50.253900Z

should they match in theory?

2020-12-07T11:46:06.254100Z

I've seen quite a few libraries where they don't really match, but it's kind of annoying tbf

2020-12-07T11:46:18.254300Z

since it's less trivial to know what to require

2020-12-07T15:38:00.254700Z

but I'm a bit stuck because the number of attempts done is returned in that hook, I can't really update the testable map from there

2020-12-07T15:38:43.254900Z

I might have to override something else, or maybe still keep the atom around and update the testable map with the atom

2020-12-07T16:03:24.255100Z

I'm also not sure how to do the propagation of the retry? config

2020-12-07T16:04:00.255300Z

do you know of any example of code doing that?

2020-12-07T16:04:40.255500Z

maybe that should be the default? Is it useful to have config on :unit for example that would not be inherited by the leafs tests?