-
Notifications
You must be signed in to change notification settings - Fork 65
Exporting Results
(Note: For users running tests interactively in GUI mode, the Test Engine UI (ImGuiTestEngine_ShowTestEngineWindows() function) allows you to browse, filter, run tests, inspect their log and tweaks options.)
Test results may be printed to TTY using the ImGuiTestEngine_PrintResultSummary() function.
Test results may be exported as junit XML file. To export test results in this format, configure test engine as follows:
ImGuiTestEngineIO& test_io = ImGuiTestEngine_GetIO(engine);
test_io.ExportResultsFile = "output_file.xml";
test_io.ExportResultsFormat = ImGuiTestEngineExportFormat_JUnitXml;Results will be saved in specified output file and can be consumed by third party tools.
As a reference, the imgui_test_suite application (for testing Dear ImGui itself) uses -export-file and -export-format parameters to specify those on the command-line. You may want to adopt a similar approach in your application.
You may also call ImGuiTestEngine_ExportEx() in your code. Note however that registration in ImGuiTestEngineIO ensure that export is done if the application crashes.
If your application has an existing crash handler, call ImGuiTestEngine_CrashHandler() from it to ensure results are exported if the application crashes. For result to be exported you need to fill test_io.ExportResultsFormat and test_io.ExportResultsFilename fields.
If your application doesn't have an existing crash handler, you may call ImGuiTestEngine_InstallDefaultCrashHandler() to register one which will call ImGuiTestEngine_CrashHandler().
To display test statistics in Jenkins, follow these steps:
1. Make sure junit plugin is enabled.

2. Enable junit result publishing in project post-build actions.

3. Specify a path to XML output file.
