Fork me on GitHub

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 👍


Can I set up a watch ignore from the cli? The ignore is only for my setup


There's no command line flag for that, but you can do something like this

bin/kaocha --config-file my_config.edn


#merge[#include "tests.edn" { ["..."]}]


not sure I got the syntax right there but it's basically Aero which I believe you are familiar with 😉

😜 4

@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))))

👍 4

That is great, thank you! I will see if I can use the approach to add some "breakpoints" here and there 🙂 👍


This is a great idea. You could even wrap that in a macro to turn those nested when blocks into something linear