Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Help Wanted Package manager, Custom Assemblies and Unit testing

Discussion in 'Testing & Automation' started by WAYN_Group, May 3, 2019.

  1. WAYN_Group

    WAYN_Group

    Joined:
    Mar 16, 2019
    Posts:
    59
    Hello,

    Originally posted in package manager section but here seems more appropriate.
    I'm working on a project with lost of the DOTS preview package.
    So far I had fun playing with it and now I'd like to get more serious about building something.

    So I want to do unit tests. My issue is to do so I need to add a test assembly that require a reference to my source code. And to do that I have to make a custom assembly because I can't find the auto generated one in the reference list for the test assembly.

    Problem as soon as I add a custom assembly I lose all references those imported through the package manager. and adding them all manual is a pain...

    I'm new to unit testing unity code so I may be doing things wrong but I would be great if this process could be more straight forward.

    I have some of suggestions but no idea what would be best :
    1) Have the custom assembly (and maybe also to the test assembly) automatically updated when packages are imported
    2) Not having to make a test assembly to exclude the test code from the build but use a special folder 'Tests' like the Editor one.
    3) Being able to reference the auto generated assembly in the test assembly without the need of custom assembly.

    Also It would be great if adding an assembly reference could bring all its dependencies with. Like the packages manager does with the packages.