Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    161
    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:
    158
unityunity