Hi, I’m trying to use the NetcodeIntegrationTest class, which is in the Unity.Netcode.TestHelpers.Runtime namespace. When I try to import the namespace, I get an error that TestHelpers does not exist in the Unity.Netcode namespace.
I referenced the com.unity.netcode.testhelpers.runtime assembly in my .asmdef
I’m using netcode 1.4 (but I also got the same result with 1.1)
Unity Editor 2022.1.23f1
Hello OBTMF,
In your manifest file you can add the “testables” define to the end and include com.unity.netcode.gameobject:
{
"dependencies": {
(all of your project's package dependencies)
},
"testables": [
"com.unity.netcode.gameobjects"
]
}
This should expose the test library for you, but I would like to add that these are “as-is” with not much documentation other than the comments and the existing API usage in our own tests.
Let me know if by adding that to your manifest file you can access the TestHelper API?
Hello,
i tried your solution and it worked but you need to add
“com.unity.netcode.testhelpers.runtime” to the testables define and to the test assembly where you want to use it.