microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.78k stars 3.58k forks source link

[Feature]: UI Mode - Auto run tests #32115

Open nwparker opened 1 month ago

nwparker commented 1 month ago

🚀 Feature Request

To be able to run tests automatically (instead of an explicit start) using UI mode

Detailed requirements:

Example

npx playwright test --ui --auto-run

CLI Documentation: --auto-run: 'When running in UI mode, starts running tests when first started"

Motivation

I want to be able to run this command and see the progress my tests on a CI

Today, the ui mode will load, but it requires going into the interface and clicking the ▶️ icon This would remove that extra step and runs the tests

AmethystLiang commented 1 month ago

+1

pavelfeldman commented 1 month ago

I want to be able to run this command and see the progress my tests on a CI

What do you mean on a CI? There is no UI Mode on a CI, please use one of our reporters (HTML).

nwparker commented 1 month ago

I want to be able to run this command and see the progress my tests on a CI

What do you mean on a CI? There is no UI Mode on a CI, please use one of our reporters (HTML).

Thank you for the reply, @pavelfeldman

I should rephrase. By CI, in my case, I mean a headless docker machine that I have control over (including networking).

On such a headless Docker environment, you can run --ui-host or --ui-port (reference)

The idea here is that with using the above option in a headless Docker environment, you will be able to see a live visual view into the running on the tests if you were to connect to this host/port from the the outside. Whereas with the HTML report as mentioned, you would only be able to see the results afterwards.

Please let me know if you have further questions and I'd be more than happy to elaborate