This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-12
Channels
- # announcements (4)
- # babashka (93)
- # beginners (43)
- # calva (56)
- # cherry (4)
- # clerk (58)
- # clj-otel (4)
- # cljs-dev (1)
- # clojure (31)
- # clojure-conj (1)
- # clojure-dev (30)
- # clojure-europe (88)
- # clojure-india (2)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (2)
- # clojurescript (5)
- # clr (13)
- # conjure (2)
- # cursive (4)
- # data-science (4)
- # datalevin (1)
- # fulcro (3)
- # gratitude (7)
- # hyperfiddle (27)
- # kaocha (3)
- # lsp (9)
- # malli (6)
- # nbb (1)
- # off-topic (41)
- # pedestal (2)
- # practicalli (1)
- # rdf (3)
- # re-frame (3)
- # reitit (10)
- # releases (1)
- # shadow-cljs (8)
- # testing (3)
- # vim (2)
- # xtdb (7)
[SOLVED] with hack. hi, can I register some tests / test results dynamically so they are run when I run tests ? Context: Looking to register junit 3 TestSuite with clojure test runner. I am trying to test a java collection implementation using Guava testlib. I implemented this collection tests in clojue, for my map implementation: https://github.com/eclipse/eclipse-collections/issues/1196 . guava-testlib generates tests using junit3 code that I can run manually and I get back a junit.framework.Testresult. How can I run those tests integrated with clojure test framework (no prefference) and have failures reported back on completion.
(let [result (TestResult.)
my-supplier (reify Supplier (get [_this] .... )))
suite (generate-map-test-suite "hash-map" my-supplier)
_ (.run suite result)
r (test-result-info result)])
test-results-info extracts data from TestResults and gives me:
{:was-successful false, :run-count 955, :fail+error 929, :error-count 915, :failure-count 14}
I can register a TestListener https://github.com/junit-team/junit4/blob/main/src/main/java/junit/framework/TestListener.java . but not sure exactly where