0

I am trying for the CI integration of testcafe in GitHub Actions. Our runner does not have xvfb. So we are trying to run in headless mode to avoid xvfb error. But we are still getting:

Command failed: xvfb-run --server-args="-screen 0 1280x720x24" npx testcafe chrome:headless src/automationTests/sampleTest.ts

Is it possible to run testcafe in CI without using xvfb in headless mode?

steps:
  - name: code checkout
    uses: actions/checkout@v3
  - uses: DevExpress/testcafe-action@latest
    with:
      args: "chrome:headless src/automationTests/sampleTest.ts"

This is what we tried. We are expecting to do this successfully without installing xvfb.

Azeem
  • 11,148
  • 4
  • 27
  • 40
Arun
  • 11
  • 2
  • It's part of the implementation of [DevExpress/testcafe-action](https://github.com/DevExpress/testcafe-action). See https://github.com/DevExpress/testcafe-action/blob/32e627224d7e1be30f96aab5b459eff4a95cd56b/index.js#L60-L64. – Azeem Mar 03 '23 at 16:01
  • Looks like you already created an issue (https://github.com/DevExpress/testcafe-action/issues/33) for this. For now, that command is unconditionally used if OS is Linux. Hopefully, it would be configurable after your issue. BTW, as you're already using TypeScript, it would be easier for you to add this functionality. ;) Check [`testCafeArguments`](https://github.com/DevExpress/testcafe-action/blob/32e627224d7e1be30f96aab5b459eff4a95cd56b/index.js#LL16C7-L16C24) for `chrome:headless` and suppress the execution of `xvfb` altogether. – Azeem Mar 03 '23 at 16:04

0 Answers0