+1 Quickcheck looks like a great way to test for weird inputs!  I put a couple 
of minor comments in your PR.


> On Feb 2, 2017, at 2:40 PM, Dan Smith <dsm...@pivotal.io> wrote:
> 
> +1 Cool!
> 
> -Dan
> 
> On Thu, Feb 2, 2017 at 1:21 PM, Galen M O'Sullivan <gosulli...@pivotal.io>
> wrote:
> 
>> Hi all,
>> 
>> I would like to propose adding [junit-quickcheck](1) to Geode. It's named
>> after the [Haskell tool](2) and functions more or less as automated testing
>> for JUnit Theories (if anyone is familiar with those).
>> 
>> Property-based testing means basically that you write a function that tests
>> some code and checks some conditions you expect to hold true for all
>> inputs, and then have a computer program test all sorts of weird inputs to
>> try prove you wrong.
>> 
>> Because the test data is randomly generated, you get to test against more
>> inputs than you might even think of, and because the seed is saved, the
>> test is reproducible. If junit-quickcheck finds one failure, it will even
>> try to narrow down to a smallest example of a test failure.
>> 
>> There are some limitations to this library -- for example, it doesn't tend
>> to generate strings more than a few hundred characters in length (though
>> this increases with sample size, so if you kick the sample size up, you can
>> get into the thousands fairly quickly).
>> 
>> [ScalaCheck](3) is another option that does much the same and seems to have
>> more functionality (and in particular, it seems to be able to handle state
>> in tests), but it requires Scala to run and tests are also written in Scala
>> (though it can test Java code). I don't think there will be much support
>> for including Scala as a dependency for Geode.
>> 
>> I've put up a Review board request and PR:
>> https://reviews.apache.org/r/56242/
>> https://github.com/apache/geode/pull/383
>> 
>> 
>> I'd like to hear the community's input.
>> 
>> Thanks,
>> Galen O'Sullivan
>> 
>> [1]: http://pholser.github.io/junit-quickcheck/site/0.7/
>> [2]: http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html
>> [3]: http://www.scalacheck.org/index.html
>> 

Reply via email to