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.
- Host: GitHub
- URL: https://github.com/alexreinking/fuzz-and-minimize
- Owner: alexreinking
- License: gpl-3.0
- Created: 2018-11-06T00:31:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-06T00:46:14.000Z (over 7 years ago)
- Last Synced: 2025-02-01T09:42:21.153Z (about 1 year ago)
- Topics: fuzz, test-automation, testing-tools
- Language: Python
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.