Fork me on GitHub
#kaocha
<
2023-02-18
>
euccastro13:02:16

I'm trying to use the profiler and nothing gets printed out. This is kaocha version 1.77.1236, I run (kaocha.repl/run <some-namespace>) , and my (kaocha.repl/config) output is

{:kaocha/tests
 [{:kaocha.testable/desc "integration (clojure.test)",
   :kaocha.testable/type :kaocha.type/clojure.test,
   :kaocha.testable/id :integration,
   :kaocha/ns-patterns ["-test$"],
   :kaocha/source-paths ["src"],
   :kaocha/test-paths ["test"],
   :kaocha.filter/skip-meta [:kaocha/skip :migration :wind]}
  {:kaocha.testable/desc "migration (clojure.test)",
   :kaocha.testable/type :kaocha.type/clojure.test,
   :kaocha.testable/id :migration,
   :kaocha/ns-patterns ["-test$"],
   :kaocha/source-paths ["src"],
   :kaocha/test-paths ["test"],
   :kaocha.filter/skip-meta [:kaocha/skip],
   :kaocha.filter/focus-meta [:migration]}],
 :kaocha.plugin.profiling/count 10,
 :kaocha.plugin.junit-xml/target-file "report.xml",
 :kaocha.plugin.profiling/profiling? true,
 :kaocha/fail-fast? false,
 :kaocha/color? true,
 :kaocha.plugin.randomize/seed 138009294,
 :kaocha.plugin.randomize/randomize? true,
 :kaocha/plugins
 [:kaocha.plugin/randomize
  :kaocha.plugin/filter
  :kaocha.plugin/capture-output
  :kaocha.plugin/junit-xml
  :kaocha.plugin/profiling],
 :kaocha.plugin.capture-output/capture-output? false,
 :kaocha/reporter [kaocha.report/dots],
 :capture-output? false}
Test output is just
[(........)]
8 tests, 8 assertions, 0 failures.

euccastro20:02:51

When running from the command line I get the profiling output

Alys Brooks03:02:12

Yes, I think kaocha.api doesn't run the post-summary hook, which is where the profiling information is printed. (discussed here: https://github.com/lambdaisland/kaocha/issues/332) We should probably handle post-summary in kaocha.repl, too.