Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

TeamCity integration Test Runner fails

Discussion in '2020.1 Beta' started by Sibz9000, Apr 7, 2020.

  1. Sibz9000

    Sibz9000

    Joined:
    Feb 24, 2018
    Posts:
    149
    Hi,

    I am trying to get the Test runner to work with team city. I have had it running in the past but this is a fresh windows install. Also I have updated from Unity2019 to this release.

    TeamCity builds Ok. But then when the tests run, the package manager exits with code 255 causing a failure of that build step. The tests run fine and pass.

    I have logged the issue with the TeamCity Unity Plugin repository, but I though it wouldn't hurt to post here to see if anyone has any ideas.

    The line on the log that concerns me is:
    [Package Manager] Server::Kill -- Server was shutdown
    Which is then followed by the exit code 255.

    Here is the Issue I have created:
    https://github.com/JetBrains/teamcity-unity-plugin/issues/44
     
  2. Sibz9000

    Sibz9000

    Joined:
    Feb 24, 2018
    Posts:
    149
    Solved:
    I have solved this, but will post my solution here for prosperity:
    I am using the Unity NetCode package. But to test in edit mode I needed to run the boot strapper manually, also I figured I needed it to be an editor world so I had the following code in a OneTimeSetup method:

    Code (CSharp):
    1. DefaultWorldInitialization.Initialize("DefaultTestWorld", true);
    2. new ClientServerBootstrap().Initialize("DefaultTestWorld");
    Not sure if it's because it was an editor world, or because I am initializing the default world twice. But I had found out already the world doesn't update in editor mode unless the editor is doing something, so I was manually updating the world systems for test anyway. I removed the first line and the Exit code 255 went away.