Search Unity

Bug 1133241: Test category filters include unrelated tests

Discussion in 'Testing & Automation' started by dgoyette, Mar 3, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I reported 1133241 because I was seeing cases where picking one Category in the Test Runner filter was including multiple categories. My test has 104 tests, with test categories AA-AZ, BA-BZ, CA-CZ, and DA-DZ. If I then try to filter for just one category, for example "AA", it ends up selecting categories BG, CM, and DS as well, with no ability to just filter to "AA".
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    How are you setting the filter? Can you show us?
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Sure. There's a dropdown in the top-right of the window. I'm pulling it down, and selecting a single item. However, this results in more than one item being selected. In this example, from my realy project, I chose VisorCommSystemController from the dropdown, but that resulted in two categories being selected.

    upload_2019-3-3_20-40-59.png

    When I pull down the menu again, I see "Constants" has been checked, along with the one I actually chose.

    upload_2019-3-3_20-42-55.png

    If I unchecked the unwanted category, it unchecks both.

    It almost seems like the various Categories are being mapped into a 32-bit value, and when there are more than 32 categories, it starts duplicating values.
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    What Unity version are you using?
     
  5. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    2018.3.6f1. The bug reported I submitted contained a sample project where this is occurring.
     
  6. ElvisAlistar

    ElvisAlistar

    Unity Technologies

    Joined:
    Oct 2, 2013
    Posts:
    226
    You might be right. That field is implemented using https://docs.unity3d.com/ScriptReference/EditorGUILayout.EnumFlagsField.html if I'm not mistaken. I think we never considered the case where someone has more than 32 categories. I'll update that on the bug report if it's not clear there. Clearly something we should fix.
     
    dgoyette likes this.