Tag Archives: Lazytest

Beware Choosing the Most Complex Tool for the Job

I once saw a TV show about competing groups of archeologists trying to demonstrate how the ancient Egyptians raised stone obelisks weighing hundreds of tons. One group of archeologists built a complex apparatus involving a wooden frame and lots of … Continue reading

Posted in Programming | Tagged , | 3 Comments

Assertions and Invariants

I’ve been thinking a lot about testing frameworks over the past six months, and I’m not the only Stuart doing that. Stuart Halloway, who spent some time on his own Clojure testing framework, Circumspec, recently wrote about his experiences refactoring … Continue reading

Posted in Programming | Tagged , | Leave a comment

Slightly Less Typed Assertions

A couple of weeks ago I wrote about typed assertions for Lazytest. Like so many things, it seemed like a good idea at the time. Define typed objects for each kind of assertion (e.g., equality, instanceof). When a test fails, … Continue reading

Posted in Programming | Tagged , | 1 Comment

Lazytest Churn

One of my stated goals with Lazytest was to enforce a clean separation between test assertions and code that runs before/around the assertions. The Spock framework for Java/Groovy calls these the stimulus and response, identified by the keywords when and … Continue reading

Posted in Programming | Tagged , | 5 Comments

Two Steps Forward, One Step Back

Following my last post I integrated typed assertions into the master branch of Lazytest. This makes some changes to the API. Test examples in the it macro can no longer simply return true or false. Instead, they must call the … Continue reading

Posted in Programming | Tagged , | 3 Comments

Typed Assertions Tell You What Hurts

One thing clojure.test did reasonably well was tell you why an assertion failed. Currently, Lazytest fails in this regard. The problem with requiring test functions to return true/false to indicate pass/fail is that they can’t attach any additional information to … Continue reading

Posted in Programming | Tagged , , | 7 Comments