playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature]: Do automatic incremental builds before running biditest

Open whimboo opened this issue 1 year ago • 3 comments

🚀 Feature Request

At the moment whenever I modify something in the Playwright code for WebDriver BiDi I have to manually do a full build of Playwright via npm run build before I'm able to run the tests again. I've missed that already some time and as such didn't see any changes to test results.

@yury-s would it be possible to automatically check which files have changed and do an incremental build so that only affected folders are build and not everything?

Example

No response

Motivation

This works pretty well with Puppeteer and makes it kinda seamless to work with, as well it saves time and resources. Thanks!

whimboo avatar Dec 06 '24 13:12 whimboo

'npm run watch'

pavelfeldman avatar Dec 06 '24 15:12 pavelfeldman

That would still require me to switch between tabs in my terminal because the watcher will run inside one tab, and I have to wait for the changes to be compiled before running the wanted test in the second tab.

The command I'm currently using to get test results reported to test-results/report.json with browser trace logs enabled for my custom Firefox build is:

CI=1 DEBUG="pw:browser" PWTEST_FIREFOX_USER_PREFS='{"remote.log.level":"Info"}' BIDIPATH=/Users/henrik/code/gecko-obj/opt/dist/Nightly.app/Contents/MacOS/firefox npm run biditest -- --project='bidi-firefox-nightly*' tests/page/locator-click.spec.ts

Or I just may not know yet how to better do it.

whimboo avatar Dec 06 '24 16:12 whimboo

The command looks good.

I have to wait for the changes to be compiled

For me, npm run watch is always so fast that I don't have to think about when it's done with compiling. It might be because i'm on an M3. Is it slower for you?

Skn0tt avatar Dec 06 '24 17:12 Skn0tt

No it's actually fast for me as well. So it sounds like this is the way to use it.

whimboo avatar Dec 09 '24 12:12 whimboo

Yeah, the incremental typescript builds are much faster than say browser builds, so we normally don't see any issues related to the speed of those. I'll close this issue, but feel free to ping us if it becomes a problem.

yury-s avatar Dec 09 '24 17:12 yury-s