Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.1.30
Issue ID
DSTR-402
Regression
No
[Test Runner] Consecutive tests results in play mode do not have fresh context
Reproduction steps:
1. Open Attached project "Tests"
2. Open PlayMode in Test Runner (Window -> General -> Test Runner -> PlayMode)
3. Run TestA
4. Run TestB
5. Run All
Expected result: Tests passed when run separately and when run together
Actual result: when passed together "TestB" failed.
Reproducible with: 1.1.29, 1.1.30 (2019.4.32f1, 2020.3.22f1, 2021.1.28f1, 2021.1.2f1, 2022.1.0a14)
-
Whatever560
Oct 28, 2021 14:24
Thanks for investigating on this. You can find additional infos on how we are working around it with a fork on Zenject test cleaner, although its not optimal because highly subject to each test details, loaded plugins, etc ...
https://github.com/modesttree/Zenject/pull/249
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
- Crash on ScriptableBatchRenderer::GenerateBuiltInCBuffer when opening a project after adding HDRP Samples to a specific project
- ArgumentException is thrown and reference is missing when deserializing and using MultiColumnListView
- “You may not pass in objects that are already persistent” error is thrown when entering the Play Mode and the "Active Input Handling" system was changed in a custom Build Profile
- [Linux] Assertion failed on expression 'success && actual == size' error is thrown when building project to another partition with a different file system
- Import Activity window shows "(None)" in the Asset field when changing the path of the asset
Resolution Note:
The Enter and ExitPlayMode commands are intended for EditMode tests. When run in PlayMode, it can give unintended effects. If we move the test into an EditMode test assembly, then it works as intended and both tests can be run after each other.
We are considering a more general solution, which will allow for automatically reload the scene after each test.