LumixEngine

Tests

This document explains how tests are organized and how to run them locally.

Overview

Lumix currently has two test paths:

Main suites registered in src/tests/main.cpp:

Run All Headless Tests

From the repository root, run:

scripts\run_tests.bat

This script:

  1. Generates solution files with tests enabled (genie.exe --with-tests vs2022)
  2. Builds tmp\vs2022\LumixEngine.sln in Debug|x64
  3. Runs tmp\vs2022\bin\Debug\tests.exe

Exit codes:

Run ImGui Editor Tests

From the repository root, run:

scripts\run_imgui_tests.bat

This script:

  1. Generates and builds Studio with test support
  2. Launches studio.exe with ImGui Test Engine UI enabled

Arguments:

scripts\run_imgui_tests.bat Debug
scripts\run_imgui_tests.bat RelWithDebInfo
scripts\run_imgui_tests.bat RelWithDebInfo -open "data/scripts/tests/sample.unv"
scripts\run_imgui_tests.bat -open "data/scripts/tests/sample.unv"

-imgui_test_ui enables ImGui Test Engine windows in Studio, where editor UI tests can be browsed and executed.

Example launch form:

studio.exe -imgui_test_ui -data_dir <repo>\data ...

CI Behavior

GitHub Actions workflow .github/workflows/tests.yml runs:

Because tests.exe includes both particle script and UI test suites, this workflow currently triggers on pushes and pull requests when any of these paths change: