GoogleChromeLabs / web-audio-samples

Web Audio API samples by Chrome Web Audio Team
https://bit.ly/web-audio-samples
Apache License 2.0
695 stars 197 forks source link

Research various JS testing frameworks #365

Closed hoch closed 4 months ago

hoch commented 6 months ago
hoch commented 6 months ago

@terryzfeng @Kizjkre I think we can use this issue to record/document the research. What do you think?

hoch commented 6 months ago

This looks pretty comprehensive, but I haven't checked on how to capture/analysis audio output: https://playwright.dev/

hoch commented 6 months ago

Some criteria to consider:

terryzfeng commented 6 months ago

Base Questions: Which test frameworks are:

  1. Easy to use / documented
  2. Realtime use and Headless (for CI)
  3. Uses actual audio driver
terryzfeng commented 5 months ago

Here is the research/findings/documentation I have for the Playwright framework. Learning Playwright became quite involved and I needed to write myself a README.

https://docs.google.com/document/d/1e7G9jc4kuVZWvjylTtFE76DzQBsOG6lZSFmV19Kc5cY/edit

Kizjkre commented 5 months ago

The two branches in this repo has two prototypes: one using Puppeteer and one using just client-side code.

https://github.com/Kizjkre/puppeteer-webaudio-test

Kizjkre commented 5 months ago

--autoplay-policy=no-user-gesture-required is a pretty useful argument to have.

terryzfeng commented 5 months ago

@Kizjkre I added no-user-gesture-required which worked with Chrome but it doesn't look like Firefox supports it, so the tests weren't compatible.. I couldn't quite figure out the flags

terryzfeng commented 5 months ago

Linking the PR for Playwright: https://github.com/GoogleChromeLabs/web-audio-samples/pull/368