I tried to run my tests with the following command:
UE4Editor.exe MyProject.uproject -ExecCmds="Automation RunTests MyCategory" LOG="mylog.log" -testexit="Automation Test Queue Empty"
I found that the tests weren’t running, although it said it was. The log was empty and only said that it completed the tests.
After debugging through the source I found out that the Automation Window was blocking my plans. SAutomationWindow
is opened by default on my editor and I saved the layout for that. When I run the tests, the function FAutomationControllerManager::SetEnabledTests
is called too often and resets my list of tests coming through via “RunTests MyCategory”.
So the code flow is like this:
- The command line sets the enabled tests via
SetEnabledTests
- The editor opens
SAutomationWindow
and callsOnRefreshTestCallback()
, which sets all tests back to disabled. - Tests start running, but the list is actually empty.
- The log file still reports that tests have run, but they actually haven’t and there is no information in the log.
I have a workaround now by removing the automation window from my default layout, but it’s not a fix. Please fix this issue, so that it will be possible to run the tests with the automation window open.