ExCheck – QuickCheck for Elixir

https://github.com/parroty/excheck

Just uploaded a property-based testing library for Elixir (QuickCheck style). It’s trial implementation, but basic features are now working with ExUnit.

I was taking a scala course at coursera, and one exercise was to use scalacheck, which is the scala version of QuickCheck. QuickCheck is an automatic specification-based testing library. The original one is developped on Haskell, and it’s ported to many languages. There’re several Erlang’s libraries too, but I couldn’t easily use it on elixir, since the predicates are based on macros. Then, I tried to create a wrapper for one of the library (krestenkrab/triq – GitHub).

I didn’t know about the QuickCheck before, but it’s pretty much interesting concept. The declarative testings work as more clear specification, and also it helps on creating test-data. Thinking about test-data with boundary or abnormal conditions are sometimes cumbersome, but QuickCheck with various generators helps it nicely.

Advertisements

Posted on November 13, 2013, in Elixir, Software Design. Bookmark the permalink. 1 Comment.

  1. Nice work. There’s a similar thing here: https://github.com/yrashk/properex, and now there’s even talk of adding a property testing subsystem to Elixir core: https://github.com/elixir-lang/elixir/pull/1890

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: