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
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).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
- A memory leak occurs in Play mode when using Direct3D12 Graphics API
Add comment