Tooling AI in .NET Testing
The Shift

AI can generate code faster than any team — but generating code and validating it are two completely different problems. Uno Platform's MCP Servers bring Playwright-style UI automation to native .NET cross-platform apps, closing the loop on agentic development.

Code is cheap. Software is not.

That might sound like a contradiction in the age of AI – where any developer can spin up hundreds of lines of code in seconds with a simple prompt. But here's the reality: generating code is easy. Knowing that code actually works is a completely different challenge.

AI can write UI code faster than any human team. But it can't inherently validate what it builds. That's the gap. UI testing and validation is the only reliable way to know your app behaves the way it's supposed to – and as agentic workflows become the norm, tooling automation for testing isn't just nice to have. It's essential.

Playwright

Playwright – The Gold Standard for Web UI Testing

If you're a web developer and you haven't heard of Playwright, it's worth your immediate attention. Playwright is a powerful, open-source framework for browser automation and end-to-end testing – built by Microsoft and designed for the modern web.

While Playwright's CLI and test runner are genuinely useful, what makes Playwright exceptional in agentic workflows is the Playwright MCP. This is where things get interesting for developers leaning into AI-assisted development.

Playwright MCP gives AI agents the ability to interact with web UIs in real-time – clicking, typing, navigating, and reading the DOM just like a real user would. Developers can test and script UI automation through natural language, letting agents handle the heavy lifting of browser interaction without writing brittle selectors by hand. It works across Chromium, Firefox, and WebKit – and it's agnostic of IDE and AI agent. Whether you're in VS Code, Cursor, or running Claude from the terminal, Playwright MCP slots right in.

There's just one constraint – and it's a meaningful one. Playwright is a web-only story. If you're building native desktop or mobile apps, you're on your own.

Cross-Platform

Playwright for .NET Cross-Platform Apps

So what happens when your app isn't a web app?

What if you're building a native desktop application for Windows, macOS, or Linux? A mobile app targeting iOS and Android? Or rendering your UI through a graphics library like SkiaSharp – where there's no browser DOM to inspect at all?

This is exactly where Uno Platform steps in. Uno Platform is the cross-platform .NET solution for building native apps from a single codebase – targeting WebAssembly, desktop (Windows, macOS, Linux), and mobile (iOS, Android). And for developers working in agentic workflows, Uno Platform provides its own suite of MCP Servers that bring Playwright-style intelligence to native .NET apps.

Let's unpack what's available.

The Docs MCP (Remote)

The Uno Platform Docs MCP is remotely hosted and serves two critical purposes for agentic development: keeping agents grounded in the latest documentation and best practices – right from your IDE or terminal – and providing predefined prompts like /new (scaffold a new Uno Platform app with best practices baked in) and /init (prime an existing chat session with Uno's development conventions).

The Docs MCP tools available to agents are:

  • uno_platform_docs_search – Searches for specific Uno Platform topics and returns relevant snippets. Think of it as giving your agent a live connection to the Uno docs.
  • uno_platform_docs_fetch – Fetches a full documentation page, typically used after docs_search to get complete context on a specific topic.
  • uno_platform_agent_rules_init – Primes the agent on how to interact with Uno Platform apps during development. Essential for first-time agent setup in an Uno project.
  • uno_platform_usage_rules_init – Primes the agent on how to use Uno Platform APIs correctly and idiomatically.
Why This Goes Beyond Playwright

Playwright gives agents hands to interact with your UI. The Docs MCP gives agents a brain – one that's always up to date with the actual platform it's building on. Combined, you get an agent that writes correct code and can verify it works.

The App MCP (Local)

The App MCP is where the Playwright parallels really click. This is a locally-running MCP server that gives AI agents direct, interactive access to your running Uno Platform application – eyes and hands for agents to validate their work in real-time.

The tools available under the Community license include:

  • uno_app_get_runtime_info – Gets general information about the running app: PID, OS, platform target, and more.
  • uno_app_get_screenshot – Captures a screenshot of the running app so agents can visually validate the UI.
  • uno_app_pointer_click – Clicks at X,Y coordinates in the app – just like a user would.
  • uno_app_key_press – Types individual keys, with optional modifiers (Shift, Ctrl, etc.).
  • uno_app_type_text – Types long strings of text into controls.
  • uno_app_visualtree_snapshot – Returns a textual representation of the app's visual tree – giving agents structural insight into the UI, even when rendered through Skia.
  • uno_app_element_peer_default_action – Executes the default automation peer action on a UI element.
  • uno_app_close – Closes the running app.

Pro license users also get access to uno_app_element_peer_action and uno_app_get_element_datacontext for even deeper runtime inspection and DataContext visibility.

In Action

Let's See It in Action

Talk is one thing – watching it work is another. Here's a live look at Uno Platform's MCP tools at work in a real agentic development workflow:

Agentic Workflows

Validation Automation in Agentic Workflows

Modern agentic workflows demand solid upfront specs. The quality of what an AI agent builds is directly tied to the clarity of what it's been asked to build – context is everything.

But specs alone aren't enough. The more important question is: did the agent actually build what was asked?

Whether your UI is hand-coded by a developer or wired up entirely by an AI agent, Uno Platform's MCP tools can verify that UI features meet expectations in native .NET apps. An agent can click a button, verify the resulting state, screenshot the output, and walk the visual tree – all without a human in the loop.

The Complete Loop

Developers can use these MCP tools to automate entire UI and integration testing suites – letting agents not just build features, but validate them end-to-end. The same workflow that generated the code can be the workflow that signs off on it. Specify → Build → Test → Verify. All in one agentic flow.

Playwright set the bar for web UI test automation. Uno Platform's MCP servers raise that bar for native .NET cross-platform apps – and pair it with documentation-aware agents that know the platform as well as you do.

If you're building .NET apps and leaning into agentic development, this is the toolchain worth exploring. Cheers, developers! 🚀