web icon indicating copy to clipboard operation
web copied to clipboard

No launch error output using Playwright + summaryReporter

Open miyasudokoro opened this issue 5 months ago • 1 comments

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
   ],
};

miyasudokoro avatar Aug 29 '24 18:08 miyasudokoro