Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Closed] Client/Server Automation

Hey guys,

We're trying to figure out a way to do a capacity test of our servers. We'd like to be able to support in the neighborhood of 32 clients, and we'd like to not require 32 computers to test this. So we're hoping to run some number of headless clients to do it. Do you guys have a tool for this?

Product Version: Not Selected
more ▼

asked May 29 '15 at 08:06 PM in Using UE4

avatar image

Answers.Archive STAFF
1.9k 205 312 684

avatar image Answers.Archive STAFF May 29 '15 at 08:06 PM


We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.


avatar image Answers.Archive STAFF May 29 '15 at 08:06 PM

Yeah, of course.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed May 29 '15 at 08:06 PM by Ben Halliday for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first

I've specifically coded a 'minimal/headless client' like that for unit testing (can connect multiple clients from within a single UE4 instance - minimizing overhead/memory-usage), which you can access in **UE4\Engine\Plugins\NetcodeUnitTest** - though it will require some adjustments for you to be able to make it launch multiple clients to the same server, as currently it is setup to launch a single headless client per server.

The primary code for that is in ClientUnitTest.cpp - that class basically encapsulates a single 'headless client' - and the easiest method for you to achieve what you want, may be to create 1 unit test class which launches a server and connects a headless client, and then code a 2nd unit test class, which does not launch a server, but instead connects another headless client to the existing server (it would require a big refactoring to get it all working within one unit test - which I will do in the future).

See 'FTextCrash.cpp' in Engine\Plugins\NetcodeUnitTest\NUTUnrealEngine4 for a unit test which launches a server and then connects a minimal client - you can use this as a template for the first unit test.

When the first unit test launches the server, the 'ServerAddress' variable will contain the address for the server - 'ExecuteClientUnitTest' in the first unit test, could be implemented to launch 31 instances of the second unit test class, using: GEngine->Exec(NULL, TEXT("UnitTest SecondUnitTestName"));

Then the second unit test class (which should leave out 'EUnitTestFlags::LaunchServer' from UnitTestFlags) can - in 'ExecuteClientUnitTest' - assign its ServerAddress value to the address of the first unit test, and then you can call 'ConnectFakeClient' to connect the minimal/headless client to that address.

Once all of this is done, you can run it using the commandline: UE4Editor.exe YourGame -run=NetcodeUnitTest.UnitTestCommandlet -unittest=FirstUnitTestName

This unit test tool is recently public, yet still very much 'in development', and implementing in the above manner is untested/unsupported, so it may take a bit of messing to get this going - but let me know how you get on, and if it proves useful/difficult :)

more ▼

answered May 29 '15 at 08:06 PM

avatar image

Answers.Archive STAFF
1.9k 205 312 684

avatar image Answers.Archive STAFF May 29 '15 at 08:06 PM

That's awesome!

Out of curiousity, what's the current problem with connecting multiple clients from within one test?

avatar image Answers.Archive STAFF May 29 '15 at 08:06 PM

Ta :) Ah it's just a matter of how it was coded - the ClientUnitTest class itself contains the 'minimal/headless client' state/setup, so I'd just need to refactor it to move that into a different class, and a single unit test should be able to do multiple headless clients.

Just hasn't been needed/useful up until now - but it's marked down as something to do now.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question