avalonia-testing

Validate Avalonia apps with ViewModel unit tests and headless UI tests.

27|2|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avalonia-testing
Source: https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-testing
Command: npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Testing Avalonia applications can be challenging because it often requires either UI rendering or separate ViewModel verification. This skill provides both headless UI test workflows and ViewModel unit testing guidance to verify logic, UI interactions, and infrastructure without a visible display.

Core Features & Use Cases

  • ViewModel unit tests (no UI) to validate business logic and state changes.
  • Headless UI tests using Avalonia.Headless for rendering and interaction without a visible window.
  • Setup guidance for Avalonia test infrastructure, including necessary packages and test project configuration.

Quick Start

Configure a headless test environment and run your first Avalonia UI test.

Frequently Asked Questions about avalonia-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run headless UI tests for Avalonia applications?

Headless UI tests for Avalonia applications run using Avalonia.Headless to render and interact with UI components without a visible window. You configure the test environment using TestAppBuilder to verify UI behavior in continuous integration pipelines.

Do I need a display server to test Avalonia UI behavior?

No display server is needed to test Avalonia UI behavior. Avalonia.Headless provides a virtual rendering environment, allowing you to validate UI interactions and infrastructure without a visible window on headless machines.

Can I test Avalonia ViewModels separately from the UI?

Yes, you can test Avalonia ViewModels separately from the UI using unit tests. This approach validates business logic and state changes independently, before verifying visual interactions through headless UI tests.

What is the best way to verify Avalonia MVVM logic in continuous integration?

The best way to verify Avalonia MVVM logic in continuous integration is combining ViewModel unit tests with headless UI tests. This setup validates both state changes and UI rendering without requiring a physical display.

How does Avalonia headless testing handle test infrastructure setup?

Avalonia headless testing handles test infrastructure setup by defining configuration steps with TestAppBuilder. It requires installing Avalonia.Headless and related test frameworks like xUnit to configure the test project properly.

Why use xUnit for Avalonia headless UI testing?

xUnit is used for Avalonia headless UI testing to execute test cases against the headless rendering environment. It works with Avalonia.Headless to validate UI behavior and ViewModel state changes within continuous integration pipelines.