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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Fuzzing vs. Property Testing

62 点作者 chwolfe将近 6 年前

5 条评论

kcsrk将近 6 年前
Of interest is Crowbar[0,1], a testing tool for OCaml that combines Quickcheck like property testing with AFL fuzz.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;stedolan&#x2F;crowbar" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;stedolan&#x2F;crowbar</a><p>[1] <a href="https:&#x2F;&#x2F;ocaml.org&#x2F;meetings&#x2F;ocaml&#x2F;2017&#x2F;extended-abstract__2017__stephen-dolan_mindy-preston__testing-with-crowbar.pdf" rel="nofollow">https:&#x2F;&#x2F;ocaml.org&#x2F;meetings&#x2F;ocaml&#x2F;2017&#x2F;extended-abstract__201...</a>
stevekemp将近 6 年前
One of the things that I like about go is that the standard-library really encourages the use of writing test-cases. Most of the bigger projects have good coverage, and I try hard to get my own.<p>But nothing beats the sheer tenacity of running your code through a fuzz-tester. I&#x27;ve written a simple virtual machine, which interprets bytecode, and a BASIC interpreter amongst other things recently. Both of these projects benefited hugely from fuzz-testing, despite having high coverage via manually-written test-cases.<p>Fuzz testing is cheap and largely automatic, so if it takes a few hours or a few days to find an interesting result that&#x27;s not a problem. I remember the first time I tested my interpreter when I had ~90% coverage of the code with my test-cases and it crashed via fuzzing within seconds! Magic!
ehsankia将近 6 年前
Related, I&#x27;ve been having a lot of success with Hypothesis [0], the Python property-based testing library.<p>[0] <a href="https:&#x2F;&#x2F;hypothesis.readthedocs.io&#x2F;en&#x2F;latest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hypothesis.readthedocs.io&#x2F;en&#x2F;latest&#x2F;</a>
评论 #20282133 未加载
dnautics将近 6 年前
A good property testing framework has two properties, 1) inputs increase in complexity over generations, and 2) properties can shrink, enabling you to find &quot;minimum error conditions&quot;, so property tests can help you identify the source of the error too.
carlmr将近 6 年前
Is there something like a good proptest in C++?
评论 #20283159 未加载