【问题标题】:TestCafe not running in ubuntu on headless and UI modeTestCafe 没有在无头和 UI 模式下在 ubuntu 中运行
【发布时间】:2019-03-29 11:51:54
【问题描述】:

Testcafe 测试未在 Ubuntu(AWS 机器)中运行

我已经为所有可用的浏览器执行了以下命令

testcafe "chrome" abc.js
testcafe "chrome:headless" abc.js

testcafe "firefox" abc.js
testcafe "firefox:headless" abc.js

testcafe "chromium" abc.js
testcafe "chromium:headless" abc.js

我收到以下执行 testcafe 命令的错误消息

错误:没有要运行的测试。要么是测试文件不包含测试,要么是过滤功能过于严格。

【问题讨论】:

    标签: javascript testing e2e-testing testcafe webautomation


    【解决方案1】:

    ERROR Was unable to open the browser "chrome:headless" due to error. Error: EACCES: permission denied, mkdir '/tmp/testcafe/chrome-profile

    您似乎在运行 sudo 后尝试在没有超级用户的情况下运行 TestCafe。

    我建议您删除 /tmp/testcafe 文件夹 (sudo rm -rf /tmp/testcafe) 并再次运行 TestCafe(不带 sudo)。

    【讨论】:

    • 我们遇到了错误ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.,这个解决方案修复了它
    • 我也遇到了上述错误,这并没有没有修复错误
    • 谢谢你!你给了解决方案的人,我在过去的 4 个小时里一直在头撞!,大欢呼!!!
    【解决方案2】:

    命令:testcafe "chrome" abc.js 表示文件abc.js 必须在当前工作目录中,testcafe 命令才能找到该文件。

    如果abc.js 位于子文件夹中,则命令行应为:

    testcafe "chrome" ./**/abc.js

    【讨论】:

    • 感谢您的回答。我已经尝试了上面给定的命令并收到以下错误消息。 ERROR Was unable to open the browser "chrome:headless" due to error. Error: EACCES: permission denied, mkdir '/tmp/testcafe/chrome-profile
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-12
    • 1970-01-01
    • 1970-01-01
    • 2019-08-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多