Search Issue Tracker

Fixed

Votes

0

Found in [Package]

1.1.30

Issue ID

DSTR-430

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 

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.