Re: On Testing
Here a example where midje could provide more info. I have this function : (defn pr134 [element a-seq] (and (contains? a-seq element) (nil? element)) ) and I have this test-function : (ns exercises.core-test (:use midje.sweet) (:use [exercises.core])) (facts "about `pr134`" (fact "it normally return true if the key exist and the value is nil" (pr134 :a {:a nil :b 2}) => true (pr134 :b {:a nil :b 2}) => false )) Then I see this output : FAIL "about `pr134` - it normally return true if the key exist and the value is nil" at (core_test.clj:7) Expected: true Actual: false FAILURE: 1 check failed. (But 1 succeeded.) So I do not know if the first part contains? or the second one nil? is wrong. I know it mentioned before if you look at the way groovy does , you get more info like this made up example. (and (contains? a-seq element) (nil? element)) schould be true | | | true false | | | false true Roelof Op zondag 2 november 2014 03:04:38 UTC+1 schreef Devin Walters (devn): > > http://jakemccrary.com/blog/2014/06/22/comparing-clojure-testing-libraries-output/ > > has some good examples. I'm currently using humane-test-output. It's worked > nicely for me. > > '(Devin Walters) > > On Nov 1, 2014, at 7:00 PM, Alex Miller > wrote: > > Additionally, I think it would be helpful to enumerate example (failing) > tests and their output by current clojure.test. > > > On Saturday, November 1, 2014 1:58:32 PM UTC-5, Alex Miller wrote: >> >> It would be great if someone could enumerate more explicitly what >> "better" test output means. What are the specific problems in the current >> test output reporting? >> >> Similar problem list for test runner might be useful. >> >> Discussion here is fine but ultimately needs to land on a design wiki >> page. >> >> I am happy to do what I can to move this through a process toward >> inclusion in a release. >> >> -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clo...@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+u...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+u...@googlegroups.com . > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
http://jakemccrary.com/blog/2014/06/22/comparing-clojure-testing-libraries-output/ has some good examples. I'm currently using humane-test-output. It's worked nicely for me. '(Devin Walters) > On Nov 1, 2014, at 7:00 PM, Alex Miller wrote: > > Additionally, I think it would be helpful to enumerate example (failing) > tests and their output by current clojure.test. > > >> On Saturday, November 1, 2014 1:58:32 PM UTC-5, Alex Miller wrote: >> It would be great if someone could enumerate more explicitly what "better" >> test output means. What are the specific problems in the current test output >> reporting? >> Similar problem list for test runner might be useful. >> >> Discussion here is fine but ultimately needs to land on a design wiki page. >> >> I am happy to do what I can to move this through a process toward inclusion >> in a release. >> > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
Additionally, I think it would be helpful to enumerate example (failing) tests and their output by current clojure.test. On Saturday, November 1, 2014 1:58:32 PM UTC-5, Alex Miller wrote: > > It would be great if someone could enumerate more explicitly what "better" > test output means. What are the specific problems in the current test > output reporting? > > Similar problem list for test runner might be useful. > > Discussion here is fine but ultimately needs to land on a design wiki page. > > I am happy to do what I can to move this through a process toward > inclusion in a release. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
On Nov 1, 2014, at 1:58 PM, Alex Miller wrote: > It would be great if someone could enumerate more explicitly what "better" > test output means. What are the specific problems in the current test output > reporting? If there's any sort of consensus about test reporting, specifically how differing collections should be printed, I'll implement/include that in Midje. Note: speclj and Midje are the frameworks that most support mocking (or, as I like to think of mocking: prerequisites and axioms). That adds some complexity to test output. For example, a single evaluate-function-and-check-the-result operation can fail for more than one reason at once. Latest book: /Functional Programming for the Object-Oriented Programmer/ https://leanpub.com/fp-oo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
I can say for certain that at a minimum better indentation of data structures to the console would be a must, a vector with 4+ hash maps in it are currently unreadable and I have to copy to an editor to indent and analyze. Beyond that, I can imagine the need for a structural diff that tells me in a human readable form how things are different. Different types (plain sequence vs hash map), different positions or keys in structures, etc. On Sat, Nov 1, 2014 at 12:58 PM, Alex Miller wrote: > It would be great if someone could enumerate more explicitly what "better" > test output means. What are the specific problems in the current test output > reporting? > Similar problem list for test runner might be useful. > Discussion here is fine but ultimately needs to land on a design wiki page. > I am happy to do what I can to move this through a process toward inclusion > in a release. > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
It would be great if someone could enumerate more explicitly what "better" test output means. What are the specific problems in the current test output reporting? Similar problem list for test runner might be useful. Discussion here is fine but ultimately needs to land on a design wiki page. I am happy to do what I can to move this through a process toward inclusion in a release. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
That's an excellent idea, currently at least test.check hacks on top of clojure.test by using macros that emit clojure.test tests. Beyond that it seems that the #1 wish is better output. I don't think that ought to be very hard for us to pull off as a community. On Fri, Oct 31, 2014 at 6:56 PM, Andrew Rosa wrote: > +1 to something like humane-test-output being part of core library. > There is value for the community to have some foundation library share > across our test frameworks? Something like `test.runners`, to encapsulate > error reporting and organization? Bit crazy, I know, but the idea come > after seeing Haskell's https://github.com/feuerbach/tasty. OK, I don't do > Haskell, but I kind of like the way of composing a single integrated suite > of different flavors of test. > Andrew > On Friday, October 31, 2014 10:41:09 PM UTC-2, John Louis Del Rosario wrote: >> >> Would be great if humane-test-output was part of clojure.test. Would make >> it easier for beginners to find it. >> >> On Friday, October 31, 2014 11:19:11 PM UTC+8, Eli Naeher wrote: >>> >>> On Fri, Oct 31, 2014 at 9:52 AM, Ashton Kemerling >>> wrote: >>> >>> It's my opinion that these two libraries are largely complete aside from some human interface improvements (quality of output for example), but clearly not everyone agrees with me. >>> >>> Hi Ashton, >>> >>> Check out https://github.com/pjstadig/humane-test-output if you haven't >>> already seen it, it's a nice improvement over the default output--in >>> particular seeing the specific diffs between expected and actual values is >>> really useful when you are dealing with collections. >>> >>> -Eli >>> >> > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
+1 to something like humane-test-output being part of core library. There is value for the community to have some foundation library share across our test frameworks? Something like `test.runners`, to encapsulate error reporting and organization? Bit crazy, I know, but the idea come after seeing Haskell's https://github.com/feuerbach/tasty. OK, I don't do Haskell, but I kind of like the way of composing a single integrated suite of different flavors of test. Andrew On Friday, October 31, 2014 10:41:09 PM UTC-2, John Louis Del Rosario wrote: > > Would be great if humane-test-output was part of clojure.test. Would make > it easier for beginners to find it. > > On Friday, October 31, 2014 11:19:11 PM UTC+8, Eli Naeher wrote: >> >> On Fri, Oct 31, 2014 at 9:52 AM, Ashton Kemerling >> wrote: >> >> >>> It's my opinion that these two libraries are largely complete aside from >>> some human interface improvements (quality of output for example), but >>> clearly not everyone agrees with me. >>> >> >> Hi Ashton, >> >> Check out https://github.com/pjstadig/humane-test-output if you haven't >> already seen it, it's a nice improvement over the default output--in >> particular seeing the specific diffs between expected and actual values is >> really useful when you are dealing with collections. >> >> -Eli >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
Would be great if humane-test-output was part of clojure.test. Would make it easier for beginners to find it. On Friday, October 31, 2014 11:19:11 PM UTC+8, Eli Naeher wrote: > > On Fri, Oct 31, 2014 at 9:52 AM, Ashton Kemerling > wrote: > > >> It's my opinion that these two libraries are largely complete aside from >> some human interface improvements (quality of output for example), but >> clearly not everyone agrees with me. >> > > Hi Ashton, > > Check out https://github.com/pjstadig/humane-test-output if you haven't > already seen it, it's a nice improvement over the default output--in > particular seeing the specific diffs between expected and actual values is > really useful when you are dealing with collections. > > -Eli > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
I totally agree about pr-str in test.check. Quite often I want to copy and paste the failure into a repl and play around, but need to re-add missing quotation marks or quote lists. > On 31 Oct 2014, at 22:05, Jessica Kerr wrote: > > My top wish it more readable output from test.check when running within > clojure.test > > In particular, I want to know the value of each generated parameter at the > first failure, and at the simplest failure. Currently that prints as part of > a map, but if empty-string is generated, that does not show. (Forking and) > printing with pr-str improves it, but I'd like to do a lot more with that. > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
My top wish it more readable output from test.check when running within clojure.test In particular, I want to know the value of each generated parameter at the first failure, and at the simplest failure. Currently that prints as part of a map, but if empty-string is generated, that does not show. (Forking and) printing with pr-str improves it, but I'd like to do a lot more with that. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
On Fri, Oct 31, 2014 at 9:52 AM, Ashton Kemerling wrote: > It's my opinion that these two libraries are largely complete aside from > some human interface improvements (quality of output for example), but > clearly not everyone agrees with me. > Hi Ashton, Check out https://github.com/pjstadig/humane-test-output if you haven't already seen it, it's a nice improvement over the default output--in particular seeing the specific diffs between expected and actual values is really useful when you are dealing with collections. -Eli -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
"I tweeted recently that I thought that Clojure is super testable, and I was genuinely surprised about the number of people who disagreed with me." My 2c. Without explicitly citing those complaints, it will be difficult to conduct a meaningful debate. 2014-10-31 14:52 GMT+00:00 Ashton Kemerling : > I tweeted recently that I thought that Clojure is super testable, and I > was genuinely surprised about the number of people who disagreed with me. > > There's been a lively discussion about what the best testing frameworks in > clojure currently are, and what the built in solutions (clojure.test and > test.check) are lacking. While a lot of people recommend midje or > expectations, I generally prefer the built in options (no offense to > contributors of either of those libraries) and usually recommend people > stick with clojure.test for its lack of magic. > > It's my opinion that these two libraries are largely complete aside from > some human interface improvements (quality of output for example), but > clearly not everyone agrees with me. > > So let's talk about what we could add to make the clojure testing > experience superior compared to other languages. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- László Török Checkout justonemorepoint.com - Know your true value -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: On Testing
I don't want to speak for others, I notified everyone involved on Twitter that I made this thread so they can voice their own complaints. On Fri, Oct 31, 2014 at 9:02 AM, László Török wrote: > "I tweeted recently that I thought that Clojure is super testable, and I > was genuinely surprised about the number of people who disagreed with me." > My 2c. > Without explicitly citing those complaints, it will be difficult to conduct > a meaningful debate. > 2014-10-31 14:52 GMT+00:00 Ashton Kemerling : >> I tweeted recently that I thought that Clojure is super testable, and I >> was genuinely surprised about the number of people who disagreed with me. >> >> There's been a lively discussion about what the best testing frameworks in >> clojure currently are, and what the built in solutions (clojure.test and >> test.check) are lacking. While a lot of people recommend midje or >> expectations, I generally prefer the built in options (no offense to >> contributors of either of those libraries) and usually recommend people >> stick with clojure.test for its lack of magic. >> >> It's my opinion that these two libraries are largely complete aside from >> some human interface improvements (quality of output for example), but >> clearly not everyone agrees with me. >> >> So let's talk about what we could add to make the clojure testing >> experience superior compared to other languages. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > László Török > Checkout justonemorepoint.com - Know your true value > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.