Backstop JS and Lando

by Stephen Cross

Posted on Mar 23rd, 2019

Backstop and Lando

I've recently started using Backstop JS for visual regression testing. You can add the following settings to your Lando configuration, .lando.yml, to include Backstop JS.

    type: node:10
      backstopjs: "latest"
    command: npm start
      - apt-get -y update && apt-get -y install software-properties-common
      - wget && apt-key add
      - add-apt-repository "deb stable main"
      - apt-get -y update && apt-get -y install google-chrome-stable
    service: node

You will need to use the .internal URL from Lando to access the local website. For example:

  "scenarios": [
      "label": "Homepage",
      "url": "http://appserver_nginx.your-site-name.internal"

The backstop commands will be run through Lando tooling:

lando backstop reference
lando backstop test



Tags: Drupal

This Website
This website is an experiment. It's built with Sculpin, which is a static site generator written in PHP. It converts Markdown files, Twig templates and standard HTML into a static HTML site that can be easily deployed. Learn more about this website build.