Search Unity

Question Is it possible to change the settings for an app built through "Run All Tests (Android)"

Discussion in 'Testing & Automation' started by Droife, Nov 2, 2023.

  1. Droife


    Nov 2, 2023
    I am currently trying to develop a set of PlayMode tests for a Meta Quest app. I can run the tests normally on the editor, but when I try to run them on a physical device, they get blocked as the Quest entitlement check blocks the app for not being properly registered to the user:

    Unable to find AppId for package (com.UnityTestRunner.UnityTestRunner)

    Is there any way to change the test runner build settings so that it uses the same app configuration as a "real" build to bypass this issue? Has anyone been able to find a different solution for this?
  2. nowsprinting


    Nov 3, 2014
    I know two solutions.

    1. Use ITestPlayerBuildModifier

    My example:

    2. Use IPrebuildSetup

    My example:

    ITestPlayerBuildModifier is only called before running tests on Player.

    IPrebuildSetup/IPostBuildTeardown is associated with the test method. It is called both in Editor and on Player.

    However, I have never tried changing the AppId.
    I hope it goes well!