<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">Testing – Haskell – Aelve Guide</title><id>https://guide.aelve.com/haskell/feed/category/n3fql3kc</id><updated>2019-01-27T14:17:10Z</updated><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/feed/category/n3fql3kc"/><entry><id>kvos7f3u</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">dejafu</title><updated>2019-01-27T14:17:10Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;dejafu&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/dejafu&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-kvos7f3u"/></entry><entry><id>af2ffb90</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">testing-feat</title><updated>2019-01-06T14:28:26Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;testing-feat&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/testing-feat&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;p&gt;Enumerates values by size.&lt;/p&gt;
&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;p&gt;&lt;li&gt;Increasing size generally makes the search space grow smaller than increasing depth, with greater variability of generated inputs.&lt;/li&gt;&lt;/p&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-af2ffb90"/></entry><entry><id>zxfhvwmq</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">smallcheck</title><updated>2019-01-06T14:28:19Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;smallcheck&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/smallcheck&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;p&gt;Property-based enumerative testing.&lt;/p&gt;
&lt;p&gt;Enumerates values by increasing depth.&lt;/p&gt;
&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;p&gt;&lt;li&gt;Increasing depth is perhaps the simplest enumeration strategy.&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;Deterministic for a fixed number of test cases.&lt;/li&gt;&lt;/p&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-zxfhvwmq"/></entry><entry><id>mdxe90oy</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">leancheck</title><updated>2019-01-06T14:28:16Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;leancheck&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/leancheck&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;p&gt;Property-based enumerative testing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/rudymatela/leancheck/blob/master/doc/faq.md&#34;&gt;LeanCheck FAQ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-mdxe90oy"/></entry><entry><id>skqhakg5</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">Hedgehog</title><updated>2019-01-06T14:20:45Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;Hedgehog&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/hedgehog&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;p&gt;Property-based random testing.&lt;/p&gt;
&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;p&gt;&lt;li&gt;Generators also specify shrinking, so they guarantee the same invariants by construction.&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;A rich set of generator combinators&lt;/li&gt;&lt;/p&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-skqhakg5"/></entry><entry><id>m39lcafx</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">webdriver</title><updated>2016-05-01T18:12:25Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;webdriver&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/webdriver&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-m39lcafx"/></entry><entry><id>ledmkam0</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">tasty</title><updated>2016-05-01T18:12:03Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;tasty&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/tasty&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-ledmkam0"/></entry><entry><id>r0chdlf0</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">test-framework</title><updated>2016-05-01T18:11:58Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;test-framework&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/test-framework&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-r0chdlf0"/></entry><entry><id>lvns009q</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">Hspec</title><updated>2016-05-01T18:11:50Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;a href=&#34;https://hspec.github.io&#34; class=&#34;item-name&#34;&gt;Hspec&lt;/a&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/hspec&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-lvns009q"/></entry><entry><id>a8qlbj2t</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">HUnit</title><updated>2016-05-01T18:11:48Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;HUnit&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/HUnit&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;/ul&gt;</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-a8qlbj2t"/></entry><entry><id>a4o1t0ee</id><title xmlns:ns="http://www.w3.org/2005/Atom" ns:type="text">QuickCheck</title><updated>2016-05-01T18:11:40Z</updated><content xmlns:ns="http://www.w3.org/2005/Atom" ns:type="html">&lt;h1&gt;  &lt;span class=&#34;item-name&#34;&gt;QuickCheck&lt;/span&gt;

  
  (&lt;a href=&#34;https://hackage.haskell.org/package/QuickCheck&#34;&gt;Hackage&lt;/a&gt;)
&lt;/h1&gt;&lt;p&gt;Property-based random testing.&lt;/p&gt;
&lt;p&gt;Write high-level properties that can be tested by generating many random inputs to search counterexamples. Counterexamples are then shrunk to a minimal example to help pinpoint the source of the error.&lt;/p&gt;
&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;p&gt;&lt;li&gt;Some properties are natural to understand, such as type class laws.&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;Automated test case generation helps with better coverage.&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;Shrinking makes failures easy to reproduce and debug.&lt;/li&gt;&lt;/p&gt;&lt;/ul&gt;&lt;h2&gt;Cons&lt;/h2&gt;&lt;ul&gt;&lt;p&gt;&lt;li&gt;Properties and test case generators can become arbitrarily complex, ultimately hiding bugs.&lt;/li&gt;&lt;/p&gt;&lt;/ul&gt;&lt;h2&gt;Ecosystem&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Random generators can often be derived generically: &lt;a href=&#34;https://hackage.haskell.org/package/generic-random&#34;&gt;generic-random&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To test stateful programs, QuickCheck has a module &lt;code&gt;Test.QuickCheck.Monadic&lt;/code&gt;. There is also &lt;a href=&#34;https://hackage.haskell.org/package/quickcheck-state-machine&#34;&gt;quickcheck-state-machine&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When QuickCheck tests fail, they only print the counterexample. To extract counterexamples in code, you can use an alternative interface in &lt;a href=&#34;https://hackage.haskell.org/package/quickcheck-with-counterexamples&#34;&gt;quickcheck-with-counterexamples&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Orphan instances: &lt;a href=&#34;https://hackage.haskell.org/package/quickcheck-instances&#34;&gt;quickcheck-instances&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</content><link xmlns:ns="http://www.w3.org/2005/Atom" ns:href="https://guide.aelve.com/haskell/testing-n3fql3kc#item-a4o1t0ee"/></entry></feed>