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

Resolved Proper way of running unit tests on code in seperate assemblies

Discussion in 'Testing & Automation' started by james7132, Dec 29, 2017.

  1. james7132

    james7132

    Joined:
    Mar 6, 2015
    Posts:
    166
    Whenever I try to separate out code into assemblies, the tests for them disappear from the Test Runner window. I tend to keep unit tests alongside the code it tests in a Editor folder. It seems that encapsulating both in one assembly definition at the root directory hides it, but creating two separate assemblies and linking them via dependencies also hides the tests.

    Is it best to keep tests in Assembly-Csharp*.dll (By only applying the assembly defintion to the source? or is there an intelligent way for the test runner to find these tests in other assemblies?
     
  2. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    505