Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing UdonSharpBehaviour References in Play-Mode Tests #63

Open
sam-ln opened this issue Dec 18, 2022 · 1 comment
Open

Missing UdonSharpBehaviour References in Play-Mode Tests #63

sam-ln opened this issue Dec 18, 2022 · 1 comment

Comments

@sam-ln
Copy link

sam-ln commented Dec 18, 2022

I've created a PlayMode test for my scene which derives from ClientSimWorldTestBase. The test setup is identical to "ClientSimWorldTestExampleScene" as provided in the Samples.
When running the test, all references to gameObjects in my UdonSharp Behaviours are cleared out (set to none).
The test will also not finish and runs indefinitely.

usharpclear

This part of the Instructions for Automated Testing seems relevant:

Due to the nature of how ClientSim starts using the InitializeOnLoad, testing requires modifying Unity editor settings to properly validate behaviour. In the test environment, InitializeOnLoad happens before playmode starts. The default Unity setting has Domain Reloading enabled on entering playmode. This means that on switching to playmode, all variable data is cleared. In order to get around this, all ClientSim tests must run with Domain Reloading disabled. This is handled automatically for any test written that derives from either of the two test fixture base classes: ClientSimTestBase and ClientSimWorldTestBase.

But since my test Class derives from ClientSimWorldTestBase, this shouldn't be the problem.

@sam-ln sam-ln changed the title ClientSimWorldTest clears all UdonSharpBehaviour References Missing UdonSharpBehaviour References in Play-Mode Tests May 5, 2023
@sramonpacheco
Copy link

sramonpacheco commented Feb 25, 2024

Are you saying a folder called "Tests" is missing? How do we re-enable this? My references suddenly disappeared as well only for select Scripts. Strange. Any guidance would be highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants