morning
Ay up!
Discussion of the day: I like the idea of property based and generative testing but as most of my work involves manipulating data in to different shapes rather than calculating anything I’m unconvinced that it helps me that much. What are other ppl’s thoughts on good use cases for generative and/or property based testing?
P.S. I have an ulterior motive as I’m thinking of putting together a presentation on the subject for the FP North East user group.
Morning (for you) @agile_geek :simple_smile: I can see your dilemma - honestly it’s an area of testing that I’ve never really gotten into either, so I am a little lacking in opinions, but I am interested in what others may bring...
Morning
@agile_geek: can't different shape combinations also be generated ? i.e. can you not used generative testing to find shapes which trigger buggy paths through your code ?
raises eyebrow @mccraigmccraig: That sounds like an interesting possibility that had not even occurred to me
@maleghast: disclaimer - ianagtu (i am not a generative test user) - so i may be talking through my hat
Fair point, but it’s an interesting idea
:simple_smile:
@mccraigmccraig: I’m sure they can but I’m not sure I see how.
You can definitely use generators to create data structures with random strings, numbers etc. in the shape you require.
I guess the bit I struggle with is what to assert. Other than an expected schema…and I have schema for that.
Hi
@agile_geek: Yeller uses test.check extensively
@agile_geek: presumably you would want to generate input shapes to your transformation, and then schema-check the outputs ?
@mccraigmccraig: I guess so
I can't imagine using example based tests for that much these days :/
@tcrayford: Is your code base open source?
No ;)
Commercial product ;)
@tcrayford: I wonder if you’d mind sharing an example? Feel free to simplify or obfuscate.
I wrote some stuff about test.check a few times: http://yellerapp.com/posts/2015-04-13-effective-test-check.html http://yellerapp.com/posts/2014-05-08-testing-riak.html
@tcrayford: cool. I’ll check them out when I get chance.
Sure
@tcrayford: BTW are you coming to ClojureX?
Yeller has a very high level test which throws a set of generated messages at the system, then checks the count of messages after loading them all is correct.
Sadly I don't think I can make ClojureX this year
Shame. I wouldn’t have minded a chat over coffee about this.
That test has caught a bunch of "aww shit I dropped messages somehow" way before hitting production
Yeah, me too :/
It really does depend on your domain though
I'd highly recommend John Hughes talk from Clojure West
@tcrayford: nice example. Food for thought
I’ll check that out too
Other classic things: serialization round tripping is the easiest and most obvious thing
Given that most systems use JSON or Transit or something like that to communicate with clients
Generate values, serialize them then deserialize them, assert that the deserialized value is the same as the original one
For Yeller, literally everything I put in storage or send or receive over the wire has a serialization roundtrip test
Good morning.
Hello :simple_smile:
Did anyone see this? http://priceonomics.com/stack-overflow-and-the-zeitgeist-of-computer/ or specifically this graph: http://pix-media.s3.amazonaws.com/blog/1069/image03.png
Which puts Clojure in the "Losing steam on SO" graph.
I wonder if October last year was particularly busy for questions, or if there is a general trend to be looked it in Clojure
@jamiei: it's very difficult to interpret that chart, i.e. what can be inferred from "losing steam"... off the top of my head splitting of topics (e.g. [clojure] -> [clojure,clojurescript]), release of new versions and consequent issue spikes may affect the numbers greatly
Indeed
"it's important to note that tags losing steam on Stack Overflow is not necessarily indicative of people losing interest. It might just be that the questions regarding smaller topic areas get saturated and there are no more questions that need to be asked."
or split as you say
Also how much does this very forum reduce the number of stack overflow questions?
I don’t ask on Stack Overflow any more … I ask here. Usually of the library authors directly!
Another interesting measurement to take would be how much time I spend being distracted by this Slack team instead of doing work in JavaLand for my client….or perhaps I better not look under that rock!
You were joking, right? You are actually still online :simple_smile:
Apparently not..
@jamiei: I am but I am trying to focus on what I’m paid to do for a change! 😉
morning
just checking, anyone here going to the clojure dojo @ TW tonight? We had a number of people accept, but very few arrive...
there’s a big talk happening in the other half of the office, suspect some folks might have gotten lost