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 (17)

  1. Ff92ee9a87fa09c67b89dc9f6fb0c258?d=mm

    JacobK

    Aug 06, 2021 09:59

    Still happening in 2020.3.14f1, Test Framework 1.1.27

  2. 369eb8974f11e186fbf2f709c8270b27?d=mm

    g05u

    Jun 20, 2021 00:21

    Still in Unity 2021.1.11f1

  3. 462eeb31e470afbf9fb01e669a69d687?d=mm

    c8theino

    Mar 25, 2021 07:38

    Still happening in Unity 2019.4.19f1.

  4. 689e3a29d94289e589fbd141eb34e648?d=mm

    Haapavuo

    Jan 31, 2021 14:35

    Still happens on Unity 2020.1.17f1.

  5. 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

  6. 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.

  7. 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.

  8. B217db483c36786ffc8a39e28d6ec584?d=mm

    eelstork

    Jul 01, 2020 04:08

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

  9. 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.

  10. 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

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.