Fork me on GitHub
#clojure-uk
<
2016-07-24
>
agile_geek09:07:33

Morning. Wandering around a damp Windermere this morning.

agile_geek10:07:18

I'm supposed to be working on next assignment in Functional Programming Design in Scala but I'm reimplementing the Water Pouring example in Clojure instead....I lack focus 😉

paulspencerwilliams14:07:16

Hey all, I’m looking for a little assistance in forking lein-cucumber to see whether bumping it’s cucumber dependency fixes an exit code issue for me but was hoping for a little advice before embarking on this. Is anyone around for a quick chat?

agile_geek14:07:52

@paulspencerwilliams: the water pouring problem is: given a number of glasses of different capacities and a target volume to end up with in a glass (where target volume is <= largest glass volume) if you have operations fill glass completely, empty glass completely and pour for one glass to another; what is smallest number of moves and what are they?

agile_geek14:07:05

Think Die Hard 3!

paulspencerwilliams15:07:35

oh yeah, I know it. Didn’t know it’s name..

paulspencerwilliams16:07:43

So, having spent a fair amount of time yak shaving understanding why lein-cucumber -> cucumber-jvm -> clojure.test/is causes unwanted 0 exit status, and a disappointing lack of users attempting Cucumber / Clojure, maybe I should embrace more ‘Clojure-esque’ testing frameworks. I want an example style one for acceptance tests rather than anything generative etc at this point. Keradon looks interesting but a bit low level compared the the business oriented cucumber. What do other people use for this stuff?

paulspencerwilliams16:07:02

It’s worth saying, that I was hoping Cucumber / Clojure would be a useful way to sneak Clojure into my JVM based company. Pushing Clojure into customer ‘production code’ is still a pipedream, but simple, succinct test code is a much easier sell.

agile_geek16:07:26

I've used Kerodon and lein-cucumber but about a 18 months ago and all my projects are toys.

agile_geek16:07:30

I had to fix bugs in the cucumber-jvm Clojure example as it was so out of date.

agile_geek16:07:58

I followed ppl using Kerodon but that was 2014

paulspencerwilliams16:07:03

Yeah, that’s the problem I’ve been having. My issue is clojure.test/is failures don’t cause 1 exit statuses, where test/assert does but without detailed error messages. I’ve had a ‘passing’ AT that actually fails but CircleCI disagrees.

paulspencerwilliams16:07:38

I want to write tests that poke stuff into Datomic, and then test the web UI presents reports on this appropriately. Keredon is more browser DSL so I want higher level. It might just be normal clojure.test tests that I end up writing.

agile_geek16:07:17

You might get better traction getting Clojure into org using Clojure test.check and either Java interop to call Java API's or http

agile_geek16:07:31

That's odd. If I run clojure.test's (admittedly unit tests not cucumber) in CircleCI they fail build if the tests fail.

paulspencerwilliams16:07:37

Property testing is definitely one step too far.

paulspencerwilliams16:07:01

Yes, it's the interplay betweeen is and lein-cucumber

agile_geek17:07:01

I seem to remember having to write a macro to catch stuff when using Kerodon and lein-cucumber to inject failures into the clojure.test report to indicate the test results. Can't remember if that was Kerodon or lein-cucumber though

agile_geek17:07:27

I remember cucumber-jvm/lein-cucumber is weird because it's all macro's and doesn't work very well inside a namespace.

agile_geek17:07:56

I wanted to rewrite it because it broke my workflow but I never had the burning need to do it. P.S. trying to have this conversation on train with a WiFi connection every 10-20 mins is challenging!