jakemcc / test-refresh

Refreshes and reruns clojure.tests in your project.
393 stars 28 forks source link

Jdslavin reporting #42

Closed jdslavin closed 9 years ago

jdslavin commented 9 years ago

I extended lein-test-refresh to allow for a custom clojure.test reporting function written using the standard mulitmethod functions. I have a reporter that we use to format reports in BDD style output and we wanted to use that same report when running from the leiningen and your lein-test-refresh so i went ahead and extended it to allow me to do this. I was not sure what version that really belonged to so i just created a 0.10.2-SNAPSHOT as my version for the moment. This option will cause the quiet option to be ignored and use the custom reporter.

I define my reporter as follows:

(defmulti ^:dynamic my-report :type)

(defmethod my-report :default [m] )

(defmethod my-report :pass [m](t/with-test-out %28t/inc-report-counter :pass%29))

......

When i specify the :report options i added to the config for lein-test-refresh i can reference this report to display output in any format i wish.

jakemcc commented 9 years ago

Neat. I'll try to take a look at this later today. Thanks for the PR.

jdslavin commented 9 years ago

Thanks, if you have any questions or issues let me know.

Jeff

From: Jake McCrary notifications@github.com Reply-To: jakemcc/lein-test-refresh <reply+003c079562615dcbf5783889b0292004fa4f52985eef593d92cf000000011222575c9 2a169ce067c0668@reply.github.com> Date: Tuesday, September 29, 2015 at 6:42 AM To: jakemcc/lein-test-refresh lein-test-refresh@noreply.github.com Cc: NAVIS slavin.jeff@gmail.com Subject: Re: [lein-test-refresh] Jdslavin reporting (#42)

Neat. I'll try to take a look at this later today. Thanks for the PR.

‹ Reply to this email directly or view it on GitHub <https://github.com/jakemcc/lein-test-refresh/pull/42#issuecomment-144063443

.

jakemcc commented 9 years ago

@jslavin62 Looks pretty good. I made some small comments on the changes itself and once those are fixed I'll merge it in.

Would it be easy to add an example of a custom reporting function to the project found in the lein2 directory? It doesn't have to be a great reporter but it would be nice to have an example in there for when I do manual testing prior to releasing a new version.

jdslavin commented 9 years ago

I went ahead and made the changes you requested and included a simple sample report for testing in the lein2 project. It should help you play with this feature yourself.

jakemcc commented 9 years ago

Great. Thanks! Nice addition.

jakemcc commented 9 years ago

Released changes in version 0.11.0.

jdslavin commented 9 years ago

Thanks Jake, happy we have this feature! Love your application!

From: Jake McCrary notifications@github.com Reply-To: jakemcc/lein-test-refresh <reply+003c0795e91f2bc09f59f4ab58ef9160209ce2d37ad829f192cf000000011224fde79 2a169ce067c0668@reply.github.com> Date: Thursday, October 1, 2015 at 6:58 AM To: jakemcc/lein-test-refresh lein-test-refresh@noreply.github.com Cc: NAVIS slavin.jeff@gmail.com Subject: Re: [lein-test-refresh] Jdslavin reporting (#42)

Released changes in version 0.11.0.

‹ Reply to this email directly or view it on GitHub <https://github.com/jakemcc/lein-test-refresh/pull/42#issuecomment-144733397

.