Chrome 和 Firefox 运行 始终通过 Gitlab-runner 处于无头模式

Chrome and Firefox running ALWAYS in headless mode through Gitlab-runner

我正在使用 gitlab CI 通过 Testcafe v1.3.3 设置新的 e2e 测试。测试是 运行ning 在 windows 机器上,那里有 Gitlab-运行ner 运行 shell 执行器。 当测试在 Chrome、Firefox 和 Edge 上启动时,只有 Edge 显示 GUI,其他浏览器不显示 GUI,只显示启动的后台进程,尽管 Testcafe 配置为 运行 无头模式Chrome 和 Firefox。但是,测试作业 运行 和测试 fail/successes 符合预期。

当配置中未提供无头模式时,Chrome 和 Firefox 不显示 GUI 是否是正确的行为?

Testcafe 配置文件

.testcaferc.json

{
  "browsers": ["edge", "chrome", "firefox"],
  "debugMode": false,
  "debugOnFail": false,
  "developmentMode": false,
  "hostname": "localhost",
  "port1": "5050",
  "port2": "5051",......
}

.gitlab-ci.yml

stages:
  - test
Install_run_test:
  stage: test
  tags: 
    - windows
  script:
    - npm ci
    - npm test

我希望在 运行使用 Testcafe

进行 e2e 测试时使用 Chrome 和 Firfox GUI

GitLab Runner 需要对 运行 GUI 的超级用户权限。有关详细信息,请参阅 Super-User Permission 主题。

如果您 运行 GitLab Runner 在 Windows 作为一项服务,您可以在 this thread.

中找到有用的提示