An open API service indexing awesome lists of open source software.

https://github.com/alexreinking/fuzz-and-minimize

Fuzz and minimize bad test cases for encoder/decoder style programs.
https://github.com/alexreinking/fuzz-and-minimize

fuzz test-automation testing-tools

Last synced: 12 months ago
JSON representation

Fuzz and minimize bad test cases for encoder/decoder style programs.

Awesome Lists containing this project

README

          

# Find bad inputs and minimize test cases

Here's some (updated) code I used back in undergrad to find bugs
in an assignment we had to write an encoder / decoder for a popular
compression format.

Requires Python 3.

Tests that an input that can be passed through both encoder and
decoder phases without corruption (ie. it's an identity function).
Generates random inputs from a command-line supplied alphabet.

Use like so:

./random_input.py ./example/bad_encoder.sh ./example/bad_decoder.sh 'ABC' > bad_input
./bisect_input.py ./example/bad_encoder.sh ./example/bad_decoder.sh bad_input > bad_input_min

This is all wrapped up into a bash script:

./find_and_minimize.sh ./example/bad_encoder.sh ./example/bad_decoder.sh 'ABC'
cat bad_input ; echo
cat bad_input_min ; echo

YMMV

Licensed under GPL v3.