Skip to content

[Feature]: Enable GPU Hardware Acceleration by default on the Headless mode.  #11627

Open

Description

We currently are writing a browser tests for our application that involves a heavy use of WebGL for rendering graphics.
Running tests on '--headed' mode is all running fine, however when we want to run the tests on CI pipelines or even locally in '--headless' mode, we have issues with tests taking super long time to render graphics and leads to the test failure several times.

For now we have found a workaround that enables to use Hardware Acceleration on '--headless' mode by enabling this flag on MAC OSX.
await chromium.launch( {args: [ // This works in MAC '--use-gl=egl', '--use-gl=egl' ]},)

We are still facing the issue when it comes to the use in Windows as above browser launch arguments does not seem to work on Windows System.

This is very important for us to be able to run the tests on CI Pipeline as currently we are having to manually trigger the test on '--headed' mode on Windows systems.

I feel this will be useful for anyone running tests that involves the use of WebGL and heavy graphics.
Other parts of application that do not use the WebGL is running fine on '--headless' mode.

I have attached the screenshots with the sample how long the difference is in running the tests.

Screen Shot 2022-01-26 at 8 19 51 am

Screen Shot 2022-01-26 at 8 19 44 am

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions