question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running backstop test with docker container

See original GitHub issue

Here’s my configuration file

{
  "id": "test",
  "viewports": [
    {
      "label": "small",
      "width": 320,
      "height": 480
    },
    {
      "label": "medium",
      "width": 568,
      "height": 1024
    },
    {
      "label": "large",
      "width": 1024,
      "height": 768
    },
    {
      "label": "xlarge",
      "width": 1291,
      "height": 768
    }
  ],
  "scenarios": [
    {
      "label": "Family Circle Story",
      "url": "http://www.familycircle.com/family-fun/10-books-to-read-now/",
      "hideSelectors": [
        "#ad",
        "#mobileHoverBannerWrapper", 
        "#header-banner-container",
        "#sidebar-second"
      ], 
      "removeSelectors": [
        "#block-outbrain-integration-outbrain",
        "#monetate_lightbox",
        "#block-medianet-medianet"
      ],
      "selectorExpansion": true,
      "selectors": [],
      "readyEvent": null,
      "delay": 1000,
      "misMatchThreshold" : 10,
      "requireSameDimensions" : true
    }
  ],
  "paths": {
    "bitmaps_reference": "backstop_data/bitmaps_reference",
    "bitmaps_test": "backstop_data/bitmaps_test",
    "engine_scripts": "backstop_data/engine_scripts",
    "html_report": "backstop_data/html_report",
    "ci_report": "backstop_data/ci_report"
  },
  "engineFlags": [],
  "engine": "chrome",
  "report": ["browser"],
  "debug": true,
  "debugWindow": false
}

and after trying to run this using the container via docker run --rm -v $(pwd):/src docksal/backstopjs test, I get the following error

CasperJS: [info] [phantom] Step anonymous 8/28: done in 5491ms.
CasperJS:  [info] [phantom] Step anonymous 9/28 http://www.familycircle.com/family-fun/10-books-to-read-now/ (HTTP 200)
CasperJS:  [info] [phantom] Step anonymous 9/28: done in 5508ms.
CasperJS:  [info] [phantom] Step anonymous 10/28 http://www.familycircle.com/family-fun/10-books-to-read-now/ (HTTP 200)
CasperJS:  [debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=true
CasperJS:  [debug] [phantom] url changed to "about:blank"

Testing script failed with code: 1

An unexpected error occured. You may want to try setting the debug option to `true` in your config file.
COMMAND | Command `test` ended with an error
COMMAND | Error: An unexpected error occured. You may want to try setting the debug option to `true` in your config file.
              at ChildProcess.<anonymous> (/usr/lib/node_modules/backstopjs/core/util/createBitmaps.js:70:18)
              at emitTwo (events.js:106:13)
              at ChildProcess.emit (events.js:191:7)
              at maybeClose (internal/child_process.js:877:16)
              at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

When run the tests on my local machine (mac OS) it runs fine. Also I don’t understand why inside the container it uses casperjs instead of chrome.

If you have any pointers, it will be appreciated.

Thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
garriscommented, Sep 15, 2017

@swese44 Fantastic – thank you for sharing all this work!

Fun fact: we both work for Microsoft 😄. Nice to meet you!

0reactions
dodozhang21commented, Sep 23, 2017

@lmakarov Thank you so much! I will definitely try it out!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chromium browser failing in docker container when running ...
I'm currently trying to just make one test run by building the docker container locally. I run this command to make the docker...
Read more >
BacktopJS - Best of JS
backstop test : BackstopJS creates a set of test screenshots and compares them with your reference screenshots. Any changes show up in a...
Read more >
BackstopJS Docker Image
A self-contained Docker image to run BackstopJS with no external dependencies. Visual Regression Testing with BackstopJS in a Docker container. Features:.
Read more >
Front-end automated testing using BackstopJS and KSS style ...
Visual regression testing takes care of this problem, by automatically ... style.css --homepage homepage.md", "backstop-reference": "npm run ...
Read more >
Implementing Automated Visual Regression Testing Using ...
backstop.json topic of scenario in the next section. Finally, we can run our visual regression tests using: > backstop test. This will run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found