Search Unity

Question Show and run EditorTests window from Script?

Discussion in 'Testing & Automation' started by khartsook, Nov 30, 2016.

  1. khartsook

    khartsook

    Joined:
    Jun 6, 2013
    Posts:
    1
    Hi all,

    From an editor menu item, I'd like to be able to open the Editor Tests Runner window, run all the tests with success/fail visualization in the window as if I had pressed the "Run All" button, and gather the results via callback so I can aggregate them with other tests we are running through other frameworks.

    Is any of this possible?

    Looking through the API, I see that I can use UnityEditor.EditorTests.Batch to run all of my tests and gather the results, but it seems like I would have to develop my own UI if I want to show any of these results visually.

    The API for UnityEditor.EditorTestsRunner only seems to have the EditorTestsWithLogParser class: https://docs.unity3d.com/ScriptReference/EditorTestsRunner.EditorTestsWithLogParser.html

    Thanks for your help!