Fork me on GitHub
#kaocha
<
2022-11-18
>
genekim09:11:02

Making a note to myself — reminder to study the documentation, and if this isn’t already sufficiently documented, file an issue or pull request: “`--plugin kaocha.plugin/profiling` does not work when using --watch — I was expecting this to work, hoping that I could find all the tests that need to be flagged with meta of :integration. Instead, profiling information never appeared.” Thank you to everyone who makes kaocha so awesome! I use it in (almost) all my projects!

plexus11:11:04

Please do file an issue @genekim, I don't think I've seen anyone mention this one yet but it sounds like something that "should" work. If it's surprising to you it's probably surprising to someone else, and we should at least look at what our options are to improve/ or fix it.

👍 1
🙏 1
dev-hartmann12:11:38

Hey friendly folks

dev-hartmann12:11:03

I have a quick question, I get the following error when trying to run kaocha with the cloverage plugin

dev-hartmann12:11:16

ERROR: Couldn't load plugin kaocha.plugin/cloverage. Failed to load namespace cloverage. This could be caused by a misspelling or a missing dependency.

dev-hartmann12:11:06

:test {:extra-paths ["backend/dev-resources"]
                  :extra-deps {lambdaisland/kaocha {:mvn/version "1.68.1059"}
                               lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"}}
                  :exec-fn kaocha.runner/exec-fn}

           :kaocha-coverage {:exec-fn kaocha.runner/exec-fn
                             :exec-args {:plugins [kaocha.plugin/cloverage]
                                         :cloverage/opts {:ns-exclude-regex [],
                                                          :text? false,
                                                          :lcov? false,
                                                          :high-watermark 80,
                                                          :fail-threshold 0,
                                                          :output "target/coverage",
                                                          :low-watermark 50,
                                                          :ns-regex [],
                                                          :summary? true,
                                                          :coveralls? false,
                                                          :emma-xml? false,
                                                          :html? true,
                                                          :nop? false,
                                                          :codecov? false}}}

dev-hartmann12:11:16

i have this config in my deps.edn

dev-hartmann12:11:33

and run it with: clojure -A:test -X:kaocha-coverage

plexus14:11:02

not sure but try making the plugin name a keyword

plexus14:11:17

:plugins [:kaocha.plugin/cloverage]

dev-hartmann14:11:17

thx @plexus , the issue was, we have a dedicated tests.edn in the project, so I added the config part there and everything is working now! (and I had to use a keyword :rolling_on_the_floor_laughing: )