Skip to content

Instantly share code, notes, and snippets.

@hanneskaeufler
Last active April 8, 2018 10:20
Show Gist options
  • Save hanneskaeufler/28bd5cf945630b04f943f4ef7c90453d to your computer and use it in GitHub Desktop.
Save hanneskaeufler/28bd5cf945630b04f943f4ef7c90453d to your computer and use it in GitHub Desktop.
Using BackstopJS
# Install backstopjs locally
yarn add backstopjs
# Setup folders, configuration etc.
./node_modules/.bin/backstopjs init
# Edit backstop.json to configure the viewports you want to test on.
# I use the following:
# "viewports": [
# {
# "label": "phone",
# "width": 320,
# "height": 480
# },
# {
# "label": "tablet",
# "width": 1024,
# "height": 768
# },
# {
# "label": "desktop",
# "width": 2880,
# "height": 1800
# }
# ]
# Define some pages you want to visit/compare, e.g.
# "scenarios": [
# {
# "label": "Blog Index",
# "url": "http://localhost:5000"
# }
# Finally run backstop tests to go ahead and capture first set of images
./node_modules/.bin/backstop test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment