Skip to content
omar edited this page Sep 6, 2022 · 4 revisions

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_tests 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.

Using JUnit with Jenkins

To display test statistics in Jenkins, follow these steps:

1. Make sure junit plugin is enabled.

image

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

image

3. Specify a path to XML output file.

image