Test UE5 - BredaUniversityGames/JenkinsLib GitHub Wiki

ue5.test()

Runs Unreal Engine 5 automation tests and publishes JUnit results to Jenkins.

Usage

stages {
    perforce.sync()
    ue5.build()
    ue5.test()
    // ...
}

Note: ue5.test() must be used with ue5.build() — it depends on the build context (engine root, project path, config, platform).

Parameters

Parameter Default Description
UE5_TEST_MODE RunAll Test mode: RunAll, RunNamed, or RunFiltered
UE5_TEST_NAMES (empty) Semicolon-separated test names (for RunNamed mode)
UE5_TEST_FILTER Product Filter category (for RunFiltered mode): Product, Smoke, Engine, Stress, Perf

Test Modes

RunAll

Runs every automation test in the project. Simple but slow for large projects.

RunNamed

Runs specific tests by name. Separate multiple tests with semicolons:

MyGame.Tests.Combat;MyGame.Tests.Inventory

RunFiltered

Runs tests matching a category filter:

Filter Description
Product Game-specific tests
Smoke Quick sanity checks
Engine Engine-level tests
Stress Performance stress tests
Perf Performance benchmarks

How It Works

  1. Launches UnrealEditor-Cmd.exe with automation test commands
  2. Exports results to Logs/UnitTestsReport/index.json
  3. Converts UE5 JSON results to JUnit XML format
  4. Publishes JUnit results to Jenkins (visible in the job's Test Results tab)
  5. Marks the build as UNSTABLE if any tests fail (does not fail the build)
  6. Stores test results in ctx.testResults for notification modules
⚠️ **GitHub.com Fallback** ⚠️