Skip to content

feat(xunit.v3): add LaunchOptionsAsync override#3304

Merged
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3249
May 1, 2026
Merged

feat(xunit.v3): add LaunchOptionsAsync override#3304
dgozman merged 1 commit intomicrosoft:mainfrom
dgozman:fix-3249

Conversation

@dgozman
Copy link
Copy Markdown
Collaborator

@dgozman dgozman commented May 1, 2026

Summary

  • Adds a virtual LaunchOptionsAsync() to Microsoft.Playwright.Xunit.v3.BrowserTest, mirroring the existing ConnectOptionsAsync() pattern, so tests can override BrowserTypeLaunchOptions programmatically without .runsettings.
  • When the override returns non-null, it replaces PlaywrightSettingsProvider.LaunchOptions; when it returns null, the runsettings-derived options are used as before.
  • Adds a harness test in xunit.v3.spec.ts exercising the override path.

Closes #3249
Supersedes #3248

Allows tests to override BrowserType launch options programmatically,
mirroring the existing ConnectOptionsAsync pattern.

Closes microsoft#3249
@dgozman dgozman merged commit 6233377 into microsoft:main May 1, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Allow convenient browser option changes in XUnit v3 without .runnsettings in the new Microsoft Test Platform

2 participants