Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Editor PlayMode tests timing out when running in batchmode (Test Framework 1.3.2)

Discussion in 'Testing & Automation' started by Grigler_f, Jul 5, 2023.

  1. Grigler_f

    Grigler_f

    Joined:
    May 14, 2020
    Posts:
    24
    I'm attempting to setup some integration tests that follow the process of (LoadScene -> Trigger some behaviour -> Validate result of behaviour -> End). These tests are working correctly when the editor is not run with the -batchmode command line parameter, whether they are triggered manually or with the -runTests arguement. However if they are triggered with the -batchmode included as well, then they will all timeout with zero logs after loading the initial scene. Each test will be triggered and load its scene, but there will be no further execution of code as far as can be seen from the logs.

    The documentation for the test framework package doesn't mention any special considerations with batchmode, the only I've found is in relation to the WaitForEndOfFrame async function but that is not present.

    Is there anything else I can do to diagnose the issue? I've even attempted to run the test with the profiler dumping into a .raw file, in an attempt to find what is ticking before the timeout, but the result with just one test is too large for Unity to open without crashing.