Search Issue Tracker

Fixed in 2018.1.X

Fixed in 2017.1.X, 2017.2.X, 2017.3.X

Won't Fix in 5.6.X

Votes

3

Found in

5.6.1p4

Issue ID

945000

Regression

No

"TestRunner" "PlayMode" test leaves behind "InitTestScene..." scene assets after test runs

Unity Test Runner

-

Reproduction steps:

1. Create a New Project
2. "Window" -> "Test Runner"
3. "PlayMode"
4. "Enable Playmode tests"
5. Restart Editor
6. "Create Playmode tests with methods"
7. Spam "Run All"

Fixed in: 2018.1.0a7

Expected Result: Spamming isn't allowed and only one test at a time is run, with only one temporary scene created for that one test
Actual Result: Only one test is run, but multiple scenes are created, leaving all untested scenes in the assets folder

Reproduced with: 2017.8.0a1, 2017.3.0b4, 2017.2.0f3, 2017.1.2p1, 5.6.4f1, 5.6.0f3
Did not reproduce on: 5.5.5f1(Play Mode tests were only implemented in 5.6)

Note:
Reproduced on both Windows 10 and mac 10.12.6

Comments (15)

  1. 462eeb31e470afbf9fb01e669a69d687?d=mm

    c8theino

    Mar 25, 2021 07:38

    Still happening in Unity 2019.4.19f1.

  2. 689e3a29d94289e589fbd141eb34e648?d=mm

    Haapavuo

    Jan 31, 2021 14:35

    Still happens on Unity 2020.1.17f1.

  3. 005e48a595d2620e2e64de4dc1e9d5be?d=mm

    sang

    Dec 25, 2020 11:53

    This is still present in 2019.4.16. I also see an error message in the console: NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.TestTools.TestRunner.PlaymodeLauncher+BackgroundWatcher.OnPlayModeStateChanged. Framework version 1.1.19

  4. 88aee9c88155ee5ee386c2dd067b9415?d=mm

    jreigota

    Dec 11, 2020 16:17

    Still happening, very easy to repro:
    Create a playmode unit test that OPENS an existing scene (addictively) and when the test finish the InitTestScene is left behind.

  5. 59661375eb917e9882a1ee0044eceaae?d=mm

    RoutineAyhan

    Sep 21, 2020 08:08

    This happens to me in 2020.1f1 as well. I'm using the SceneManager to open existing scenes to test those with runtime tests, but now I have a bunch of these "InitTestScene" files under the assets folder.

  6. B217db483c36786ffc8a39e28d6ec584?d=mm

    eelstork

    Jul 01, 2020 04:08

    Seeing this in Unity 2019.3.3f1 - how is this "resolved"?

  7. 482cfff1c21068a8f1846c9e632908b9?d=mm

    DrummerB

    May 06, 2020 17:40

    Still happening. Unity 2019.3.0f6, Test Framework 1.1.14.
    It doesn't happen always, but after some time I end up with lots of InitTestScene scenes in my Assets folder.

  8. 268e488556c0e9e604ef13d23f63ce62?d=mm

    ModLunar

    Apr 30, 2020 20:55

    Still occurs for me on Unity 2019.3.10f1 with Unity Test Framework 1.1.13

  9. 19f8516b8d7ddeaba3a76e6c0e6f3f53?d=mm

    eliatlas1

    Feb 28, 2020 11:07

    I have this issue as well. I am using Mac, Rider, Unity 2019.3.0f6 Personal

  10. B32815a072184bbaa44617dd58d542a5?d=mm

    Erenquin

    Feb 12, 2020 13:03

    Hello,
    using Unity 2019.3 and this issue occurs.
    Not sure if it happended on the previous version I used (2019.2).

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.