Search Issue Tracker
Active
Votes
0
Found in [Package]
1.1.14
Issue ID
DSTR-44
Regression
No
Body of UnityTest method does not always execute when using SetUp method to EnterPlayMode
Body of UnityTest method does not always execute when using SetUp method to EnterPlayMode
1. What happened
I noticed I had a test that was reported as 'pass' when I though it should failing. It appeared as though the body of the test method wasn't being executed. After investigating I have a situation where a test will fail the first time it is ran, but subsequent runs 'pass'. This happens when a UnitSetup and UnityTearDown methods are using to enter and exit PlayMode. See attached source code file 'EditModeTests.cs'
2. How we can reproduce it using the example you attached
1. After opening the project, open the Test Runner in 'EditMode' and click 'Run All'. Observe the test fails
2. Click 'Run All' again. Observe the test 'passes'.
3. Restart the editor or force a rebuild by making a code change.
4. Click 'Run All' again. Observe that steps 1 and 2 repeat.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [UIBuilder] Changes aren't detected on types implementing IList
- [HDRP] Text is rendered with artefacts when using STP and resolution scale is set a float value
- [Settings Search] Search results not matching search term correctly
- Crash on memcpy when opening a project that loads TSS files
- Multiple errors appear when compiling a ShaderGraph shader's code in a specific project
Add comment