# How to test server client?

**URL:** <https://forums.unrealengine.com/t/how-to-test-server-client/343465>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, client, Server, unreal-engine, Multiplayer, CPP, question\
**Created:** [January 8, 2016, 10:49am UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465 "2016-01-08T10:49:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sleicreider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sleicreider](https://forums.unrealengine.com/u/Sleicreider)\
**Post date:** [January 8, 2016, 10:49am UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/1 "2016-01-08T10:49:23Z")

</div>

Hey,

I’ve recently started learning about the ue4 server client functionality, but I have no idea how to test my replicated variable and server function.

As far as i know its possible to enable Dedicated server inside the editor and change the amount of clients.  
But how do I see if a function got called on the server?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a8366a311](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a8366a311](https://forums.unrealengine.com/u/anonymous_user_a8366a311)\
**Post date:** [January 8, 2016, 1:11pm UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/2 "2016-01-08T13:11:54Z")

</div>

Hi Sleicreider

Well, the easy way to see if some method is called on server or on clients or on both is with logs. If you are using blueprint the Print String node in multiplayer show you where was called that funtion, for example: Server: my log text or Client: my log text.

On the other hand, for logs in C++ I use the following macro that also show me the same information.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a72cfdf4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a72cfdf4](https://forums.unrealengine.com/u/anonymous_user_a72cfdf4)\
**Post date:** [January 11, 2016, 8:40am UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/3 "2016-01-11T08:40:17Z")

</div>

Personnaly to test, I launch ue4\_sourcedirectory\_from\_git\engine\binaries\win64\ue4editor myproject mystartingmap -server -log  
and ue4\_sourcedirectory\_from\_git\engine\binaries\win64\ue4editor myproject mystartingmap -game -log

you will have a dos prompt with all logs. So you have no “automatic connect”, and some tricky behaviour found in PIE. you have more “real network likfe”.

All “print string” done on server side, will be shown in this dos console log.

---

<div class="post-metadata">

**Author:** ![Sleicreider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sleicreider](https://forums.unrealengine.com/u/Sleicreider)\
**Post date:** [January 12, 2016, 1:05pm UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/4 "2016-01-12T13:05:56Z")

</div>

this works for me  
had to modify it, because **FUNCTION** / **function** is not available on OS-X.

---

<div class="post-metadata">

**Author:** ![Sleicreider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sleicreider](https://forums.unrealengine.com/u/Sleicreider)\
**Post date:** [January 12, 2016, 1:07pm UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/5 "2016-01-12T13:07:14Z")

</div>

somehow i can’t write double underscores

---

<div class="post-metadata">

**Author:** ![Sleicreider](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sleicreider](https://forums.unrealengine.com/u/Sleicreider)\
**Post date:** [January 12, 2016, 1:07pm UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/6 "2016-01-12T13:07:49Z")

</div>

I’m not sure how to get it working on OS-X, i’ll try it at home on windows

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2db7ca80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2db7ca80](https://forums.unrealengine.com/u/anonymous_user_2db7ca80)\
**Post date:** [August 20, 2020, 9:22am UTC](https://forums.unrealengine.com/t/how-to-test-server-client/343465/7 "2020-08-20T09:22:15Z")

</div>

Link broken, should now be: [https://ue4community.wiki/log-macro-with-net-mode-and-color-q3vj8r7c](https://ue4community.wiki/log-macro-with-net-mode-and-color-q3vj8r7c)
