Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time
February 15, 2023 17:11
November 9, 2022 10:20
July 11, 2022 17:17
February 23, 2021 07:12
October 4, 2019 13:53
May 29, 2023 11:54
February 4, 2019 17:03
February 21, 2023 23:16
May 29, 2023 11:54


IMPORTANT Looking for any help with maintaining

Cross-browser screenshot testing tool for Storybook with fancy UI Runner.

Creevey downloads Commitizen friendly FOSSA Status

Creevey Demo

Core features

  • πŸ“š Integrates with Storybook
  • πŸ“œ Uses stories as tests
  • ✏️ Allows write interaction tests
  • ✨ Has fancy UI Runner
  • 🐳 Supports Docker
  • βš”οΈ Cross-browsers testing
  • πŸ”₯ Tests hot-reloading
  • βš™οΈ CI Ready

It named after Colin Creevey character from the Harry Potter universe.



  • Make sure you have installed Docker. But if you going to use your own separate Selenium Grid, you don't need Docker.
  • Supported Storybook versions: ^6.4.0.

How to start

  • Install creevey package
yarn add -D creevey
  • Add addon creevey into your storybook config
// .storybook/main.js
module.exports = {
  stories: [
    /* ... */
  addons: [
    /* ... */
  • Start storybook and then start Creevey UI Runner in separate terminal. (To start tests from CLI, run Creevey without --ui flag)
yarn start-storybook -p 6006
yarn creevey --ui

And that's it.

NOTE: In first run you may noticed, that all your tests are failing, it because you don't have source screenshot images yet. If you think, that all images are acceptable, you may approve them all in one command yarn creevey --update.

NOTE: Creevey captures screenshot of the #root element and sometimes you need to capture a whole browser viewport. To achieve this you could define captureElement Creevey parameter for story or kind. Or you may pass any different css selector.

// stories/MyModal.stories.tsx

// NOTE: Define parameter for all stories
export default {
  title: 'MyModal',
  parameters: { creevey: { captureElement: null } },

// NOTE: Or define it for specific one

export const MyModalStory = () => <MyModal />;
MyModalStory.parameters = { creevey: { captureElement: null } };

Comparison with other tools

Features\Tools Creevey Loki Storyshots Hermione BackstopJS Percy/Happo Chromatic
Easy-to-Setup βœ”οΈ βœ”οΈ ⚠️ β›” β›” βœ”οΈ βœ”οΈ
Storybook Support βœ”οΈ βœ”οΈ βœ”οΈ β›” β›” βœ”οΈ βœ”οΈ
Run tests from Storybook UI βœ”οΈ β›” β›” β›” β›” β›” β›”
Cross-browser βœ”οΈ ⚠️ β›” βœ”οΈ β›” βœ”οΈ βœ”οΈ
Test Interaction βœ”οΈ β›” ⚠️ βœ”οΈ βœ”οΈ β›” β›”
UI Test Runner βœ”οΈ β›” β›” βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
Built-in Docker βœ”οΈ βœ”οΈ β›” β›” βœ”οΈ ⚠️ ⚠️
Tests hot-reload βœ”οΈ β›” β›” β›” β›” β›” β›”

Future plans

  • Allow use different webdrivers not only selenium, but also puppeteer or playwright.
  • Add ability to ignore elements.
  • Allow to define different viewport sizes for specific stories or capture story with different args.
  • And more, check TODO for more details. Also feel free to ask about feature that you want

Known issues

Creevey is trying to build storybook but fail or tests don't work

This might happens because Creevey patches storybook webpack config and build nodejs bundle with stories meta information. And in some cases Creevey couldn't properly remove all unnecessary code cause of side-effects in stories files or you create stories dynamically. Try to rewrite such places. If it still doesn't help, send to me bundle that Creevey created (it located in node_modules/creevey/.cache/creevey/storybook/main.js)

A little bit later I'll add possibility to run tests without building that bundle, so it fixes this issue.


Currently it's not possible to run Creevey in this configuration. I'll fix this in later versions. If you use CircleCI or another CI that use docker to run jobs. Try to configure to use virtual machine executor

Update I added support to use local browsers. So it should be possible run Creevey inside docker. The only issue, that you need to find or build docker image with node, browser and selenium-webdriver. I'll add special images for Creevey later.

Chrome webdriver + 1px border with border-radius.

This cause to flaky screenshots. Possible solutions:

  • Increase threshold ratio in Creevey config diffOptions: { threshold: 0.1 }
  • Replace border to box-shadow border: 1px solid red -> box-shadow: 0 0 0 1px red
  • Set max retries to more than 5

You can't directly import selenium-webdriver package in story file

Because tests defined in story parameters and selenium-webdriver depends on nodejs builtin packages. Storybook may fail to build browser bundle. To avoid import use these workarounds:

  • .findElement(By.css('#root')) -> .findElement({ css: '#root' })
  • .sendKeys(Keys.ENTER) -> .sendKeys(this.keys.ENTER)

Used by

Whisk SKB Kontur ABBYY


FOSSA Status