modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.23k stars 297 forks source link

No launch error output using Playwright + summaryReporter #2796

Open miyasudokoro opened 2 months ago

miyasudokoro commented 2 months ago

I followed the instructions on https://modern-web.dev/docs/test-runner/browser-launchers/playwright/. However, when I ran it, I had no output at all in the console, only "Process finished with exit code 1." After playing around with the configurations, I discovered that removing the summaryReporter allowed the error being thrown by Playwright to be written to the console. The error was "browserType.launch: Executable doesn't exist at C:\path-redacted\chrome.exe".

As an aside, the documentation at that page is insufficient for setting up Playwright -- it should probably say "npm init playwright@latest" or something like that, I still haven't gotten it installed correctly -- but I am mainly concerned with the communication of launch errors when using summaryReporter.

Here is pretty much what my configurations look like at the moment. The options other than reporters make no difference.

export default {
  coverage,
  coverageConfig,
  manual,
  debug,
  plugins: [
        importMapsPlugin( {
            inject: {
                importMap: getImportMap()
            }
        } )
    ],
   // reporters: [
   //      summaryReporter()
   // ],
   browsers: [
     playwrightLauncher({ product: 'chromium' }),
     playwrightLauncher({ product: 'firefox' })
     // my product does not support webkit
   ],
};
gian1200 commented 2 months ago

Could be something related to importMapsPlugin. I have a quite complex web-test-runner.config.mjs with summaryReporter and it finishes without errors (I do not have importMapsPlugin, I use legacy and inject).

I do have a different issue where summaryReporter shows undefined test names; but it's not related to your issue (https://github.com/modernweb-dev/web/issues/2780)

image