Skip to content

docs(dotnet): add test runner tabs to API testing and WebView2 guides - #42418

Merged
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-3349
Aug 26, 2026
Merged

docs(dotnet): add test runner tabs to API testing and WebView2 guides#42418
Dmitry Gozman (dgozman) merged 1 commit into
microsoft:mainfrom
dgozman:fix-3349

Conversation

@dgozman

Copy link
Copy Markdown
Collaborator

Summary

  • The API testing and WebView2 guides only had MSTest examples — wrapped their .NET snippets in the same test-runners tabs the other guides already use (MSTest / NUnit / xUnit / xUnit v3), covering hooks, attributes and assertion styles per runner.
  • In webview2.md the tabs live in a * langs: csharp section, since that page is multi-language.
  • Drive-by: the WebView2 base class snippet was titled WebView2Test.cs but declared class ExampleTest, while the next snippet extended WebView2Test — renamed so the example compiles.

Fixes microsoft/playwright-dotnet#3349

The API testing and WebView2 guides only showed MSTest examples. Wrap
their .NET snippets in the same `test-runners` tabs the other guides use,
with MSTest, NUnit, xUnit and xUnit v3 variants covering hooks,
attributes and assertion styles.

Also fixes the WebView2 base class, which was named `ExampleTest` while
being extended as `WebView2Test`.

Fixes: microsoft/playwright-dotnet#3349

@yury-s Yury Semikhatsky (yury-s) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modern agents will easily adapt the example to any of the runners, so I'm not sure how much value we get by adding all these examples.

@dgozman
Dmitry Gozman (dgozman) merged commit 35fcef2 into microsoft:main Aug 26, 2026
3 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.

[Docs]: Describe examples in NUnit, XUnit, not just MSTest

2 participants