Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the clojure.test protocol #356

Open
bbatsov opened this issue Mar 19, 2016 · 6 comments
Open

Implement the clojure.test protocol #356

bbatsov opened this issue Mar 19, 2016 · 6 comments

Comments

@bbatsov
Copy link

bbatsov commented Mar 19, 2016

Basically this would allow tools like cider-test to run midje tests, which would benefit a lot of Clojure developers. More details - https://github.com/clojure-emacs/cider#using-cider-test-with-alternative-test-libraries and clojure-emacs/cider#1606

@marick
Copy link
Owner

marick commented Sep 5, 2016

I'm happy to entertain pull requests. But note: clojure.test is a least-common-denominator model for testing, equivalent to the original Junit. Should Cider restrict users to that? - forcing all testing frameworks into that mold - or should it actually engage with the differing approaches of other frameworks? That is: where were Midje users when cider-test was solidified?

@PabloReszczynski
Copy link

Sorry for the necropost, but as an user of both Midje and Cider, this feature would really benefit me.
For it to be compatible with Cider, would the Midje lib have to implement clojure.test protocols for each checker and fact macro?

@philomates
Copy link
Collaborator

Hey @PabloReszczynski, always good to hear from users regarding what would be useful to them.

I briefly looked into this in the past and I didn't see a clear path forward; something about needing to extend fact to allow them to be named, like clojure.test allows. This sorta goes against the current way Midje is constructed.

That said, I'll try and get some time soon to dive into this again and re-assess how this might be implemented.

@marick
Copy link
Owner

marick commented Jun 25, 2018

The last couple of times I looked, I concluded that clojure.test model (later codified in clojure.test) couldn't represent Midje tests. The opposite I think is true.

That would suggest expanding the protocol to be a superset, rather than a strict subset, of the available testing tools.

@bbatsov
Copy link
Author

bbatsov commented Jun 26, 2018

Should Cider restrict users to that? - forcing all testing frameworks into that mold - or should it actually engage with the differing approaches of other frameworks? That is: where were Midje users when cider-test was solidified?

I guess I saw this pretty late, but for the sake of completeness let me answer. We never intended to restrict people to clojure.test - it happened that someone contributed functionality to support clojure.test early on (mostly as a replacement for the popular at the time clojure-test-mode). Afterwards people started asking for support for other tools, but we realized we can't just add dependencies to every test library that exists to cider-nrepl - we either needed some shared protocol they needed to implement or the support for them had to packaged as CIDER extensions. A proper protocol that all such libraries would implement would be an idea solution, but no one really expressed the desire to work on one, so we were left with only a single option - suggest people to implement the clojure.test protocol as some compromise (or just adapt the cider-test functionality and distribute some extension).

I certainly would love to see CIDER have a native integration with every test library that exists, but that's a lot of work as it stands, and our resources are tiny.

@marick
Copy link
Owner

marick commented Jun 26, 2018

At the first clojure conj, I proposed that the three (at the time) test frameworks implement some commonality. Found no interest. I think that was a missed opportunity.

However, to be honest: communities that have supported more than one "official" framework don't seem to have benefited all that much. It's better when the dominant framework absorbs the others. It's unfortunate that clojure.test was so minimal compared to what other languages built on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants