Search Unity

Question Creating a custom standalone test player

Discussion in 'Testing & Automation' started by dhavatar, Mar 24, 2022.

  1. dhavatar

    dhavatar

    Joined:
    Dec 17, 2018
    Posts:
    1
    I'm currently working on a project that involves making a standalone player for running tests so I can distribute it to different platforms, but I'm running into some issues. Currently, using test runner, you can build a standalone and modify the test build options by using ITestPlayerBuildModifier, but there's limitations to it.
    1. Is it possible to create a standalone test player that doesn't show the results in a separate scene? I'm implementing ITestRunCallback and storing/sending the results myself and would rather not have it load an extra ending scene at the end.
    2. Can I specify the tests I want to run in a standalone player through a script? My idea was to have custom menus that could create a standalone test build with certain tests, but from what I can tell, the TestRunnerApi only exists in the editor and I don't see a way to do it for the standalone player. The button in test runner that does "build/run selected tests" seems to be able to do it, but I don't know if I have access to what it does in a script.