<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nicolás Berger on Medium]]></title>
        <description><![CDATA[Stories by Nicolás Berger on Medium]]></description>
        <link>https://medium.com/@nberger?source=rss-2c2a75edfb54------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*TnQjLHIPwoEdx9n8.jpeg</url>
            <title>Stories by Nicolás Berger on Medium</title>
            <link>https://medium.com/@nberger?source=rss-2c2a75edfb54------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 06:18:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nberger/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using property-based testing to test Token and Crowdsale smart contracts]]></title>
            <link>https://medium.com/@nberger/using-property-based-testing-to-test-token-and-crowdsale-smart-contracts-7900dea111eb?source=rss-2c2a75edfb54------2</link>
            <guid isPermaLink="false">https://medium.com/p/7900dea111eb</guid>
            <category><![CDATA[quickcheck]]></category>
            <category><![CDATA[property-based-testing]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Nicolás Berger]]></dc:creator>
            <pubDate>Wed, 02 Aug 2017 08:53:25 GMT</pubDate>
            <atom:updated>2017-08-02T08:53:25.454Z</atom:updated>
            <content:encoded><![CDATA[<p>I had the opportunity to participate and speak at the last <a href="https://www.meetup.com/es/Lisk-Berlin-Blockchain-Meetup/">Lisk Berlin Blockchain Meetup</a> on July 18th. My talk was about how we use property-based testing (a.k.a. <em>generative testing</em> or <em>QuickCheck</em>) to throughly test the smart contracts that govern the <a href="https://github.com/windingtree/LifToken">Líf token</a> (the token of the Winding Tree decentralized travel marketplace) and the upcoming Winding Tree ICO crowdsale.</p><p>There were other great talks: Max Kordekfrom (from <a href="https://lisk.io/">Lisk</a>) gave a wrap-up on what they’ve been doing and what’s next for Lisk. Thomas Schouten (also from Lisk) presented his “Thoughts on funding mechanisms and a tokenised future”. Benjamin Jones (from <a href="https://www.bitwala.com/">Bitwala</a>) talked about “Crypto &amp; The Real World — An unholy marriage”. My talk was titled “Testing a Token with more than examples — Stateful property-based testing of smart contracts” and you can watch it right here (our talk starts at 52:47):</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQrr3OB35zKU%3Ffeature%3Doembed%26start%3D3167&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQrr3OB35zKU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQrr3OB35zKU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cec9f7a55a266811eb5e615060a3def2/href">https://medium.com/media/cec9f7a55a266811eb5e615060a3def2/href</a></iframe><h4>What is property-based testing?</h4><p>Property-based testing is a <em>software testing technique</em> that aims at verifying properties of a program that must hold true on every input, where the inputs are generated randomly from the broad universe of data that makes sense for the program.</p><p>Instead of each test being just an example input with assertions on the expected output (as it is in example-based testing), there are generators that generate all sorts of input data, properties that are checked against that input data and finally, in case a property fails on a certain input, a shrink process will try and find the smallest example that still makes the property to fail.</p><p>What’s powerful about property-based testing is that by feeding random data to your program, it can actually find bugs and edge cases that might not have been found by a programmer just writing example-based tests. It also forces the programmer to think harder about the problem at hand, as writing the properties is sometimes not a trivial task.</p><p>The most famous library for property-based testing is called <a href="https://en.wikipedia.org/wiki/QuickCheck">QuickCheck</a>, first implemented in <a href="https://hackage.haskell.org/package/QuickCheck">Haskell</a> and then in <a href="http://www.quviq.com/products/erlang-quickcheck/">Erlang</a>. Other great implementations are <a href="https://github.com/HypothesisWorks/hypothesis-python">Hypothesis for python</a>, <a href="https://github.com/clojure/test.check">test.check for clojure</a> (of which I’m a contributor), and <a href="https://github.com/jsverify/jsverify">JSVerify for javascript</a> which is the one we are using in Winding Tree.</p><p><strong>Want to learn more about property-based testing</strong>? Start by watching this great talk by John Hughes (one of the original creators of both the Haskell and Erlang QuickCheck libraries): <a href="https://www.youtube.com/watch?v=zi0rHwfiX1Q">Testing the Hard Stuff and Staying Sane</a>. Maybe read these two posts: <a href="http://blog.jessitron.com/2013/04/property-based-testing-what-is-it.html">Property-based testing: what is it?</a> and <a href="https://medium.com/front-end-hacking/an-introduction-to-property-based-testing-with-js-verfiy-c194d60222f8">An introduction to property based testing with JS Verify</a>. Also feel free to continue the conversation <a href="http://slack.windingtree.com/">in our slack</a> or via <a href="http://twitter.com/windingtree">twitter</a>.</p><p><strong>Finally</strong>: Thanks to Lisk and especially to Joel Fernandez for the opportunity to participate in the meetup!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7900dea111eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>