Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Hidden Unit Test Failures

Discussion in 'Unity Build Automation' started by AlexNanomonx, Apr 10, 2018.

  1. AlexNanomonx

    AlexNanomonx

    Joined:
    Jan 4, 2017
    Posts:
    41
    Over the weekend my tests have started failing on Unity Cloud Build, but not when they're run locally in editor. This is not displayed in the Tests tab of the build, but when I download the XML, I can see that the error is that Assembly-CSharp-Editor-firstpass.dll "Has no TestFixtures".

    I'm open to the idea that this is related to something I did, as I can still build some other configurations, but even so I'm guessing Cloud Build shouldn't be failing tests and hiding the failure. It probably also shouldn't be failing when local tests pass.

    The main culprit seems to be our android build, but I haven't done enough work to try and reproduce on other build to know if it's android per se, or just some other setting that's on our android build config.
     

    Attached Files:

  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    This was brought up a couple different places and it looks like it came down to using the Zenject dependency injection framework.

    Cloud Build is just running unit tests in batchmode which I'm sure will fail locally the same way for you as well (see "Running from the Command Line" here: https://docs.unity3d.com/Manual/testing-editortestsrunner.html). And you're right, the dashboard should show those failures better - it's not really expecting tests to be run in "Assembly-CSharp-Editor-firstpass.dll" which is where this error shows up, but we'll get it fixed.

    The team that works on the Test Runner in the editor is aware of the issue and has been fixed in 2018.2, but for older versions of the editor you will probably need to open an issue with the Zenject developers.