Search Unity

[Test Runner] Unity Cloud Build not running Tests

Discussion in 'Unity Build Automation' started by Dolzen, Jan 6, 2020.

  1. Dolzen

    Dolzen

    Joined:
    Mar 26, 2014
    Posts:
    90
    Hey there everyone!

    I'm trying to figure out why my Unity Cloud Builds are not running the tests I have in my project, I have this setup in Unity Cloud target:

    upload_2020-1-6_11-38-41.png

    However every time I build a new target I can't even see the "Tests" tab:

    upload_2020-1-6_11-39-38.png

    The build is successfully completed without detecting my tests.

    Im setting up the tests like this:

    Code (CSharp):
    1. using System.Collections;
    2. using NUnit.Framework;
    3. using UnityEngine.TestTools;
    4. using System.Threading.Tasks;
    5.  
    6. namespace Some.Namespace
    7. {
    8.     [TestFixture]
    9.     public class CoreBasicTests : TestsMain
    10.     {
    11.         [Order(1)]
    12.         [UnityTest]
    13.         [Timeout(300000)]
    14.         [Description("Some description")]
    15.         public IEnumerator TestInitGame()
    16.         {
    17.             Task task = TestInitGameLogic();
    18.             while (!task.IsCompleted) { yield return null; }
    19.  
    20.             Assert.IsFalse(task.IsFaulted, "TestException: " + task.Exception);
    21.         }
    22. }
    I'm testing if the game is initializated, everything works fine within the editor but the tests are not being detected on Unity Cloud, I don't know if I have to manually activate the tests or what.

    Any help would be appreciated!

    Update:

    The "Tests" tab has appeared but it only display "EditMode tests" which I don't have any, I'm so confused :(

    upload_2020-1-6_11-53-29.png

    I have enabled play mode tests for all assemblies.
     

    Attached Files:

    Last edited: Jan 6, 2020