docs(dotnet): add test runner tabs to API testing and WebView2 guides - #42418
Merged
Conversation
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 Semikhatsky (yury-s)
approved these changes
Aug 26, 2026
Yury Semikhatsky (yury-s)
left a comment
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test-runnerstabs the other guides already use (MSTest / NUnit / xUnit / xUnit v3), covering hooks, attributes and assertion styles per runner.webview2.mdthe tabs live in a* langs: csharpsection, since that page is multi-language.WebView2Test.csbut declaredclass ExampleTest, while the next snippet extendedWebView2Test— renamed so the example compiles.Fixes microsoft/playwright-dotnet#3349