This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-03
Channels
- # announcements (2)
- # babashka (154)
- # beginners (63)
- # calva (4)
- # cider (2)
- # clara (19)
- # clj-kondo (94)
- # cljfx (8)
- # cljs-dev (6)
- # clojars (2)
- # clojure (82)
- # clojure-australia (1)
- # clojure-europe (134)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-serbia (11)
- # clojure-taiwan (1)
- # clojure-uk (39)
- # clojurescript (83)
- # community-development (108)
- # conjure (10)
- # cursive (32)
- # data-oriented-programming (1)
- # datomic (22)
- # defnpodcast (9)
- # depstar (4)
- # docker (3)
- # events (3)
- # figwheel-main (2)
- # funcool (9)
- # graalvm (19)
- # honeysql (23)
- # jackdaw (4)
- # jobs (4)
- # jobs-discuss (2)
- # kaocha (24)
- # leiningen (1)
- # lsp (12)
- # membrane (6)
- # off-topic (21)
- # pathom (13)
- # polylith (1)
- # releases (7)
- # remote-jobs (2)
- # reveal (8)
- # ring (7)
- # sci (2)
- # shadow-cljs (9)
- # sql (10)
- # tools-deps (21)
Is there a way of getting kaocha to log each test it is running? I've hit an issue with some tests that have a subtle dependency between them, and I'm trying to debug it, but I need to know what order they are being run in.
❯ cat tests.edn
#kaocha/v1
{:plugins [:kaocha.plugin/junit-xml
:kaocha.plugin/cloverage
:kaocha.plugin.alpha/spec-test-check]
:reporter [kaocha.report/documentation]
:fail-fast? true
:kaocha.plugin.junit-xml/target-file "target/junit.xml"}
running the tests will produce a. an xml file and b. a html file which you can open up in a browser
oh yes, I think I have that too
in fact I think it was your config I used 🙂
yeah, it's randomized with a seed
the error has gone away now 😄
need to be ready next time
I think you can
If I remember correctly, even with randomize false, your tests are still first sorted by name before they are run.
Clojure.test offers a way to specify test order via test-ns-hook
but kaocha currently https://github.com/lambdaisland/kaocha/issues/29.
Running tests in a specific order is of interest for a project I am working on that converts code blocks in docs to tests.
These code blocks sometimes rely on each other, so running in order is important.
I worked around the issue by using randomize false and generating test names that would sort appropriately.
has anyone experienced this error when running kaocha on node.js in GitHub's CI?
Exception: clojure.lang.ExceptionInfo: Failed initializing ClojureScript runtime
full stack trace: https://github.com/lilactown/autonormal/runs/2006021070?check_suite_focus=trueit's intermittent; re-running the tests typically fixes it. anecdotally I would say it fails every other time in CI. I haven't repro'd it locally yet
I haven't tried kaocha on GitHub CI myself. One thing you could try is experimenting with is the :cljs/timeout
option to a value higher than 10000 (=10 s). It's possible node.js isn't consistently ready by the time those tests run.