Skip to content

Commit

Permalink
Merge pull request godotengine#9701 from Geometror/tests-add-special-…
Browse files Browse the repository at this point in the history
…tags-section

Add section about special tags to the unit testing guide
  • Loading branch information
mhilbrunner authored Aug 4, 2024
2 parents 1b974d5 + b85d63c commit 95eb1ba
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contributing/development/core_and_modules/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,25 @@ the engine, for instance:
"Invalid HTML notation should result in a Color with the default values.");
}
Special tags in test case names
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These tags can be added to the test case name to modify or extend the test environment:

+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Tag** | **Description** |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[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>`. |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[Editor]`` | Like ``[SceneTree]``, but with additional editor-related infrastructure available, such as :ref:`EditorSettings<class_EditorSettings>`. |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[Audio]`` | Initializes the :ref:`AudioServer<class_AudioServer>` using a mock audio driver. |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ``[Navigation]`` | Creates the default 2D/3D navigation servers and makes them available for testing. |
+-------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+

You can use them together to combine multiple test environment extensions.

Test tools
----------

Expand Down

0 comments on commit 95eb1ba

Please sign in to comment.