Description
Our unit test coverage is currently fairly low. We'd like to increase our unit test coverage; any help is welcome.
Interested in writing new unit tests? See the unit tests documentation and compiling instructions. If you have further questions, join the Godot Contributors Chat.
When opening a pull request, please link back to this issue (#43440) in the PR description so that we can keep track of it more easily.
If you have the appropriate permissions, feel free to edit this issue to add new items or check items for which a PR has been opened.
Classes to test
These classes are currently lacking in test coverage, and are therefore highest-priority for receiving unit tests. Deprecated classes are not listed.
[!NOTE]
When a class is listed with "and" along a given list item, it should be submitted in the same pull request whenever possible. Tests for these classes can be in the same file or a different file depending on the size and complexity of the test suite. If in doubt, follow the file organization used in the original class implementation.
- AnimationPlayer https://github.com/godotengine/godot/pull/92649
- AudioStreamInteractive (and AudioStreamPlaybackInteractive, AudioStreamPlaylist, AudioStreamSynchronized) https://github.com/godotengine/godot/pull/105490
- BaseButton (and Button) https://github.com/godotengine/godot/pull/93381
- Control: Test sizing, anchors and container logic by checking control position and size after creating an UI layout. Test focus neighbor behavior using simulated input events (
ui_focus_actions). This class is complex, so tests for it can be split in multiple pull requests. - Decal https://github.com/godotengine/godot/pull/93463
- ENetConnection (and ENetPacketPeer) https://github.com/godotengine/godot/pull/112984
- FontFile https://github.com/godotengine/godot/pull/99131
- FontVariation
https://github.com/godotengine/godot/pull/99687https://github.com/godotengine/godot/pull/112846 - GLTFDocument https://github.com/godotengine/godot/pull/101136
- HeightMapShape3D https://github.com/godotengine/godot/pull/95123
- HTTPRequest https://github.com/godotengine/godot/pull/95224
- ImageTexture3D https://github.com/godotengine/godot/pull/91233
- Node2D https://github.com/godotengine/godot/pull/91654
- Node3D https://github.com/godotengine/godot/pull/97143
- Occluder3D (and ArrayOccluder3D, BoxOccluder3D, PolygonOccluder3D, QuadOccluder3D, and SphereOccluder3D) https://github.com/godotengine/godot/pull/108891
- OccluderInstance3D https://github.com/godotengine/godot/pull/116234
- OptimizedTranslation https://github.com/godotengine/godot/pull/91092
- OptionButton https://github.com/godotengine/godot/pull/93824
- PacketPeer https://github.com/godotengine/godot/pull/95931
- Parallax2D https://github.com/godotengine/godot/pull/95650
- PhysicsMaterial https://github.com/godotengine/godot/pull/97227
- ReflectionProbe https://github.com/godotengine/godot/pull/97818 https://github.com/godotengine/godot/pull/97870
- Sky https://github.com/godotengine/godot/pull/99886 https://github.com/godotengine/godot/pull/97512
- StandardMaterial3D (and ORMMaterial3D) https://github.com/godotengine/godot/pull/105341
- StreamPeerTCP https://github.com/godotengine/godot/pull/102064
- StreamPeerTLS https://github.com/godotengine/godot/pull/102961 https://github.com/godotengine/godot/pull/111784
- StreamPeerGZIP https://github.com/godotengine/godot/pull/101438 https://github.com/godotengine/godot/pull/98043
- StreamPeerBuffer https://github.com/godotengine/godot/pull/100871 https://github.com/godotengine/godot/pull/95784
- StyleBoxFlat https://github.com/godotengine/godot/pull/106009
- StyleBoxLine (and StyleBoxEmpty) https://github.com/godotengine/godot/pull/105296
- StyleBoxTexture https://github.com/godotengine/godot/pull/95218
- Timer https://github.com/godotengine/godot/pull/97794
- WebSocketPeer https://github.com/godotengine/godot/pull/105386
Completed classes
These classes currently have good test coverage. Further improvements may be possible by testing methods that were added after the tests were merged.
- AABB https://github.com/godotengine/godot/pull/43727
- Animation https://github.com/godotengine/godot/pull/57490
- Array https://github.com/godotengine/godot/pull/46227
- ArrayMesh
- AudioStreamWAV https://github.com/godotengine/godot/pull/60736
- BitMap
- Camera2D https://github.com/godotengine/godot/pull/88614
- Camera3D: May not be testable in headless mode, but it's worth trying. Test
is_position_behind()and theproject_/unproject_methods in particular - CryptoKey https://github.com/godotengine/godot/pull/89021
- Curve https://github.com/godotengine/godot/pull/43516
- Curve2D https://github.com/godotengine/godot/pull/71308
- Curve3D #76812
- Dictionary https://github.com/godotengine/godot/pull/47511
- FastNoiseLite
- Font https://github.com/godotengine/godot/pull/81503
- GDScript https://github.com/godotengine/godot/pull/48657
- Geometry2D https://github.com/godotengine/godot/pull/59643
- Geometry3D https://github.com/godotengine/godot/pull/44974
- GradientTexture https://github.com/godotengine/godot/pull/90501
- HashingContext https://github.com/godotengine/godot/pull/43459
- HTTPClient https://github.com/godotengine/godot/pull/76636
- Image https://github.com/godotengine/godot/pull/45737
- ImageTexture https://github.com/godotengine/godot/pull/88044
- InputEvent https://github.com/godotengine/godot/pull/79444
- InputEventKey https://github.com/godotengine/godot/pull/59193
- JSON https://github.com/godotengine/godot/pull/43517
- JSONRPC: https://github.com/godotengine/godot/pull/89124
- Math
https://github.com/godotengine/godot/pull/48721https://github.com/godotengine/godot/pull/68196 - Marshalls https://github.com/godotengine/godot/pull/44797
- Node: https://github.com/godotengine/godot/pull/70152 https://github.com/godotengine/godot/pull/71367
- NodePath https://github.com/godotengine/godot/pull/43578
- NoiseTexture https://github.com/godotengine/godot/pull/70919
- Object https://github.com/godotengine/godot/pull/43583 (completed by
https://github.com/godotengine/godot/pull/44387) https://github.com/godotengine/godot/pull/45411 - OS https://github.com/godotengine/godot/pull/42069
- PackedScene https://github.com/godotengine/godot/pull/79440 https://github.com/godotengine/godot/pull/80423 https://github.com/godotengine/godot/pull/80819
- Path2D https://github.com/godotengine/godot/pull/66927
- PathFollow2D https://github.com/godotengine/godot/pull/46277
- Path3D
- PathFollow3D https://github.com/godotengine/godot/pull/46341
- PCKPacker https://github.com/godotengine/godot/pull/43572
- Plane https://github.com/godotengine/godot/pull/44492
- PrimitiveMesh (CapsuleMesh, CubeMesh, …)
- Projection
https://github.com/godotengine/godot/pull/77275https://github.com/godotengine/godot/pull/99125 - Quaternion https://github.com/godotengine/godot/pull/50907
- RandomNumberGenerator https://github.com/godotengine/godot/pull/44560
- Rect2: Not covered in the legacy math test. https://github.com/godotengine/godot/pull/43514
- Rect2i: Not covered in the legacy math test. https://github.com/godotengine/godot/pull/43514
- RegEx https://github.com/godotengine/godot/pull/82225
- RID https://github.com/godotengine/godot/pull/54325
- Resource https://github.com/godotengine/godot/pull/43731
- Shortcut https://github.com/godotengine/godot/pull/58712
- SpriteFrames https://github.com/godotengine/godot/pull/57742
- Transform
- Transform2D
- Translation https://github.com/godotengine/godot/pull/48778
- TranslationServer https://github.com/godotengine/godot/pull/79331
- Variant https://github.com/godotengine/godot/pull/76244
- Vector https://github.com/godotengine/godot/pull/48821
- Vector2/Vector2i
https://github.com/godotengine/godot/pull/47202https://github.com/godotengine/godot/pull/66261 - Vector3/Vector3i
https://github.com/godotengine/godot/pull/48063https://github.com/godotengine/godot/pull/66261 - Vector4/Vector4i https://github.com/godotengine/godot/pull/64027
- VisualShader https://github.com/godotengine/godot/pull/70396
Non-testable classes
These classes can't be unit-tested for technical reasons. Unit tests always run in headless mode, so they can't do things such as rendering scenes and checking the visual result.
-
CubeMap:Not testable without RenderingServer access. -
Shader:Not testable without RenderingServer access. -
VisibleOnScreenNotifier2D:Not testable without RenderingServer access. -
VisibleOnScreenNotifier3D:Not testable without RenderingServer access.