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.

Is it possible to have multiple Play Mode test assemblies?

Discussion in 'Editor & General Support' started by cdauphinee, Sep 23, 2019.

  1. cdauphinee

    cdauphinee

    Joined:
    Sep 22, 2016
    Posts:
    3
    I have an empty Unity project using 2019.1.2f1.

    I create a local package, add it as a reference to my empty project, and follow the following steps to create a play mode test assembly:
    https://docs.unity3d.com/Packages/c...1.1/manual/workflow-create-playmode-test.html

    I now create a second local package and add it as a reference. I cannot follow the steps in the link above, because the Test Runner window no longer has the 'Create PlayMode Test Assembly' button, so I attempt to create it manually via 'Create -> Testing -> Tests Assembly Folder' and 'C# Test Script.'

    If I open the test runner, it doesn't show the second test assembly, only the first. The generated Visual Studio solution also doesn't contain a project for the second test assembly.

    I don't see any errors or warnings in the console, but it seems like Unity is completely ignoring the second project's test assembly; it's not even attempting to import the test script. However, if I uncheck 'Test Assemblies' in my asmdef, it does compile the assembly.

    Is it not possible to have multiple Play Mode test assemblies, or am I doing something wrong?
     
    Last edited: Sep 23, 2019
    dan_ginovker likes this.
  2. cdauphinee

    cdauphinee

    Joined:
    Sep 22, 2016
    Posts:
    3
    Disregard, this was a dumb problem: the second package didn't get included as testable in the package manifest, for some reason. It might be useful to have some sort of diagnostic for this, though