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()
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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback