kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
plexus 2020-11-25T08:43:45.109Z

you're welcome to try kaocha-cljs2, it's still kind of alpha-ish but you might have some luck with it. We're using it quite succesfully at nextjournal

2020-11-25T10:56:33.110300Z

Ah ok cool I'll try that, specially if your are deprecating kaocha-cljs eventually?

2020-11-25T14:17:52.110800Z

and btw it's the only annoying thing about test plan generation & similar is that it still takes a very long time

2020-11-25T14:18:07.111300Z

but I guess it's unavoidable with the whole JVM startup/file loading that happens

2020-11-25T14:18:23.111900Z

would be great to have a babksha powered kaocha 😄

2020-11-25T14:45:11.112600Z

any suggestions for a good way to retry tests automatically?

dharrigan 2020-11-25T14:48:58.113200Z

I use clj -M:test -m kaocha.runner --watch in a seperate term

dharrigan 2020-11-25T14:49:10.113400Z

I think you asked that already 🙂

dharrigan 2020-11-25T14:49:23.113600Z

On Wednesday last week

2020-11-25T15:01:20.114100Z

yes I did sorry but yeah that's not a solution for what I need

2020-11-25T15:01:35.114600Z

since it's running on CI

2020-11-25T15:01:56.115700Z

I'll just have to try writing a plugin maybe

2020-11-25T15:29:27.116600Z

any idea why :reporteris a list btw? does it make sense to have more than one?

2020-11-25T15:31:06.118200Z

also if I want to override some config dynamically is the best way to do something like (kr/run :something (assoc (kr/config) :foo :bar)) ?

2020-11-25T16:50:06.119600Z

so I'm just trying to use post-run in a new plugin I created, I wonder why post-run takes the whole test-plan?

2020-11-25T16:50:34.120500Z

my idea would be to check if the test that just ran failed and re-run it by adding it back to the test plan somehow

2020-11-25T16:50:42.120800Z

not sure if that's feasible from what I've seen so far

2020-11-25T17:06:50.121800Z

any tips about how to work with the test-plan in general? I'm just trying to see what I should do in the test plan, but even trying that in the kaocha repl (printing it out) I'm already at 50k lines and counting

2020-11-25T17:07:06.122600Z

so I really have to look at it in a tiny project to be able to see something

2020-11-25T17:38:11.123400Z

all I want to do really is to modify the test-plan in post-runto make the failed tests to run again if they failed

2020-11-25T17:38:36.124200Z

not sure that would even work but I'm struggling a bit with the size of the test-plan map which makes it quite hard to deal with

salam 2020-11-25T18:42:31.130600Z

kaocha fails to run tests since upgrading to version 1.0.726 (version 1.0.641 is good) with the following error message:

❯ clojure -M:test/run
Execution error (FileNotFoundException) at kaocha.specs/assert-spec (specs.clj:152).
Could not locate clojure/test/check/generators__init.class, clojure/test/check/generators.clj or clojure/test/check/generators.cljc on classpath.

Full report at:
/var/folders/xl/lv75dxl574q1xnd76twp0psc0000gn/T/clojure-17591710051423450775.edn
my clojure cli version is 1.10.1.739 and the following is the relevant content in my deps.edn file:
{:deps
 {org.clojure/clojure {:mvn/version "1.10.1"}}

 :paths
 ["src" "resources" "classes"]

 :aliases
 {;; for including test paths on classpath
  :test/paths ["test" "test-resources"]

  ;; runs tests:
  ;;   clojure -M:test/run [--watch]
  :test/run {:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.726"}
                          lambdaisland/kaocha-junit-xml {:mvn/version "0.0.76"}}
             :extra-paths [:test/paths]
             :main-opts ["--main" "kaocha.runner"
                         "--reporter" "documentation"
                         "--plugin" "kaocha.plugin/junit-xml"
                         "--junit-xml-file" "target/junit.xml"]}}}
any thoughts?

salam 2020-11-25T18:47:43.131500Z

so, apparently, "org.clojure/test.check" is not on the classpath as can be inferred from the error message. do i need to add it to the classpath myself as a test dependency?

Alys Brooks 2020-11-25T19:38:05.134900Z

Hi salam, test.check is meant as an optional dependency, but there's a few places it's (inadvertently) required. we fixed most of them in 1.0.726, but not all of them. In the meantime, you can add test.check as a dependency or downgrade to 1.0.690. Sorry the newest version isn't working for you, but at least you can use something a little newer than 1.0.641

salam 2020-11-25T19:57:24.135200Z

ah, i see. sounds good. thanks!