[erlang-questions] QuickCheck module for testing the new string module

Björn Gustavsson <>
Sun Apr 9 08:48:51 CEST 2017


Note that string_eqc.erl is in Gist in my Github user and
not in the otp repository.

The tests that we "provide" are in a common_test test suite:

https://github.com/dgud/otp/blob/1ac2425d7c4791fbce55cb662154e3646c5f9af0/lib/stdlib/test/string_SUITE.erl

Those tests don't require QuickCheck or any similar tool.
Tests for all bugs that we found using QuickCheck have
been incorporated into string_SUITE.erl.

We have no plans to incorporate QuickCheck into our
test suites or daily builds.

Using QuickCheck was just a way to find more bugs in
a (more or less) new module before we released it.
Instead of doing a traditional code review, we thought
that we would find more bugs if we would write
QuickCheck properties based on the documentation.

And, yes, we could have used PropEr. I was not
personally aware of triq. I choose QuickCheck
because Ericsson has a license and because I
have previously used eqc_erlang_program to
generate random Erlang programs to test the
compiler.

/Björn


On Fri, Apr 7, 2017 at 7:14 PM, Benoit Chesneau <> wrote:
>
> what is the issue in using a tool using the gpl3 license? it's not like you
> will include in your code.
>
> Anyway how does triq compare? does it provides the same level of features.
> It would be indeed a lot better to provides tests in a form that anyone can
> launch without having to buy a really expensive license...
>
> - benoit
>
> On 6 April 2017 at 20:34:58, Krzysztof Jurewicz
> () wrote:
>>
>> Michael Truog writes:
>>
>> It would help if you switched to using PropEr instead of QuickCheck, since
>> QuickCheck for Erlang requires a license. Using PropEr instead would be more
>> similar to using QuickCheck in Haskell due to its availability. That should
>> also allow tests like these to be included easily in Erlang/OTP source and
>> reused when testing the Erlang/OTP source code.
>>
>>
>> Unfortunately, PropEr is licensed under GNU GPL 3.0, which is not
>> compatible with Apache License 2.0. Probably this will not change anytime
>> soon. See this issue for further reference:
>> https://github.com/manopapad/proper/issues/29
>>
>> triq may be a better solution, as it is licensed under Apache License 2.0.
>> Here is the most active fork: https://github.com/triqng/triq
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions



-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list