Ultimately, I want to simulate two clients connecting to each other in a joined room, and have one client’s character die. It’d be really helpful to get these unit tests setup.
edit: I was able to have the PlayMode test script load through a few scenes, get the player in game, and create a Photon Room. Just need to get another game instance to have another client connect and load their player in the same game.
There are no beautiful way for you to do this. Currently in playmode tests we only make one game instance and wait for the tests to be done.
If possible you could simulate the connection. But it sounds like you more want more of an integration test.
You could try to make a Editmode test and build two game instances (using Unity - Scripting API: BuildPipeline.BuildPlayer ) and ConnectToHost build option, with your desired scenes, Debug.Log when you get your desired outcome and assert on that in the editor test.
The logs that you produce when ConnectToHost is used should send them to the Editor where you can assert on them.
We will extend the framework so testing features like this will not be that much a pain.