Settings
To open the setting press the tools button on the GdUnit inspector.
Common Settings
Common
server connection timeout
The server connection timeout specifies the maximum time in minutes that the test runner client waits when the communication between editor and runner is interrupted.
update notification enabled
Enables/disables the GdUnit update notification. When enabled, an update notification is displayed when Godot is started to inform about a new update to be installed.
Test
test root folder
Defines the root folder where tests are generated.
The tests are usually located parallel to the source code under ‘test’. You can leave it empty to create tests in the source folder.
res://project/src/folder_a/folder_b/my_class.gd
res://project/test/folder_a/folder_b/my_class_test.gd
test suite naming convention
Configures how to generate the test-suite file name.
- AUTO_DETECT - generates the file name by source file naming convention.
- SNAKE_CASE - generates the file name in snake case convention.
- PASCAL_CASE - generates the file name in pascal case convention.
test timeout seconds
Configures the default timeout for the test case in seconds. If a test case runs longer than the specified timeout, the test is interrupted and fails. The default timeout can be overriden on test-case level by using the argument timeout.
-
# Configures the test case to fail after a maximum of 2 seconds runtime func test_foo(timeout = 2000) -> void: ...
-
// Configures the test case to fail after a maximum of 2 seconds runtime [TestCase(Timeout = 2000)] public async Task foo() { }
UI
inspector node collapse
Controls whether the testsuite node in the Inspector is collapsed after a successful test run. By default, the testsuite node is collapsed when all tests are successful.
Report Settings
Asserts
strict number type compare
Controls how numbers are compared.
By default GdUnit does a typesave comparison and will always fail if you compare int with float even if they are supposed to have the same value.
To allow equal values e.g. 0 == 0.0 you can switch off this configuration.
verbose errors
Suppresses internal error reporting for failed assert conditions.
verbose warnings
Suppresses internal warning reporting for failed assert conditions.
Godot
Push Error
Reports Godot push_error() notifications and let the test fail (default disabled)
Script Error
Reports Godot gd script errors and let the test fail
Common
verbose orphans
Enable/disable the orphan node reporting
Templates
test suite template
This template is used to create your test-suite by using the context menu in the editor to create a new test-case.
You can modify and personalize the template using the tags provided.
All supported tags can be viewed by pressing the Supported Tags button.