Skip to content

Robust and versatile headless monkey (fuzz) testing for the web with reproducible steps, error alerts, strategy sharing and many other good things.

License

Notifications You must be signed in to change notification settings

Mechanika-Design/fuzz-monkey

Repository files navigation

Fuzzmonkey

Robust and versatile headless monkey (fuzz) testing for the web with reproducible steps, error alerts, strategy sharing and many other good things.

Travis Project Status: WIP

screenshot

It's important to remember that monkey testing should be used in conjunction with smarter tests such as integration tests.

Getting Started

Once fuzzmonkey has been installed globally, you can begin testing by supplying the --url parameter you'd like to test. As that's the only required field, testing begins immediately and proceeds with 50 actions.

fuzzmonkey --url https://bellhelmets.com/

For other parameters you can type fuzzmonkey --help at any time.

Strategy

By default each action has an equal chance of being chosen at random to be run. However you can tweak this by passing the --strategy parameter which allows for a comma separated list of actions followed by how likely they are to be chosen — for example --strategy clicker=10,reloader=0 would make clicker 10 times as likely to run than any other action – aside from reloader which will never run.

Authenticating

Oftentimes you'll want to authenticate before proceeding with the testing. In cases such as these fuzzmonkey provides a hooks file where you export two optional functions — create and destroy — you can specify the location of the hooks file with the --hooks parameter.

The hooks file must be in the *.mjs format – for instance to authenticate on a fictitious website one might implement the following.

export const create = async (page) => {
    await page.goto('https://www.example.com/');
    await page.focus('#username');
    await page.keyboard.type('fuzzmonkey');
    await page.focus('#password');
    await page.keyboard.type('monkeynuts');
    await page.keyboard.press('Enter');
    await page.waitForNavigation({ waitUntil: 'networkidle0' });
};

Meet the Team

Currently we have the following set of monkeys that perform various actions on your supplied domain:

Fuzzmonkey Clicker Performs clicks in random regions of the visible viewport.
Fuzzmonkey Networker Cycles through a list of preset network conditions.
Fuzzmonkey Scroller Scrolls the viewport to different areas of the page.
Fuzzmonkey Sizer Randomly selects a different height and width for the viewport.
Fuzzmonkey Toucher Similar to the clicker action but instead performs touches.
Fuzzmonkey Typer Focuses on random input fields and types random characters.
Fuzzmonkey Refresher Refreshes the page occasionally.

About

Robust and versatile headless monkey (fuzz) testing for the web with reproducible steps, error alerts, strategy sharing and many other good things.

Resources

License

Stars

Watchers

Forks

Packages

No packages published