Unreal Engine 4 Test Report
Answered
Hello, i want to publish my Unreal Engine 4 Tests in the test tab.
First of all, in "Build step" i use "command line" runner type. When i run my build, everything is ok, in "build log" i can see my tests like this (Upload id: 2020_09_11_KYhUNAXwAcnHwN5Q (file: cmd_log.png)):
[2020.09.11-07.42.23:104][336]LogAutomationController: Display: Test Completed. Result={Passed} Name={Create Basic Level} Path={System.Promotion.Project Promotion Pass.Step 2 Basic Level Creation.Create Basic Level}
[2020.09.11-07.42.23:104][336]LogAutomationController: BeginEvents: System.Promotion.Project Promotion Pass.Step 2 Basic Level Creation.Create Basic Level
[2020.09.11-07.42.23:105][336]LogAutomationController: Adding Level Geometry
[2020.09.11-07.42.23:105][336]LogAutomationController: Added a player start
[2020.09.11-07.42.23:105][336]LogAutomationController: Saved map
[2020.09.11-07.42.23:106][336]LogAutomationController: Validating World /Game/Maps/NewProjectTest.NewProjectTest
[2020.09.11-07.42.23:106][336]LogAutomationController: EndEvents: System.Promotion.Project Promotion Pass.Step 2 Basic Level Creation.Create Basic Level
[2020.09.11-07.42.23:110][336]LogAutomationController: Display: Test Started. Name={CreateBlueprintProjects}
[2020.09.11-07.42.24:104][339]LogAutomationController: Display: Test Completed. Result={Passed} Name={CreateBlueprintProjects} Path={System.Promotion.Project Promotion Pass.Step 3 NewProjectCreationTests.CreateBlueprintProjects}
[2020.09.11-07.42.24:104][339]LogAutomationController: BeginEvents: System.Promotion.Project Promotion Pass.Step 3 NewProjectCreationTests.CreateBlueprintProjects
[2020.09.11-07.42.24:105][339]LogAutomationController: EndEvents: System.Promotion.Project Promotion Pass.Step 3 NewProjectCreationTests.CreateBlueprintProjects
[2020.09.11-07.42.24:109][339]LogAutomationController: Display: Test Started. Name={CreateCodeProjects}
If i understand well, to publish tests results in test tabs, i have 2 options:
- Build with MsBuild, .NET, Maven, etc... and teamcity will "understand" and display my tests.
- Build in command line and provide a "XML report processing" in Build Features.
In my case (i don't find other solution with UE4), i need to use Command line to build/run my test. I have a log.txt and .JSON file test report (Upload id: 2020_09_11_BGzMNNw3o7AdkpX9 (file: test.json)).
- Can we use JSON report?
- How convert my JSON in the right xml syntax?
- Which report type i need to choose?
- What is the best approach?
PS: I'am new in Teamcity and i want to use for CI with Unreal Engine 4.
Best regards
Please sign in to leave a comment.
Hi Thomas,
In order for XML Report Processing feature to be able to process a report generated by Unreal Engine, the latter needs to save it in one of the supported formats. Converting a file from JSON into XML should not be a problem, but again the XML needs to comply with a supported test framework's format. Whether or not Unreal Engine supports either of those formats, unfortunately, I cannot tell you.
As an alternative, you can use Service Messages to report the tests. Service Messages are lines of special format that are treated as commands to TeamCity when they are found in the standard output of a build process. They provide a way to integrate your build script with TeamCity. Please check these sections of the documentation for more details:
General information about Service Messages
Reporting tests with Service Messages
Adding metadata to tests reported using Service Messages
-Anatoly