r/elixir • • 14d ago

Fuzz testing for Elixir is here

Post image

ExFuzz is a coverage-guided fuzzer for Elixir, and I just launched v0.1.0!

It is well-integrated with ExUnit, so your fuzz tests can run alongside your regular tests and use the seed corpus as an ever-growing regression suite. It is built on top of LibAFL as the underlying mutation engine.

Given the amount of critical software infrastructure built on Elixir, I really wanted to focus on an out-of-the-box Go-like developer experience to reduce adoption friction (would really appreciate feedback here).

I have many plans for v0.2.0:

  • Typed generators.
  • More Elixir-aware coverage analysis.
  • Concurrent and continuous fuzzing.
  • Improved performance (execs per second).

Looking for early feedback from the community. I am planning to take it for a test drive around the ecosystem and will let you all know how that goes!

76 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/iwantobehappypls 14d ago

They use different approaches with different goals. StreamData generates random inputs from generators you write, so complex inputs mean complex generators. ExFuzz uses code coverage to explore on its own: you write a simple property ("never crashes", "round-trips") and it works its way into the edge cases. Currently, it uses simple clause/branch coverage, but I have plans to incorporate more Elixir-specific quirks and also catch various BEAM failures via fuzzing. (will be out in v0.2.0, i'll let u know)