stbraun / fuzzing

Tools for stress testing applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to check code coverage?

CloudApiStudy opened this issue · comments

Hi, I'm wondering wether this tool is able to get a code coverage report? E.g. for a random function and a set of data generated by fuzzing.fuzz_string.

Hi, currently the tool is meant to run programs as independent processes and feed those with fuzzed data. This means a coverage report of the program under test is not possible for this use case.

You may be able to implement a fuzzer with the toolbox which takes a function as described in your post. then you could run coverage for the whole program and extract the data for your function from the resulting report, or you could implement a simple coverage function via sys.settrace.

Both approaches need some development effort. Currently there is no plan for extensions on my side. But you're free to add such an extension: the sources are under MIT license and can be used freely.

Thanks so much!