Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Include "Editor" platform does NOT show in test runner!

Discussion in 'Testing & Automation' started by MrLucid72, Sep 8, 2022.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    887
    I am getting some compile errors for my unit tests (which shouldn't build anyway...? +bug here)

    I INCLUDE only the editor:
    upload_2022-9-8_17-55-10.png

    My tests in my Test Runner PlayMode are now gone in 2021 LTS.

    upload_2022-9-8_17-56-3.png

    I *must* include my current BUILD platform for test runner to show these.

    Expected: Including only editor should... show test runner tests in editor :)
     
  2. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    887
    Found a hilarious bug workaround:

    upload_2022-9-8_17-59-29.png

    If I EXCLUDE everything EXCEPT Editor ... works fine.
     
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    887
    TL;DR:
    upload_2022-9-8_18-6-15.png
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,594
    If you only check Editor, then the Play Mode tests won't appear because you made them editor-only. It seems you got this backwards, or there is something I'm missing.
     
  5. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    887
    When I build targeting that platform, I get errs. It shoudlnt try to build the tests at all.
     
  6. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,594
    Could you post the exact error messages you get?
    And the contents of the test assembly definition (.asmdef file). This kind of error happens when the asmdef does not include the constraint as explained here.