ue4cli icon indicating copy to clipboard operation
ue4cli copied to clipboard

Run tests in Editor type modules

Open PaulHax opened this issue 5 years ago • 2 comments

I'ed like to run ue4 test MyEditorTypeModule but no dice. Seems the Unreal -game flag the test command uses means my "Type": "Editor" module does not get loaded.

Perhaps a --with-editor flag that leaves out the -game? Or am I missing something else...

Thanks for this tool.

PaulHax avatar Jul 24 '20 22:07 PaulHax

Apologies for the delay in responding to this issue, I've been inordinately busy over the past couple of months and I'm only now making my way through my GitHub backlog.

The reason the -game flag is passed is because the Unreal Editor frequently misbehaves when running automation tests from the command-line without that flag, particularly under Windows. A quick test with Unreal Engine 4.25 under Windows confirms that some automation commands result in excessively long wait times before the Editor terminates, and others result in the Editor failing to terminate at all, instead remaining open in the background and leaving the ue4 test command hanging as it waits for the child process to exit.

The need to test code in Editor-only modules is a legitimate use case that's not well-served by the current implementation of the ue4 test command, so I'll investigate methods of invoking the Editor via Unreal AutomationTool (UAT) or Gauntlet to determine whether they might provide a better backend to replace the current direct invocation mechanism.

adamrehn avatar Aug 24 '20 08:08 adamrehn

Thanks for the background information @adamrehn

dskvr avatar Aug 25 '20 13:08 dskvr