Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Automating Editor UI Tests

Discussion in 'Extensions & OnGUI' started by Qubitz, Jan 8, 2019.

  1. Qubitz

    Qubitz

    Joined:
    Jan 27, 2017
    Posts:
    3
    TL;DR - Does Unity support or does Unity have plans to support Microsoft's UI Automation accessibility framework?

    I love writing Unity editor scripts, but find myself unable to test my editor UI in Unity's editor. A common approach is using computer vision to visually navigate UI tests, but many more experienced than myself will warn against this method. Using the Windows 10 SDK's Inspect.exe, it seems that Unity supports neither Microsoft's UI Automation nor the Microsoft Active Accessibility frameworks, blocking access to automate UI tests for engineers and screen readers for the disabled.

    How does the Unity QA team test editor UI internally and is there any good alternatives?
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    497
    As Unity's UI is not based on WPF, I doubt that they will be capable of supporting MS UI Automation. As I'm not really sure what blind users would do with the unity editor, I question the benefit of supporting it for that purpose.

    For functionality apart from the UI, Unity has built-in unit testing utilities. Their future plans to move over to a retained mode system for editor UI will eventually make it easier to separate functionality from the UI.

    If you have the patience and desire, you could probably write an autohotkey script to automate certain actions.

    In the meantime, the good old fashioned "click on everything" approach is your best bet.