Simple Automation Test on Dedicated Server Build

I’m trying to implement simple automation test here ,
i have been succeeded on running the test with client context on production filter. This is the macro i used in my test :

IMPLEMENT_SIMPLE_AUTOMATION_TEST(FTestClass, "MyTest", EAutomationTestFlags::ClientContext | EAutomationTestFlags::ProductFilter);

I created my test, build with development editor config, and running it with this command on my local machine :

"C:\Program Files\Epic Games\UE_4.17\Engine\Binaries\Win64\UE4Editor.exe"  "<working dir>\<game>.uproject" -Game -ExecCmds="Automation RunTests MyTest" -log

it worked correctly, the game is opening, it found the test classes i created, and run them.
however, now i need to run the automation test on headless server which is needed to be on Dedicated Server build.
so, i change the test context into servercontext, build it with development server configuration, and use this command to run the test :

"C:\Program Files\Epic Games\UE_4.17\Engine\Binaries\Win64\UE4Editor.exe" "<working dir>\<game>.uproject"  -Server -ExecCmds="Automation RunTests MyTest" -log

A server log appeared, but when it tried to look for my test, its not registered on automation list. This is the log :

 [  1]Automation: RunTests='MyTest' Queued.0
 [156]LogAutomationCommandLine: Display: Found 0 Automation Tests, based on 'MyTest'.

i have tried rebuilding the solution, changing the context, but no luck so far.
Am i missing something to make it work on server build?
thank you.

I’m trying to work this out too.

Change your EAutomationTestFlags


EAutomationTestFlags::ClientContext | EAutomationTestFlags::ProductFilter


(EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter | EAutomationTestFlags::ServerContext | EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ClientContext);