whatisgithub

What is gremlins.js?

marmelab/gremlins.js — explained in plain English

Analysis updated 2026-06-24

9,086JavaScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

A JavaScript testing library that stress-tests web apps by unleashing random clicks, typing, and scrolling, monkey testing that finds edge-case bugs your scripted tests never think to try.

Mindmap

mindmap
  root((gremlins.js))
    What it does
      Random UI actions
      Bug discovery
      Monkey testing
    Agents
      Gremlins cause chaos
      Mogwais monitor health
      Gizmo stops on errors
    Integrations
      Cypress
      Playwright
      Browser bookmarklet
    Customization
      Custom gremlins
      Action speed
      Error thresholds
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run random-action monkey testing on a JavaScript-heavy web app to surface crashes and edge cases.

USE CASE 2

Add gremlins.js to a Cypress or Playwright pipeline to fuzz the UI automatically during CI runs.

USE CASE 3

Use the bookmarklet to attack any web page in your browser instantly with no installation needed.

USE CASE 4

Write a custom gremlin function that performs an app-specific chaotic action like randomly reordering list items.

What is it built with?

JavaScriptCypressPlaywright

How does it compare?

marmelab/gremlins.jsarasatasaygin/is.jsjshint/jshint
Stars9,0869,0849,068
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

So what is it?

gremlins.js is a testing tool that finds bugs in web applications by doing random, unpredictable things to them. It clicks on random spots, types nonsense into form fields, scrolls in unexpected directions, and generally behaves like the most chaotic user imaginable. The idea is that if your application can survive a few hundred random actions without crashing or throwing errors, it is probably solid enough for real users. This approach is called monkey testing or fuzz testing, a technique borrowed from mobile app development where similar tools have been used for years. For web applications built with a lot of JavaScript, random-action testing can reveal edge cases that manual testers and scripted tests never think to try, like what happens if someone submits a form with emoji in a number field or scrolls to the bottom of the page while a modal is opening. The library works through two types of agents: gremlins and mogwais. Gremlins are the ones causing chaos, clicking, typing, scrolling, touching. Mogwais are observers that monitor how the application is holding up, tracking frame rates, watching for JavaScript errors, and logging what is happening. A built-in mogwai called Gizmo automatically stops the test after ten errors so you can focus on fixing the first batch of problems before the list grows unmanageable. You can control which gremlins run, how many actions they take, how fast they work, and what they consider an error. Custom gremlins can be written as plain JavaScript functions and added to the horde. The tool integrates with Cypress and Playwright for teams that run it as part of a testing pipeline. It is also available as a bookmarklet, a small saved browser link you can use to attack any web page without installing anything.

Copy-paste prompts

Prompt 1
I want to find random UI bugs in my web app. Show me how to install gremlins.js and run a basic gremlin horde against my localhost.
Prompt 2
How do I add gremlins.js to a Cypress test so the monkey testing runs as part of my automated test suite?
Prompt 3
Show me how to write a custom gremlin in gremlins.js that randomly deletes rows from a data table on my page.
Prompt 4
I want gremlins.js to stop after 5 JavaScript errors instead of 10. How do I configure the Gizmo mogwai threshold?

Frequently asked questions

What is gremlins.js?

A JavaScript testing library that stress-tests web apps by unleashing random clicks, typing, and scrolling, monkey testing that finds edge-case bugs your scripted tests never think to try.

What language is gremlins.js written in?

Mainly JavaScript. The stack also includes JavaScript, Cypress, Playwright.

How hard is gremlins.js to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is gremlins.js for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.