Skip to content

Testing: Add Windows UI automation tests (FlaUI) #23

Description

@Geogboe

Issue Description

Add Windows desktop UI automation tests for xBeacon using the existing .NET/xUnit stack. This enables local, repeatable validation of WPF/WinForms UI flows (dashboard, tray interactions, status indicators) without manual testing.

Why FlaUI (vs WinAppDriver)

  • No external service: FlaUI is a pure .NET library; WinAppDriver requires installing and running a separate driver service.
  • Simpler local dev loop: tests can run with dotnet test without extra setup.
  • Great fit for WPF/WinForms: FlaUI UIA3 works well for desktop UI automation in .NET apps.
  • Lower maintenance: fewer moving parts in CI and for contributors.

When WinAppDriver still makes sense

  • You already use Appium/WebDriver elsewhere.
  • You need WebDriver tooling or cross‑language test clients.
  • You want to standardize on a single driver protocol.

Proposed Implementation Plan

  1. Create a new test project tests/xBeacon.Tests.UI targeting net8.0-windows with xUnit.
  2. Add FlaUI packages (FlaUI.Core, FlaUI.UIA3) and a helper to launch/attach to xBeacon.Windows.
  3. Add smoke UI tests:
    • App launches and dashboard opens (either via test flag or direct window handle).
    • Status indicator renders expected state.
    • Basic notifications list renders without error.
  4. Add a --ui-test flag or test config to run app in deterministic mode.
  5. Document local test steps and note CI requirement (self‑hosted Windows runner with desktop session).

Acceptance Criteria

  • At least 2–3 UI smoke tests pass locally on Windows 11.
  • Tests can launch and close xBeacon cleanly without leaving processes.
  • Docs explain how to run UI tests locally.

Files/Areas Likely Affected

  • New test project under tests/
  • src/xBeacon.Windows (optional test mode flag)
  • Documentation updates for running UI tests

Notes

  • Current test framework is xUnit (tests/WinBeacon.Tests.Unit/WinBeacon.Tests.Unit.csproj).
  • WinAppDriver remains a viable alternative if we need WebDriver tooling later.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions