Skip to content

Unreal Engine

Tim Rademaker edited this page Apr 6, 2023 · 7 revisions

Initialization

init

Parameters

ueDir: The root directory of Unreal Engine.

engineMajorVersion: The major version of Unreal Engine used for the project.

platform (optional): The platform you want to build the project for. Win64 by default.

configuration (optional): The configuration to build the project in. Shipping by default.

Example

unreal.init('C:/Program Files/Epic Games/UE_4.25');

unreal.init('C:/Program Files/Epic Games/UE_4.25', '4', 'Win64', 'Shipping');

Building and Packaging

build

Build a project.

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

logFile (optional): The file to log build output to. Defaults to ${env.WORKSPACE}/logs/UnrealBuildLog-${env.BUILD_NUMBER}.log.

platform (optional): The target platform to build this project for. If left empty, the platform specified in init is used (default: Win64).

configuration (optional): The target configuration to build this project in. If left empty, the target specified in init is used (default: Development).

Example

unreal.build("${env.WORKSPACE}/Path/To/Project", 'ExampleProject');

unreal.build("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', '', 'Win32', 'Shipping');

packageProject

Packages a project.

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

outputDirectory: The folder to output the packaged build in.

logFile (optional): The file to log build output to. Defaults to ${env.WORKSPACE}/logs/UnrealBuildLog-${env.BUILD_NUMBER}.log.

platform (optional): The target platform to build this project for. If left empty, the platform specified in init is used.

configuration (optional): The target configuration to build this project in. If left empty, the target specified in init is used.

Example

unreal.package("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', "${env.WORKSPACE}/Builds");

unreal.package("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', "${env.WORKSPACE}/Builds", '', 'Win32', 'Shipping');

Data Validation

validateData

Run data validation on the project

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

turnUnstableOnFailure: If true, build is marked as unstable when any of the assets fails validation. Defaults to false.

Running Tests

Run automation tests for a project. If any of the tests fail, the build will be marked as unstable.

runTestsNamed

Run tests with a specified name or containing a specified string.

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

testNames: The list of test names to run. Can also be a part of a name.

minimumPriority (optional): The minimum priority of the tests to run. Options: Low, Medium, High, Critical.

Example

unreal.runTestsNamed("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', ['Project.TestName', 'Interaction']);

runTestsCheckpointed

Run tests with a specified name or containing a specified string, with checkpoints in case of a crash.

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

testNames: The list of test names to run. Can also be a part of a name.

minimumPriority (optional): The minimum priority of the tests to run. Options: Low, Medium, High, Critical.

Example

unreal.runTestsContaining("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', ['PlayerInteraction']);

runTestsFiltered

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

filter: The filter to use. Options: Engine, Smoke, Stress, Perf, Product.

minimumPriority (optional): The minimum priority of the tests to run. Options: Low, Medium, High, Critical.

Example

unreal.runTestsFiltered("${env.WORKSPACE}/Path/To/Project", 'ExampleProject', 'Smoke');

runAllTests

Parameters

projectDir: The directory the project is in.

projectName: The name of the project file (without .uproject).

minimumPriority (optional): The minimum priority of the tests to run. Options: Low, Medium, High, Critical.

Example

unreal.runAllTests("${env.WORKSPACE}/Path/To/Project", 'ExampleProject');