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

5.5.0b5 Editor Test Runner - Undocumented Changes

Discussion in '5.5 Beta' started by wachowski1, Oct 3, 2016.

  1. wachowski1

    wachowski1

    Joined:
    Nov 7, 2014
    Posts:
    3
    The Editor Test Runner was updated in 5.5, but I can't find any mention of what changed anywhere. The UI changes are intuitive and explanatory, but the tool isn't detecting my test fixtures anymore...figuring it's something to do with my script.
     
  2. wachowski1

    wachowski1

    Joined:
    Nov 7, 2014
    Posts:
    3
    I fixed this by using Unity's new namespace and changing the attribute:

    Code (CSharp):
    1. using NUnit.Framework;
    2.  
    3. public class Example {
    4.  
    5.     [Test]
    6.     public void PassingTest() {
    7.         Assert.IsTrue(true);
    8.     }
    9.  
    10. }
    Code (CSharp):
    1. using UnityEngine.PlaymodeTests;
    2.  
    3. public class Example {
    4.  
    5.     [EditModeTest]
    6.     public void PassingTest() {
    7.         Assert.IsTrue(true);
    8.     }
    9.  
    10. }
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi wachowski1,
    Could you please file a bug report for this and reply with the case # in this thread? The namespace is not supposed to have changed.
     
  4. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
  5. wachowski1

    wachowski1

    Joined:
    Nov 7, 2014
    Posts:
    3
    Hi! My bug report case number is 838064.
     
  6. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Any news? All my tests are not displayed under "EditMode" tab.

    I need to change "[Test]" to "[EditModeTest"] in order to appear.
     
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    @N3uRo Could you please send us a bug report for this with a minimal reproduction case? We need more information to work on.
     
  8. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    You don't need a repro case. Any script placed in an "Editor" folder with a method with "[Test]" attribute (that was the basic step to start making tests) does not display in the "EditMode" tab but if I change "[Test]" to "EditModeTest]" it will appear.
     
  9. HaraldNielsen

    HaraldNielsen

    Unity Technologies

    Joined:
    Jun 8, 2016
    Posts:
    139
    Hi @N3uRo
    The functionality you are describing are internal stuff that are not final yet and thus not totally public. Use the "Window->Editor test runner" instead, then your tests will work perfectly fine.
     
  10. bdovaz

    bdovaz

    Joined:
    Dec 10, 2011
    Posts:
    1,052
    Ok, thanks.

    It would be nice if you explain all the new features at some point.