Skip to main content

Tools for stress testing applications.

Project description

Stress testing of applications can be done in lots of different ways. This package provides an easy to use tool to stress test applications which take files as parameters. Editors, image viewers, compilers, and many more classes of apps come to mind.

The stress test is based on a given set of files, binary or text. Those files are taken randomly and some bytes are modified also randomly (fuzzing). Then the application gets executed with the fuzzed file. Repeating this over and over again stresses the robustness for defective input data of the application.

Tutorial and API documentation can be found on ReadTheDocs.

What’s new?

Now you can run your tests in multiple processes. Test results are combined and printed.


The easiest way to install is via easy_install or pip

$ pip install fuzzing

There are feature related tests that can be run with behave and unit tests runnable with pytest or nosetest.


from fuzzing.fuzzer import FuzzExecutor

# Files to use as initial input seed.
file_list = ["./features/data/t1.pdf", "./features/data/t3.pdf", "./features/data/t2.jpg"]

# List of applications to test.
apps_under_test = ["/Applications/Adobe Reader 9/Adobe",
                   "/Applications/PDFpen 6",

number_of_runs = 13

def test():
    fuzz_executor = FuzzExecutor(apps_under_test, file_list)
    return fuzz_executor.stats

def main():
    stats = test()

Using pre-built test runner and configuration

For convenience a test runner is provided which takes a test configuration.

Example of a configuration YAML file:

version: 1
seed_files: ['requirements.txt', 'README.rst']
applications: ['MyFunnyApp', 'AdobeReader']
runs: 800
processors: 4
processes: 10

Then call the test runner in a terminal session:

$ test.yaml

This will execute the tests as configured and print the test result when done:

$ test.yaml
Starting up ...
... finished

Test Results:

    succeeded: 4021
    failed: 95
    succeeded: 3883
    failed: 1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuzzing-0.3.2.tar.gz (20.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page