Skip to content

Commit b85d63c

Browse files
committed
Add section about special tags to the unit testing guide
1 parent 6842f41 commit b85d63c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

contributing/development/core_and_modules/unit_testing.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,25 @@ the engine, for instance:
240240
"Invalid HTML notation should result in a Color with the default values.");
241241
}
242242
243+
Special tags in test case names
244+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
245+
246+
These tags can be added to the test case name to modify or extend the test environment:
247+
248+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
249+
| **Tag** | **Description** |
250+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
251+
| ``[SceneTree]`` | Required for test cases that rely on a scene tree with MessageQueue to be available. It also enables a mock rendering server and :ref:`ThemeDB<class_ThemeDB>`. |
252+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
253+
| ``[Editor]`` | Like ``[SceneTree]``, but with additional editor-related infrastructure available, such as :ref:`EditorSettings<class_EditorSettings>`. |
254+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
255+
| ``[Audio]`` | Initializes the :ref:`AudioServer<class_AudioServer>` using a mock audio driver. |
256+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
257+
| ``[Navigation]`` | Creates the default 2D/3D navigation servers and makes them available for testing. |
258+
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
259+
260+
You can use them together to combine multiple test environment extensions.
261+
243262
Test tools
244263
----------
245264

0 commit comments

Comments
 (0)