Fork me on GitHub
#kaocha
<
2020-11-25
>
plexus08:11:45

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

andrea.crotti10:11:33

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

andrea.crotti14:11:52

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

andrea.crotti14:11:07

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

andrea.crotti14:11:23

would be great to have a babksha powered kaocha 😄

andrea.crotti14:11:11

any suggestions for a good way to retry tests automatically?

dharrigan14:11:58

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

dharrigan14:11:10

I think you asked that already 🙂

dharrigan14:11:23

On Wednesday last week

andrea.crotti15:11:20

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

andrea.crotti15:11:35

since it's running on CI

andrea.crotti15:11:56

I'll just have to try writing a plugin maybe

andrea.crotti15:11:27

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

andrea.crotti15:11:06

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

andrea.crotti16:11:06

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?

andrea.crotti16:11:34

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

andrea.crotti16:11:42

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

andrea.crotti17:11:50

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

andrea.crotti17:11:06

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

andrea.crotti17:11:11

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

andrea.crotti17:11:36

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

salam18:11:31

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?

salam18:11:43

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 Brooks19:11:05

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

salam19:11:24

ah, i see. sounds good. thanks!