This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-25
Channels
- # aleph (2)
- # announcements (7)
- # babashka (6)
- # beginners (53)
- # calva (17)
- # cider (5)
- # clj-kondo (137)
- # cljs-dev (19)
- # cljsrn (14)
- # clojure (74)
- # clojure-conj (9)
- # clojure-europe (13)
- # clojure-houston (1)
- # clojure-italy (16)
- # clojure-nl (21)
- # clojure-spec (3)
- # clojure-uk (9)
- # clojuredesign-podcast (24)
- # clojurescript (85)
- # cursive (11)
- # datomic (28)
- # duct (3)
- # emacs (6)
- # figwheel-main (1)
- # fulcro (68)
- # graalvm (19)
- # graphql (3)
- # joker (32)
- # kaocha (10)
- # lambdaisland (1)
- # malli (50)
- # off-topic (13)
- # other-languages (7)
- # pathom (2)
- # pedestal (14)
- # re-frame (53)
- # reitit (8)
- # shadow-cljs (57)
- # specter (2)
Hi. Is there any way to abort a single test, in case of failure, but continue with the next tests? It seems I can only abort the whole suite on failure (fail fast). I have a lot of slow Selenium tests and if one of the steps fail, usually all succeeding steps will fail as well, making a lot of noise in the log and spending a lot of time due to the timeout given, each time an element is not found. The first failure is usually the only interesting failure.
No, that's currently not supported. It's tricky because the is
macro swallows exceptions. We had to do some ugly hacks because of that to support the fail fast feature. This is one reason why Kaocha has a monkey-patch namespace.
Ok. Thank you for the answer 👍
There's no command line flag for that, but you can do something like this
bin/kaocha --config-file my_config.edn
not sure I got the syntax right there but it's basically Aero which I believe you are familiar with 😉
@mogenslund, not specifically a kaocha way to support short-circuiting a single test in case of failure, but you can always take advantage of the fact that clojure.test/is
returns the body it wraps, so we have a lot of code that looks like this:
(let [some-thing (compute-something)]
(when (is (valid? some-thing) "Entire test is invalid without some-thing being valid"))
(is (check-something-else some-thing))))
That is great, thank you! I will see if I can use the approach to add some "breakpoints" here and there 🙂 👍