TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Property-Based Testing with PropEr, Erlang, and Elixir

116 pointsby mononcqcover 6 years ago

3 comments

ramchipover 6 years ago
This book is great! I was already familiar with the basics of property testing, but the book shows it can be used for way more than just the usual JSON parsing examples I had seen until now.<p>In particular I liked the idea of negative testing: making sure bad things <i>don&#x27;t</i> happen, even if you generate data from a wider domain than what a function is meant to support.<p>The targeted property-based testing example is really impressive. The author tests a version of Quickcheck, and asks the framework to target a high runtime, putting an assertion in the test to make it fail if the runtime is very high. The framework then goes and generates an example of data causing O(n^2) behavior in quickcheck. Just beautiful.<p>I&#x27;m not done with the stateful testing part, but already I applied some of the stuff to a Python project (using Hypothesis) with good results. I hope I get to apply it to Elixir in the future.
评论 #18896143 未加载
dnauticsover 6 years ago
Elixir now has streamdata&#x2F;exunitproperties which is designed to be integrated with the built in testing platform.<p>I&#x27;ve been using property testing to issue random workloads and test some of our work software, already it has found some bugs.
JohnKaczover 6 years ago
I&#x27;m really interested in property-based testing but I haven&#x27;t found any non-trivial examples out there. Anyone have any great repos or other resources they could point me to beside the author&#x27;s work (which I plan on getting)?
评论 #18895681 未加载
评论 #18896440 未加载
评论 #18895741 未加载
评论 #18895285 未加载