TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Property-Based Testing with PropEr, Erlang, and Elixir

116 点作者 mononcqc超过 6 年前

3 条评论

ramchip超过 6 年前
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 未加载
dnautics超过 6 年前
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.
JohnKacz超过 6 年前
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 未加载