[erlang-questions] Testing a large, heterogeneous system

Samuel <>
Thu Aug 1 10:42:10 CEST 2013


>> If you want to limit setup/teardown of the external parts (like your custom
>> hardware), meck [1] is a great tool for mocking
>> all or a subset of external dependencies.
>
> Cool, that looks very useful indeed - thanks!

When working with specially evil legacy software I often run into
problems even with meck so I wrote another "anti-legacy" mock using a
different approach to complement it, in case you find it useful:

https://github.com/samuelrivas/moka

>> Without knowing the internals of your system it's hard to give specific
>> advice, but if you have a bunch of state-full stuff proper [2]
>> has some very powerful tools for testing states and reasoning about what
>> should be valid before and after state transitions. Checkout proper_statem
>> [3] and this [4] example of a very useful test implementing the
>> proper_statem callbacks.
>
> Looks interesting - are there any examples?  It looks a bit ...
> abstract.  With limited time and Erlang abilities, we need to aim for
> stuff that gets the most coverage with the least amount of work.

Proper and QuickCheck can definitely add coverage in a very cost
effective way, but they require some time investment to master them
first. Some (maybe) useful references:

http://www.erlang.se/euc/03/proceedings/1430John.pdf (old, there is
much more in quickcheck today)
http://erlcode.wordpress.com/tag/quickcheck/
http://www.quviq.com/demos.html
http://www.erlang.org/workshop/2008/Sess31.pdf
http://www.erlang-factory.com/upload/presentations/397/proper_talk.pdf
http://basho.com/quickchecking-poolboy-for-fun-and-profit/
http://techmeshconf.com/dl/techmesh-london-2012/slides/JohnHughes_ThePropertiesOfRiak.pdf
http://www.madsgroup.org/staff/samuel/files/articles/ast10.pdf
http://www.erlang-factory.com/conference/ErlangUserConference2010/speakers/SamuelRivas

Best
-- 
Samuel



More information about the erlang-questions mailing list