如何在没有打开浏览器的情况下从容器运行赛普拉斯测试?

时间:2020-06-15 21:40:41

标签: docker cypress

我正在尝试无头运行赛普拉斯测试(我知道如何无头运行) 打开Firefox并运行所有测试。在文档中指出我需要做的所有事情 运行cypress run --browser firefox,这是在使用npm软件包管理器安装cypress时使用的。我正在使用集装箱赛普拉斯。

容器的结构:

cypress
   - integration
   - cypress.json
   - plugins
   - node_modules

显然,我可以运行docker run -it -v $PWD:/services/cypress -w / --entrypoint=cypress tdd_cypress --browser firefox run,在我的情况下会引发错误。

编辑:

我再次运行命令以查看实际发生的情况,看来它正在运行,但它正在容器中运行测试。当我按下Ctrl + C时看到了这个结论,我得出了这个结论:

^CThe Test Runner unexpectedly exited via a exit event with signal SIGINT

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Debian - 10.3)
Cypress Version: 4.8.0

^这使我认为测试确实在运行,因为它们在容器内运行()(如果我在CI中无头运行测试就可以了),我只是看不到它们在运行。

在装有Cypress的容器中如何打开浏览器运行测试?

0 个答案:

没有答案