kaocha

onetom 2022-12-02T05:36:53.776959Z

Is there a way to fail fast certain tests only? My use-case would be the same as @charliebriggs': fail-fast integration tests, but don't fail-fast unit tests. @charliebriggs has a discussion about this in the past, but there was no explanation what exactly has worked at the end: https://clojurians.slack.com/archives/CCY2V0U6A/p1605193008070800

plexus 2022-12-02T09:00:52.690039Z

should be doable with a wrap-run hook which binds testable/*fail-fast?* to true/false based on the current test.

onetom 2022-12-02T05:42:11.561339Z

I haven't found any github issues about this question either amongst the results i got, when i search for fail-fast. Now we are keep switching the :fail-fast? flag in our tests.edn, depending on the desired behaviour, which is a bit annoying. We did mark our integration tests with a ^:behaviour meta tag and we did define a kaocha test suite, like this:

{:id         :behaviour
 :focus-meta #profile {:default [:behaviour :x]
                       :ci      [:behaviour]}}
I tried to put :fail-fast? into this definition, but as i gleamed from the kaocha sources, the :fail-fast? config option is only used during the test plan computation stage and adds an extra kaocha.report/fail-fast reporter implicitly to the list of reporters, so it wouldn't make sense to have a per-test-suite setting for it, assuming test suites share the reporter stack during a test run...