All Projects → wKich → Creevey

wKich / Creevey

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

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Creevey

Webium
Webium is a Page Object pattern implementation library for Python (http://martinfowler.com/bliki/PageObject.html). It allows you to extend WebElement class to your custom controls like Link, Button and group them as pages.
Stars: ✭ 144 (-7.1%)
Mutual labels:  selenium
React Storybook Addon Chapters
📒 Showcase multiple React components within a story
Stars: ✭ 149 (-3.87%)
Mutual labels:  storybook
Selenoid
Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
Stars: ✭ 2,065 (+1232.26%)
Mutual labels:  selenium
Uirecorder
UI Recorder is a multi-platform UI test recorder.
Stars: ✭ 1,895 (+1122.58%)
Mutual labels:  selenium
Storybook
Storybook integration with Nuxt.js
Stars: ✭ 148 (-4.52%)
Mutual labels:  storybook
Workflow Reactjs
My workflow with ReactJS + Webpack 3+
Stars: ✭ 150 (-3.23%)
Mutual labels:  storybook
Zillow
Zillow Scraper for Python using Selenium
Stars: ✭ 141 (-9.03%)
Mutual labels:  selenium
Go Selenium
Selenium web driver library written in Go
Stars: ✭ 157 (+1.29%)
Mutual labels:  selenium
Vantpy
基于Selenium+unittest的WebUI自动化测试框架,使用POM(页面对象模型)设计模式,适合几乎所有web项目,可集成Jenkins部署自动化测试
Stars: ✭ 149 (-3.87%)
Mutual labels:  selenium
Qtwebdriver
WebDriver implementation for Qt
Stars: ✭ 152 (-1.94%)
Mutual labels:  selenium
React Laravel Boilerplate
A Laravel REST API backend with React/Redux, hot module reloading in development and route-level code splitting
Stars: ✭ 146 (-5.81%)
Mutual labels:  storybook
Vue Storybook
Custom <story> blocks for Vue single file components
Stars: ✭ 147 (-5.16%)
Mutual labels:  storybook
Qaf
Quality Automation Framework for web, mobileweb, mobile native and rest web-service using Selenium, webdrier, TestNG and Java Jersey
Stars: ✭ 150 (-3.23%)
Mutual labels:  selenium
Selenium Rs
A Rust Client for the Selenium webdriver (WIP)
Stars: ✭ 145 (-6.45%)
Mutual labels:  selenium
Qxf2 Page Object Model
Write Selenium and Appium tests in Python using the Page Object pattern. This Pythonic GUI and API test automation framework will help you get started with QA automation quickly. It comes with many useful integrations like - email, BrowserStack, Slack, TestRail, etc. This repository is developed and maintained by Qxf2 Services (https://qxf2.com).
Stars: ✭ 155 (+0%)
Mutual labels:  selenium
Typescript With Electron React Kit
Don't just start your Electron app... TWERKit.
Stars: ✭ 143 (-7.74%)
Mutual labels:  storybook
Ayespy
A performant visual regression testing tool
Stars: ✭ 150 (-3.23%)
Mutual labels:  selenium
Cra Recipe
Step-by-step guide to bootstrap a CRA app from scratch.
Stars: ✭ 158 (+1.94%)
Mutual labels:  storybook
Babel Plugin React Docgen
📝 Babel plugin to add react-docgen info into your code.
Stars: ✭ 156 (+0.65%)
Mutual labels:  storybook
Python3 Spider
Python爬虫实战 - 模拟登陆各大网站 包含但不限于:滑块验证、拼多多、美团、百度、bilibili、大众点评、淘宝,如果喜欢请start ❤️
Stars: ✭ 2,129 (+1273.55%)
Mutual labels:  selenium

📸+👦🏼 Creevey

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

Commitizen friendly

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.

Contents

Pre-requisites

  • Make sure you have installed Docker. But if you going to use your own separate Selenium Grid, you don't need Docker.

How to start

  • Install creevey package
yarn add -D creevey
  • Add addon creevey into your storybook config
// .storybook/main.js
module.exports = {
  stories: [
    /* ... */
  ],
  addons: [
    /* ... */
    'creevey',
  ],
};
  • 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 ✔️ ⛔️ ⛔️ ⛔️ ⛔️ ⛔️ ⛔️
OSS/SaaS OSS OSS OSS OSS OSS SaaS SaaS

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.

Docker-in-Docker

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].