Search Issue Tracker

Fixed

Fixed in 1.1.33

Votes

6

Found in [Package]

1.1.30

Issue ID

DSTR-428

Regression

No

[Test Runner][Android] Test runners fails to connect properly to Android devices while in batch mode

Package: DS - Unity Test Framework

-

Reproduction steps:
1. Download the attached user's project "MiniTestRunner.zip"
2. Change the paths of this command:
"C:\\Program Files\\Unity\\Hub\\Editor\\2021.2.7f1\\Editor\\Unity.exe" -runTests -batchmode -projectPath C:\\Dev\\MiniTestRunner -testResults C:\\Dev\\MiniTestRunner\\TestResults.txt -testPlatform Android -logFile C:\\Dev\\MiniTestRunner\\TestEditor.txt
3. Run the above command with the relevant parts modified to your setup with a Android device connected

Expected result: Test runner does not fail with an Android device connected
Actual result: "TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching" is outputted in "TestEditor.txt"

Reproduces on: Test-framework 1.1.30 (2021.2.9f1, 2022.1.0b6, 2022.2.0a3)
Could not test below Test-framework 1.1.30 and above due to getting "Player Build Failed" when I try to run batch mode
Could not test below 2021.2 due to errors when downgrading

Stack trace from "TestEditor.txt" log:
TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching
  at UnityEditor.TestTools.TestRunner.AndroidPlatformSetup.PostSuccessfulLaunchAction () \[0x00071] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlatformSetup\\AndroidPlatformSetup.cs:56 
  at UnityEditor.TestTools.TestRunner.PlatformSpecificSetup.PostSuccessfulLaunchAction () \[0x0001e] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlatformSetup\\PlatformSpecificSetup.cs:92 
  at UnityEditor.TestRunner.TestLaunchers.RemoteTestRunController.PostSuccessfulLaunchAction () \[0x00001] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\RemotePlayerTestController.cs:107 
  at UnityEditor.TestTools.TestRunner.PlayerLauncher.Run () \[0x00168] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlayerLauncher.cs:97 
  at UnityEditor.TestTools.TestRunner.TestRun.Tasks.LegacyPlayerRunTask+<Execute>d__0.MoveNext () \[0x000bb] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestRun\\Tasks\\LegacyPlayerRunTask.cs:14 
  at UnityEditor.TestTools.TestRunner.TestRun.TestJobRunner.ExecuteStep () \[0x00088] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestRun\\TestJobRunner.cs:124 

Comments (1)

  1. suchaolishou

    Apr 22, 2022 08:51

    This issue also reproduce on Test Framework 1.1.31

    TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching UnityEditor.TestTools.TestRunner.AndroidPlatformSetup.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs:56) UnityEditor.TestTools.TestRunner.PlatformSpecificSetup.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs:92) UnityEditor.TestRunner.TestLaunchers.RemoteTestRunController.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs:107) UnityEditor.TestTools.TestRunner.PlayerLauncher.Run () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs:99) UnityEditor.TestTools.TestRunner.TestRun.Tasks.LegacyPlayerRunTask+<Execute>d__0.MoveNext () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs:14) UnityEditor.TestTools.TestRunner.TestRun.TestJobRunner.ExecuteStep () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/TestJobRunner.cs:124) UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:356)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.