In this series of posts, I’m going to cover my views on software testing. I’ve spent a lot of time recently re-factoring some fairly large test suites, and would like to share some best practices I’ve learned a long the way.
In this first post, I’d like to cover some high-level testing strategies and my philosophy towards testing. In subsequent posts, I’m going to dive deeper into testing in each part of the stack.
Continue reading “On Testing – Part 1”
In this post, I’ll give a walk-through of property-based testing in clojure with a few great tools: plumatic’s schema, clojure’s own test.check and another great alternate property-based testing library called test.chuck.
First off, schema is a very nice library. If you have not looked at it yet, you should definitely check it out as a lighter-weight alternative to a full-blown typing solution like core.typed. As of version 1.0, schema now includes support for out-of-the-box generators for any of your schemas. Though experimental, the schema generators have worked really nicely for me so far. In this post, we’ll be using the latest version of
test.check (0.9.0 as of this writing). It includes a number of nice new features, so you should definitely upgrade your version if you can.
Continue reading “Clojure property-based testing with plumatic’s schema and test.check/chuck”