Error running backstop test with docker container
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
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. (/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
Contributor guide
Assessment
This issue has not been assessed yet.