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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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.