Search Issue Tracker

Active

Votes

1

Found in [Package]

2018.3.0a1

2018.3.11f1

2019.1.0a1

2019.2.0a1

Issue ID

1148445

Regression

No

Cant reference Test Assembly Definition when it is located inside a Local Package which is outside of Assets or Packages folder

Package: Test-Framework

-

Reproduction steps:
1. Open the attached Project inside of "BugHuntingTestAssemblies.zip"

Expected result: Project compiles without any issues
Actual result: Project fails to compile with an error logged inside the Console due to missing reference

Reproduces on: 2018.3.14f1, 2019.1.0f2, 2019.2.0a13

Comment from Maxime Bargiel:
This is simply how it works. The user is missing the "testables" entry.

Assemblies in packages are skipped during compilation if they reference TestAssemblies, unless either
1) The package is embedded in the project (i.e. physically located under the Packages directory)
2) The package is listed in the project's "testables" property. See https://docs.unity3d.com/Manual/cus-tests.html.

Unfortunately it is a known issue that this limits the ability to create packages that do not provide tests but rather features based on TestAssemblies, such as testing and automation frameworks. As a workaround, users of those packages can list the packages in the "testables" property of their projects in order to enable them.

I'm reassigning this to the Test Frameworks Grabbag because this "feature" (of skipping non-"testable" packaged assemblies referencing TestAssemblies) was implemented by that team as an optimization, despite the limitations it introduced. I don't think we can make any functional changes there in 2018 LTS, but I think there were changes during the 2019 or 2020 dev cycle, and therefore that team is in a better position to explain the situation and changes to the user when Resolving (By Design).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.