UUnitTestCommandlet

A commandlet for running unit tests, without having to launch the game client.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

NetcodeUnitTest

Header

/Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Classes/UnitTestCommandlet.h

Include

#include "UnitTestCommandlet.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UUnitTestCommandlet : public UCommandlet

Remarks

A commandlet for running unit tests, without having to launch the game client. Uses a heavily stripped down game client, with allowances for Slate, and some hacks for enabling proper netcode usage.

Usage: "UE4Editor.exe shootergame -run=NetcodeUnitTest.UnitTestCommandlet"

Parameters: -UnitTest=UnitTestName

  • Launches only the specified unit test

-UnitTestNoAutoClose

  • Sets the default option for the 'AutoClose' button to False

-UnitTestServerParms="CommandlineParameters"

  • Adds additional commandline parameters to unit test server instances (useful for e.g. unsuppressing specific logs)

-UnitTestClientParms="CommandlineParameters"

  • Adds additional commandline parameters to unit test client instances

-UnitTestClientDebug

  • Launches unit test clients with a valid render interface (so you can interact with the client window), and a larger window

-UnitTestCap=x

  • Caps the maximum number of unit tests that can run at the same time

Constructors

Name Description

Public function

UUnitTestCommandlet

(
    const FObjectInitializer& ObjectIn...
)

UUnitTestCommandlet

Overridden from UCommandlet

Name Description

Public function Virtual

void

 

CreateCustomEngine

(
    const FString& Params
)

Allows commandlets to override the default behavior and create a custom engine class for the commandlet.

Public function Virtual

int32

 

Main

(
    const FString& Params
)

Entry point for your commandlet

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss