Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.0.1-pre.18
Issue ID
DSTR-948
Regression
No
UnityTest tests fail when an external Coroutine method is used
Reproduction steps:
1. Open the attached project “TestFail”
2. Open the Test Runner (Windows > General > Test Runner)
3. In the Test Runner window press the “Run All” button
4. Wait until the test finishes without moving or clicking mouse buttons
5. Inspect the Test Runner and Console windows
Expected result: The Test Runner window shows that the test was successful and the Console window only shows messages from the test
Actual result: The Test Runner window shows that the test failed and the Console window shows an error saying “Current test timed out”
Reproducible with: 1.1.29 (2021.3.32f1), 1.3.9 (2021.3.32f1, 2022.3.12f1, 2023.1.19f1, 2023.2.0b16, 2023.3.0a12), 2.0.1-pre.18 (2022.3.12f1)
Couldn’t test with: 2.0.1-pre.18 (2023.1.19f1, 2023.2.0b16, 2023.3.0a12) - Errors from package” “Library/PackageCache/com.unity.test-framework@2.0.1-pre.18/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs(5,17): error CS0619: 'XboxOneDeployMethod' is obsolete: 'The XDK Xbox One platform was removed in 2021.1'“
Reproducible on: macOS 13.5.2
Not reproducible on: No other environment tested.
Notes:
- The test finishes successfully if some kind of input is given to the Editor while the test is running
- Sometimes the test finishes successfully without giving any input
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The type selector in the UI Builder does not display primitive types when trying to select one in the "Select Type…" window
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
Resolution Note:
The reported project relies on a StartCoroutine call in the WebLoader. StartCoroutine only works in PlayMode and does not get iterated on in EditMode. If the test in question is converted to playmode, or if a pair of EnterPlayMode and ExitPlayMode commands are added to the start and beginning of the test, then it works.
Alternatively if the enumerator in WebLoader is exposed in a way that the test can iterate on it, then it can be yielded right back to the test framework.