npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webmonkey

v0.6.0

Published

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

Downloads

53

Readme

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

Travis   npm   License MIT   code style: prettier

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

Screenshot

Getting Started

Once webmonkey 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.

foo@bar:~$ webmonkey --url https://news.bbc.co.uk/

For other parameters you can type webmonkey --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 webmonkey 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('webmonkey');
    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: