Hi plexus and greater Lambda Island team. I love kaocha. We've been using it for almost 2 years now. I just started playing around with kaocha-cucumber and was able to get things to work from the CLI. I was wondering if there is a way to test/run a feature from the REPL like a Cider focused test?
Hi @amarpotghan! There's the kaocha.repl namespace which does exactly that.
Super. Sorry should have read the docs. Thanks!
No worries :)
I didn't say you could only do small bugs. Everything is an incremental improvement at this point.
I dove back in once again and now:
➜ clojure -A:test -m kaocha.runner
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.
[((..)(...)(.............)(......)(F.)(F...)(.........)(.....F)(.....)(.......)(..)(...)(..)(....)(..)(.............)(FF..FF)(.........)(...)(FFF..)(..)(..)(...............)(........................)(...........)(....)(..........................................................................................)(.)(........)(.)(..)(....)(....)(FFFFFFFF)(FF....)(....)(.)(......)(..)(..)(.............)(.)(..)(FF)(......)(.......)(...........)(FF.....FF...)(..)(.)()(...)(..................................................)(....)(.......)(.....)()(....................)(...)(..)(..)(..)(..)(F.FFFF)(....)(..)(.)(.....)(.....................................................)(....)(..)(.......)()()(....)(...........)(...........)(.......)(...)(...)(......)(..)(...........)(...............)(.)(.....)(..)(..)(F..........................................................................F)(...)(........)(F)(...)(.)(..)(....)(.....................)(...)(.........)(.)(.......................................................................)(.)(...)(......)(..........)(...)(..)(....)(..)(..............................)(.......)(.................)(....)(.........)(..)(.......)(......)(......)(....)(.)(.)(....)(..)(................................)(....)(..)(..)(..........)(....)(..)(..)(.....F)(..)(.................................)(.FF.....F........................)(..)(......)(................)(..)(....)(..)(...)(...)(...)(.)(...)(......)(F)(.)(..)(..)(....)(F.)(...)(.)(.......)(..)(........)(.)(..)(...............)(............)(..)(..)(.....)(..)(.F.F..)(........)(.)(..)(..)(..)(..........................................)(...)(..)(.....)(.)(............)(..)()(.)(.)(..........)(.)(...)(..)(..)(....)(....))]
Randomized with --seed 355021920
!!!Is there an easy way to use chui-ui with kaocha that isn’t baked into the shadow build loop?
For reference here is the node runner I am using:
(ns kaocha-node-runner
(:require [lambdaisland.chui.runner :as runner]
[lambdaisland.chui.test-data :as test-data]
[lambdaisland.glogi :as log]))
(log/set-levels
'{:glogi/root :debug
lambdaisland :all
lambdaisland.chui.interceptor :error})
(test-data/capture-test-data!)
(defn start []
;; for dev, enable this to update the UI on hot reload
;; (ui/render! (.getElementById js/document "chui-container"))
(runner/run-tests))
(defn stop [done]
(runner/terminate! done))
(defn ^:export init []
(start))
Which is basically a copy and pasted version of the browser runner
I am guessing the error
Test var xxx/yyy is known to the compiler, but was not defined at runtime. Did the file load correctly?
has something todo with my runner config and the way shadow is collecting tests?OHHHHH I see what is happening, we have integration tests
and those are defn
’s gated behind a when
Oh definitely didn’t read into what you had said that I have to only work on specific issues. I would rather just take something small to get used to the codebase ATM
hah, glad I added a check for that, before this would have given a completely impenetrable failure deep inside chui
> Is there an easy way to use chui-ui with kaocha that isn’t baked into the shadow build loop? can you elaborate? I'm not sure what this means. Chui-ui is not tied to Kaocha, you can include it in any build, shadow or not
Ideal world is the chui-ui is something is run at the command line or included with funnel
Which I am sure is possible at the moment but it's just a little confusing how to tell chui to run, get the tests from a remote client via funnel, and then run those tests.
I guess I expect chui-ui to run like the dashboard for shadow?
If that makes it any clearer
yeah chui as a UI for tests that run elsewhere is definitely something interesting to try out at some point, cause then it could also act for instance as a UI for Clojure tests run by Kaocha. The UI itself is independent enough to do that without changes, but you need something like chui-remote to pump the results into chui. Currently chui-remote only does the opposite, it runs tests on demand and sends the results out from chui to somewhere else (in our case kaocha-cljs2)
lots of use cases to consider and I can't do them all at the same time. My current priority is to make sure kaocha-cljs2 works for vanilla cljs, figwheel, and shadow, on browsers and node, and to have examples and docs for these 6 cases.
I have a limited amount of funding from Nextjournal but that's really only for the shadow-cljs use case, and doesn't cover half of the work put in so far... I think once kaocha-cljs2 is ready for general consumption I'm going to shift gears a bit and focus more on outreach to actually get a bit of a community around this stuff. We're really going to need more contributors to keep this sustainable.
I will definitely see what I can do about getting a some funding from work. No promises but if we do get things integrated then we definitely have a reason to support.
🙏:skin-tone-2: thank you! we're building up a small reserve at https://opencollective.com/lambda-island , which I actually mostly intend to use to help support other contributors.
@plexus did you want me to package up that node runner and provide a PR?