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命令
错误:没有测试可以运行。测试文件不包含测试或过滤器功能限制太多。
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
)。
命令:testcafe "chrome" abc.js
表示文件abc.js
必须位于当前工作目录中,以便testcafe
命令找到此文件。
如果abc.js
在子文件夹中,命令行应该是:
testcafe "chrome" ./**/abc.js