Run automated testing from command line
My apologies I was wrong about the -execcmd being able to easily run all of the complex tests for an automation test. :-(
You'll wan to run with: -automationtests="Blueprints.Compile-On-Load"
The couple of issue with that is the editor/game will exit once the automation test que is empty which is fine if that is what you want it to do. This also may or may not run all of the available complex tests.
I've logged these issues into our database to hopefully make this easier to use.
To get a full name of a complex test you can run the editor or game with -Execcmds="Automation List" or in the editors console window entering Automation List. That will give you the full list.
answered Nov 14 '14 at 09:15 PM
You are correct Mike. Recently there have been some minor changes to how automation is run through the command line.
"-ExecCmds="Automation Run FCompileBlueprintsTest""
In this example you'll need to also specify the asset that is being tested. You can easily find the whole path for that file by running Automation List either as an execcmd or in the console window. The print out will be in your output log.
Even though the automationtests= command line can use partial arguments you'll need to include everything before the test name itself. For example if I just wanted to run all of the blueprints it would look like this: "-automationtests="Project.Blueprints" or if I wanted to run compile all blueprints that start with the letter A I would use this: -automationtests="Project.Blueprints.Compile Blueprints.A".
Heads up though, this will be changing in the next release. For the better. :-)
answered Jun 22 '15 at 06:10 PM
To run unit tests from the command line, log to a file (and have a log popup), and exit after the tests, here is what I use:
I wanted to also use -NullRHI to avoid seeing the Editor (and the associated Slate load) but this presently crashs UE4.20 at exit
Edit: also, I've updated the command line to get a Tests Report using the option -ReportOutputPath. Here is our current complete commande line:
To run all of the automation tests in a project: UE4Editor.exe GAMENAME -Game -ExecCmds="Automation RunAll"
To run a single test: UE4Editor.exe GameName -game -execcmds="Automation Run FSetRestTest"
You can find the list of tests by running -execcmds="Automation List". In the output log you'll see a long list of tests. Each test name has the letter "F" in front of it.
Here's some more info on the automation system:
answered Oct 06 '14 at 03:40 PM
To run a preset collection through command line is not currently possible but it is on our list of things to do.
You can run the individual tests from a complex test or you can run 'em all.
To run an individual test use this command argument:
-AutomationTests="Blueprints.Compile Blueprints.My Awesome Blueprint, "Blueprints.Compile Blueprints.MyOKBlueprint"
To run all of a complex test then use:
-Execcmds="Automation Run FCompileBlueprintsTest"
Does this answer your question?
answered Nov 12 '14 at 06:15 PM
By chance, are you attempting to run the blueprint test in the game? That test is flagged as Editor only so it won't work if you run it in game.
answered Nov 13 '14 at 01:58 PM
I've tested, command line "Automation RunTests Project.Blueprints.CompileBlueprints" does work, there's no space between Compile and Blueprints, hope this can help you
answered Jul 10 '17 at 05:46 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here