x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do you run and get output of automation tests?

Now, the simple answer you might be inclined to suggest is:

 UE4Editor MyProject.uproject -Game -ExecCmds="Automation RunTests MyTest" -log=Log.txt

However, the reason I ask this question is because this command patently (despite being the answer given in numerous places) Does Not Work.

Here are the things it does:

  • Launch the game

Here are the things it does not do:

  • Run 'MyTestName'

  • Log output to MyLogFile.txt

(See, I know it should write a log file to Saved/Logs/ but tangibly it does not).

You can certainly run this to execute the test in editor mode and see the output log in the editor:

 UE4Editor MyProject.uproject -ExecCmds="Automation RunTests MyTestName"

(notice the absence of the -Game flag, which causes the editor to open, rather than game mode to open).

You can also run:

 UE4Editor MyProject.uproject -Game -ExecCmds="Automation RunTests MyTestName" -log

Which pops up the log window and shows commands being run...

...and sits there, on the log message:

 [2016.02.11-15.59.15:599][  0]LogLoad: Full Startup: 5.23 seconds (BP compile: 0.01 seconds)
 [2016.02.11-15.59.15:671][  2]LogRenderer: Reallocating scene render targets to support 1280x720 (Frame:2).
 [2016.02.11-15.59.20:653][259]LogAssetRegistry: FAssetRegistry took 0.0004 seconds to start up

Where is my automation test?

Obviously in the ideal world I wouldn't have to do this at all, but as per https://answers.unrealengine.com/questions/358821/hot-reload-does-not-re-compile-automation-tests.html, tests aren't hot reloaded, so they're impossible to use without closing and opening the editor.

Overall: LAME! This automation stuff seems really rubbish compared to https://github.com/google/googletest

Has anyone actually managed to get this working?

How do you:

1) Run tests

2) Get the results

3) Write new tests and repeat (1) and (2) without manually closing and reopening the editor.

Product Version: UE 4.10
Tags:
more ▼

asked Feb 11 '16 at 04:04 PM in C++ Programming

avatar image

shadowmint
537 17 18 80

avatar image mtass Jul 21 '17 at 01:32 PM

Actually, it seems to run the tests, but it just doesn't tell you which ones failed and which ones succeeded. Whenever I run the tests with the following command: UE4Editor MyProject.uproject -ExecCmds="Automation RunTests MyTest" -log=Log.txt -testexit="Automation Test Queue Empty". And this is part of the log I get. Even when a test is failing. Still broken in 4.16.

 [2017.07.21-13.29.38:345][  2]Found 237 Automation Tests
 [2017.07.21-13.29.43:250][577]AutomationTestingLog: New page: -----Test Run 8----
 [2017.07.21-13.29.43:250][577]AutomationTestingLog: Info -----Test Run 8----
 [2017.07.21-13.29.43:252][577]...Automation Test Queue Empty 1 tests performed.
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question