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
- Shader transparency, discard, and clip are not working when using the Player
- Error is thrown when clicking on warning in the console
- Long IL2CPP build time when project has a .ufbx library wrapper
- Cursor doesn't change to the resizing when using the Rect Tool and the Sprite is too close to the bottom of the Scene View
- InvalidOperationException exception is thrown when Editor Default Text Rendering Mode is set to "Bitmap" and Editor Font is set to "System Font" and an array is expanded in the Inspector Window
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.