unreal.EditorUtilityTest

class unreal.EditorUtilityTest(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

Editor Utility Test

C++ Source:

  • Plugin: EditorTests

  • Module: EditorTests

  • File: EditorUtilityTest.h

Editor Properties: (see get_editor_property/set_editor_property)

  • description (str): [Read-Write] Description: A description of the test, like what is this test trying to determine.

  • on_test_finished (EditorUtilityTestFinishedSignature): [Read-Write] On Test Finished: Called when the test is finished. Use it to clean up

  • on_test_prepare (EditorUtilityTestEventSignature): [Read-Write] On Test Prepare: Called when the test is ready to prepare

  • on_test_start (EditorUtilityTestEventSignature): [Read-Write] On Test Start: Called when the test is started

  • owner (str): [Read-Write] Owner: The owner is the group or person responsible for the test. Generally you should use a group name like ‘Editor’ or ‘Rendering’. When a test fails it may not be obvious who should investigate so this provides a associate responsible groups with tests.

  • preparation_time_limit (float): [Read-Write] Preparation Time Limit: The Test’s time limit for preparation, this is the time it has to trigger IsReadyToStart(). ‘0’ means no limit.

  • time_limit (float): [Read-Write] Time Limit: Test’s total run time limit. ‘0’ means no limit

add_error(message) None

Add Error

Parameters:

message (str) –

add_info(message) None

Add Info

Parameters:

message (str) –

add_warning(message) None

Add Warning

Parameters:

message (str) –

property description: str

[Read-Only] Description: A description of the test, like what is this test trying to determine.

Type:

(str)

expect_false(condition, error_message) None

Add error if expected condition is true

Parameters:
  • condition (bool) –

  • error_message (str) –

expect_true(condition, error_message) None

Add error if expected condition is false

Parameters:
  • condition (bool) –

  • error_message (str) –

finish_prepare_test() None

Tell the blueprint VM to start the test (to use at the end of Prepare Test event).

finish_test(test_state, message) None

Tell the VM the test is finished with specify state.

Parameters:
get_state() EditorUtilityTestResult

Get test state

Return type:

EditorUtilityTestResult

is_running() bool

Is test ruuning

Return type:

bool

property on_test_finished: EditorUtilityTestFinishedSignature

[Read-Write] On Test Finished: Called when the test is finished. Use it to clean up

Type:

(EditorUtilityTestFinishedSignature)

property on_test_prepare: EditorUtilityTestEventSignature

[Read-Write] On Test Prepare: Called when the test is ready to prepare

Type:

(EditorUtilityTestEventSignature)

property on_test_start: EditorUtilityTestEventSignature

[Read-Write] On Test Start: Called when the test is started

Type:

(EditorUtilityTestEventSignature)

property owner: str

[Read-Only] Owner: The owner is the group or person responsible for the test. Generally you should use a group name like ‘Editor’ or ‘Rendering’. When a test fails it may not be obvious who should investigate so this provides a associate responsible groups with tests.

Type:

(str)

property preparation_time_limit: float

[Read-Only] Preparation Time Limit: The Test’s time limit for preparation, this is the time it has to trigger IsReadyToStart(). ‘0’ means no limit.

Type:

(float)

prepare_test() None

Use to setup test before running, must call FinishPrepareTest at the end to actual start the test.

receive_finished_test(test_state) EditorUtilityTestResult

Use to add clean up steps, the call is blocking.

Parameters:

test_state (EditorUtilityTestResult) –

Returns:

final_state (EditorUtilityTestResult):

Return type:

EditorUtilityTestResult

run() None

Blueprint Utility Editor entry point

start_test() None

Actual run the test, must call FinishTest at then end of test with a state to signify the test is done.

property time_limit: float

[Read-Only] Time Limit: Test’s total run time limit. ‘0’ means no limit

Type:

(float)