backstop.js - 出现错误:BackstopJS 的 net::ERR_CONNECTION_REFUSED
问题描述
我在尝试运行 BackstopJS 时收到错误:net::ERR_CONNECTION_REFUSED 消息。创建了 localhost.crt 和 localhost.key 文件,我想知道是否需要在 backstop.json 文件中引用它们?还是我完全错了?我在 Mac 上,试图通过终端运行 Backstop。
这是我的 backstop.json 文件:
"id": "backstop_default",
"viewports": [
{
"label": "phone",
"width": 320,
"height": 480
},
{
"label": "tablet",
"width": 1024,
"height": 768
},
{
"label": "tablet-vertical",
"width": 768,
"height": 1024
},
{
"label": "computer",
"width": 1920,
"height": 768
}
],
"onBeforeScript": "puppet/onBefore.js",
"onReadyScript": "puppet/onReady.js",
"scenarios": [
{
"label": "Regression Testing",
"cookiePath": "backstop_data/engine_scripts/cookies.json",
"url": "https://localhost:3000/",
"referenceUrl": "https://localhost:3000/",
"readyEvent": "backstopjs_ready",
"readySelector": "",
"delay": 1000,
"hideSelectors": [],
"removeSelectors": [],
"hoverSelector": "",
"clickSelector": "",
"postInteractionWait": 0,
"selectors": [],
"selectorExpansion": true,
"expect": 0,
"misMatchThreshold" : 0.1,
"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"
},
"report": ["browser"],
"engine": "puppeteer",
"engineOptions": {
"ignoreHTTPSErrors": true,
"args": ["--no-sandbox", "--disable-setuid-sandbox"]
},
"asyncCaptureLimit": 5,
"asyncCompareLimit": 50,
"debug": false,
"debugWindow": false
}
解决方案
推荐阅读
- mysql - MySQL - 如何在嵌套的 IFNULL...GROUP_CONCAT() 条件下选择多个列?
- c# - 使用 IAsyncEnumerable 重载方法
- javascript - 反应应用程序和快递服务器中的CORS代理错误
- multivalue - Pick/UniBasic Field 函数使用多个字符的分隔符进行操作?
- java - Spring Boot 中的 Log4j 2:JDBC appender 不会将日志消息写入 DB 的列
- node.js - 保护 NodeJS RESTful API 和 React 客户端应用程序
- json - 使用 cloudformation 在云端添加 ssl 证书时出现错误(需要指定)
- python - 是否可以在 multiprocessing.Process 中传递 ndarray 类型的对象?
- algorithm - 如何根据最小道路中的最大拱门数停止 Bellman-Ford 算法
- reactjs - Material UI 自动完成:在自定义菜单下拉列表中渲染失去焦点