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

  1. michaelallison_lp

    Feb 13, 2024 15:05

    Still seeing this in 2022.3.18

  2. chantey

    May 20, 2022 05:58

    Still getting this in 2021.3.2f1

  3. JacobK

    Aug 06, 2021 09:59

    Still happening in 2020.3.14f1, Test Framework 1.1.27

  4. g05u

    Jun 20, 2021 00:21

    Still in Unity 2021.1.11f1

  5. c8theino

    Mar 25, 2021 07:38

    Still happening in Unity 2019.4.19f1.

  6. Haapavuo

    Jan 31, 2021 14:35

    Still happens on Unity 2020.1.17f1.

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

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

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

  10. eelstork

    Jul 01, 2020 04:08

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

Add comment

Log in to post comment