Skip to content

feat: @wdio/xvfb#14663

Merged
christian-bromann merged 99 commits intowebdriverio:mainfrom
goosewobbler:wdio-xvfb
Aug 11, 2025
Merged

feat: @wdio/xvfb#14663
christian-bromann merged 99 commits intowebdriverio:mainfrom
goosewobbler:wdio-xvfb

Conversation

@goosewobbler
Copy link
Contributor

@goosewobbler goosewobbler commented Jul 24, 2025

Proposed changes

Creating a new package @wdio/xvfb for running XVFB on linux systems where appropriate to avoid confusing Chromium errors. See #14501

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 24, 2025

Open in StackBlitz

create-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/create-wdio@14663

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@14663

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@14663

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@14663

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@14663

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@14663

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@14663

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@14663

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@14663

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@14663

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@14663

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@14663

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@14663

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@14663

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@14663

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@14663

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@14663

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@14663

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@14663

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@14663

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@14663

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@14663

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@14663

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@14663

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@14663

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@14663

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@14663

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@14663

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@14663

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@14663

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@14663

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@14663

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@14663

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@14663

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@14663

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@14663

@wdio/xvfb

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/xvfb@14663

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@14663

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@14663

commit: 5cc5677

@goosewobbler goosewobbler force-pushed the wdio-xvfb branch 2 times, most recently from 5a220c0 to 9c9383f Compare July 25, 2025 00:56
@goosewobbler goosewobbler force-pushed the wdio-xvfb branch 2 times, most recently from 1e3fa75 to f03f695 Compare July 25, 2025 10:13
@goosewobbler goosewobbler marked this pull request as ready for review July 25, 2025 15:57
@goosewobbler
Copy link
Contributor Author

goosewobbler commented Jul 25, 2025

Marked as ready for review for some early feedback. Still need to consider the following, I think we need manual tests at a minimum:

  • E2E / Smoke tests
  • Manual tests
  • Docs updates

Specifically need to verify that (1) xvfb is being run on a system where it is available, and (2) xvfb is installed and run on a system where it is not available. These should be verified on different Linux distros.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial feedback.

Co-authored-by: Christian Bromann <git@bromann.dev>
@goosewobbler
Copy link
Contributor Author

goosewobbler commented Jul 25, 2025

Conceptually I am wondering if these E2Es are more like smoke tests, will see if they fit better there. Also need to add tests for the other distros, and fix the perm errors.

UPDATE: changed my mind, these don't fit well with the existing smokes.

@goosewobbler
Copy link
Contributor Author

goosewobbler commented Jul 29, 2025

Still need to go over the docs but I think it's getting there. So far the only documentation I added is the @wdio/xvfb README, do we need to mention this functionality anywhere else? Perhaps in the Testrunner pages?

Also, do we want this integrated anywhere else or is it just applicable to the local-runner? I will update the electron service to use it directly in the script / non-testrunner-based case - see webdriverio-community/wdio-electron-service#1132.

@goosewobbler
Copy link
Contributor Author

goosewobbler commented Aug 5, 2025

Note to self: verify that the case where xvfb fails to start is handled gracefully. I think some configurable number of retries would make sense, as I have been experiencing occasional failing jobs on Linux CI in this regard (using xvfb-maybe).

https://github.com/webdriverio-community/wdio-electron-service/actions/runs/16750196929/job/47418464616?pr=1133

UPDATE:

prototyping this approach in webdriverio-community/wdio-electron-service#1133...

Seems to work: https://github.com/webdriverio-community/wdio-electron-service/actions/runs/16756083118/job/47439022995?pr=1133

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Aug 11, 2025
@christian-bromann christian-bromann merged commit d30462e into webdriverio:main Aug 11, 2025
34 of 35 checks passed
@wdio-bot
Copy link
Contributor

Hey goosewobbler 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants