You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jovial currently creates a pretty simple reporter that focuses on printing exceptions to the output stream. Because of this we didn't bother calling (do-report ...) in all of the places clojure.test does, which prevents a custom reporter from handling those event types.
Originally posted by ngrewe February 17, 2024
Hi folks,
I'm porting an older project that previously relied on the clojuresque gradle plugin to clojurephant, and I'm running into a bit of a problem with the JUnit integration. My test suite defines a custom report hook for :end-test-var. When I execute the test suite in IntelliJ using Cursive, that method instead gets called as expected, but when executing ./gradlew test (using the Jovial integration), it isn't called. Can anybody point me towards why that might be happening and how to fix it? I've already tried using (defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …) instead of (defmethod clojure.test/report :end-test-var …), but to no avail.
Thanks,
Niels
Implementation
Looks like (at a minimum) we'll need to replicate how clojure.test calls begin/end around testing the var. I think we'd just need to add it in here.
Open to suggestions on if/how we make this extensible for end users. The (defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …) that you tried is the most straightforward, but I hadn't originally intended to have a public API surface to jovial, because ideally running your test via jovial would not impact what you write in your tests. But if there's not a better way to do it transparently, that could still be an option.
The text was updated successfully, but these errors were encountered:
Jovial currently creates a pretty simple reporter that focuses on printing exceptions to the output stream. Because of this we didn't bother calling
(do-report ...)
in all of the places clojure.test does, which prevents a custom reporter from handling those event types.Discussed in clojurephant/clojurephant#214
Originally posted by ngrewe February 17, 2024
Hi folks,
I'm porting an older project that previously relied on the clojuresque gradle plugin to clojurephant, and I'm running into a bit of a problem with the JUnit integration. My test suite defines a custom
report
hook for:end-test-var
. When I execute the test suite in IntelliJ using Cursive, that method instead gets called as expected, but when executing./gradlew test
(using the Jovial integration), it isn't called. Can anybody point me towards why that might be happening and how to fix it? I've already tried using(defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …)
instead of(defmethod clojure.test/report :end-test-var …)
, but to no avail.Thanks,
Niels
Implementation
Looks like (at a minimum) we'll need to replicate how clojure.test calls begin/end around testing the var. I think we'd just need to add it in here.
Open to suggestions on if/how we make this extensible for end users. The
(defmethod dev.clojurephant.jovial.engine.clojure-test/jovial-report :end-test-var …)
that you tried is the most straightforward, but I hadn't originally intended to have a public API surface to jovial, because ideally running your test via jovial would not impact what you write in your tests. But if there's not a better way to do it transparently, that could still be an option.The text was updated successfully, but these errors were encountered: