TestCafe 未在无头和 UI 模式下在 ubuntu 中运行

Har*_*d L 3 javascript testing webautomation e2e-testing testcafe

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
Run Code Online (Sandbox Code Playgroud)

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

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

Vla*_* A. 5

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

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

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