【发布时间】:2017-10-09 23:06:39
【问题描述】:
当我尝试使用 npm run project_one 运行我的守夜项目时,我收到了此响应。
There was an error while starting the test runner:
Error: Cannot read source folder: /Users/BenyJo/examples/tests
at /Users/BenyJo/node_modules/nightwatch/lib/runner/run.js:203:21
at /Users/BenyJo/node_modules/nightwatch/lib/runner/walk.js:97:18
at FSReqWrap.oncomplete (fs.js:153:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! package@1.0.0 project_one: `nightwatch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the package@1.0.0 project_one script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
每当我使用 npm 使用任何 nightwatch 命令时,我都会收到相同的错误,我的 Nightwatch 配置如下:
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"selenium" : {
"start_process" : true,
"server_path" : "./bin/selenium_v360.jar",
"log_path" : "",
"port" : 4444,
"cli_args" : {
"webdriver.chrome.driver" : "./bin/chromedriver"
}
},
"test_settings" : {
"default" : {
"launch_url" : "http://localhost",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
我注意到在那个错误中,没有调用文件,那里应该有一个 nightwatch 文件夹。 /Users/BenyJo/examples/tests
【问题讨论】:
标签: javascript node.js testing automated-tests nightwatch.js