I was wondering if anyone can point me in the right direction in regards to running functional test with a dedicated server. I checked out all of the documentation here Functional Testing | Unreal Engine Documentation and it seems like it is all tailored towards client based testing.
I have a multiplayer game and I wanted to set up some automated tests that would spin up a server and then load in one of my actors that uses GAS and then verify that the correct attributes loaded in. I need the test to be able to run a server and a client in order to achieve this.
Any help in the right direction would be much appreciated. I feel like automated tests are a topic most people don’t talk about
Funtional Test does not support testing with Dedicated Server. I was trying to do the same about a year ago and after some engine code debugging I found that multiplayer feature for FTs is just not implemented. Also, I found this:
Since then I came up with my own solution, which is essentially (1) extending the AFunctionalTest class to add Server-Client synchronization and (2) using Gauntlet Automation Framework to start Dedicated Server and Clients for testing.
PS: Currently, I am preparing a talk about my solution. You can watch it online here:
If you’re taking any requests for the talk, maybe throw in testing across multiple maps :). My current limitation with that plugin is that it will only test one map in CI/CD so I have to either run a jenkins job for each map(I have a moba so its a lot of runs since each char will get its own test map) or put them all in one map and reset the map for each character
Yes, I know about Daedalic plugin but I have never used it.
About testing across multiple maps, I’m pretty sure my solution is very similar to what you have now. I’m running a single instance of the Gauntlet which starts Server and 2 Clients on a specified map. Then, a list of Functional Tests is executed there. I named the whole process as a “Gauntlet Test”.
When I want to test on a different map, I just run another Gauntlet Test with a different configuration. I prepared a Batch script that starts all my Gauntlet Tests (currently 16) one after another on different maps.
Thank you for your share, I think the content you posted is exactly what I need. But I cannot find your lecture video through this link. Could you please tell me where I can find this video now?
A bit late here, but question for OP: Do you need your tests to run on dedicated server, or is it fine if they run in a single process the way that UE by default starts up an in-process server when you start PIE in client net mode? If it’s the latter, I wanted this exact thing so I created a plugin to help with this: https://www.unrealengine.com/marketplace/en-US/product/multiplayer-functional-testing-helpers. This plugin lets you run multiplayer tests in a single process and then make assertions about the client and the server worlds.