microsoft / playwright-testing-service

MIT License
84 stars 13 forks source link

[BUG]: Reporting fails silently when browserName is not set in config #133

Open cthlo opened 3 days ago

cthlo commented 3 days ago

Describe the bug When browserName option is not set in config, test reporting will fail silently

❯ npx playwright test --project=project_1 -c ./playwright.service.config.ts

Running 3 tests using 3 workers

     1 [project_1] › some/test/test1.spec.ts:50:3 › test case 1
     ....

  3 passed (5.8s)

Uploading test results.
Test report: https://playwright.microsoft.com/workspaces/westus3_...

I'm guessing it's failing here: reporterUtils.ts#L161

To Reproduce Steps to reproduce the behavior:

  1. Leave out browserName option in Playwright config
  2. Opt out of cloud hosted browser in Microsoft Playwright Testing service config: useCloudHostedBrowsers: false
  3. Include @azure/microsoft-playwright-testing/reporter reporter in config

Expected behavior Error thrown to indicate that browserName is required, or upload test results without browser name, or maybe use an alternative way (if there's one) to get the browser name.

Setup information (please complete the following information):

vvs11 commented 3 days ago

Hi @cthlo Thanks for reporting this. We are looking into this and will share an update soon