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

Package: DS - Unity Test Framework

-

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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.