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 Add tests for
AnimationPlayer
#92649 - AudioStreamInteractive (and AudioStreamPlaybackInteractive, AudioStreamPlaylist, AudioStreamSynchronized)
- BaseButton (and Button) Add button unit test #93381
- Control: Test
sizing, anchors andcontainer 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 Add unit tests for
Decal
#93463 - ENetConnection (and ENetPacketPeer)
- FontFile Add basic tests for Fontfile #99131
- FontVariation Add
FontVariation
unit test #99687 - GLTFDocument Add test for GLTFDocument #101136
- HeightMapShape3D Add unit tests for
HeightMapShape3D
#95123 - HTTPRequest Add a unit test for
HTTPRequest
#95224 - ImageTexture3D Add unit test cases for ImageTexture3D #91233
- Node2D Add unit tests for Node2D helper methods #91654
- Node3D Add unit test for
Node3D
#97143 - Occluder3D (and ArrayOccluder3D, BoxOccluder3D, PolygonOccluder3D, QuadOccluder3D, and SphereOccluder3D) Add unit tests for Occluder shapes #99437
- OccluderInstance3D: Currently being worked on by @carsonetb
- OptimizedTranslation Currently being worked on by @SommAid
- OptionButton Add unit tests for
OptionButton
#93824 - PacketPeer Add unit tests for
PacketPeer
#95931 - Parallax2D Add unit tests for
Parallax2D
#95650 - PhysicsMaterial Add unit tests for PhysicsMaterial #97227
- ReflectionProbe Add unit tests for
ReflectionProbe
#97818 Add unit test for reflection_probe #97870 - Sky Add unit tests for Sky #99886 Add Unit Test cases for
Sky
#97512 - StandardMaterial3D (and ORMMaterial3D)
- StreamPeerTCP Currently being worked on by @wheatear-dev
- StreamPeerTLS
- StreamPeerGZIP Currently being worked on by @tsarquis88
- StreamPeerBuffer Add unit tests for StreamPeer, StreamPeerBuffer and StreamPeerExtension #100871 Add unit tests for
StreamPeer
andStreamPeerBuffer
#95784 - StyleBoxFlat Currently being worked on by @mshojatalab
- StyleBoxLine (and StyleBoxEmpty) Currently being worked on by @rcooper47
- StyleBoxTexture Add unit tests for
StyleBoxTexture
#95218 - Timer Add new test cases for
Timer
autostart and paused behavior #97794 - WebSocketPeer Currently being worked on by @CampioniMan
- VisibleOnScreenNotifier2D: May not be testable in headless mode, but it's worth trying.
- VisibleOnScreenNotifier3D: May not be testable in headless mode, but it's worth trying.
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 Add a test suite for AABB #43727
- Animation Add a unit test suite for Animation #57490
- Array Add a test suite for Array #46227
- ArrayMesh
- AudioStreamWAV Add test cases for AudioStreamWAV #60736
- BitMap
- Camera2D Add unit tests for Camera2D #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 Add unit tests for CryptoKey #89021
- Curve Add a test suite for Curve #43516
- Curve2D Add unit tests for Curve2D #71308
- Curve3D Add unit tests for Curve3D #76812
- Dictionary Add a test suite for Dictionary #47511
- FastNoiseLite
- Font Add getter tests for dynamic fonts #81503
- GDScript Add a unit test suite for GDScript #48657
- Geometry2D Add extra unit tests for Geometry2D #59643
- Geometry3D Initial tests for geometry3D #44974
- GradientTexture Add unit tests for GradientTexture1D and GradientTexture2D #90501
- HashingContext Add unit tests for HashingContext #43459
- HTTPClient Add HTTPClient unit tests #76636
- Image Add a test suite for the Image class #45737
- ImageTexture Add
ImageTexture
unit tests #88044 - InputEvent Add a test suite to InputEvent #79444
- InputEventKey Add Unit Tests for InputEventKey #59193
- JSON Add a test suite for JSON #43517
- JSONRPC: Add unit tests for JSONRPC #89124
- Math Add a test suite for
Math::
namespace functions #48721 - Marshalls Marshall core unit tests #44797
- Node: Initial tests for node #70152 More
Node
tests #71367 - NodePath Add a test suite for NodePath #43578
- NoiseTexture Add tests for FastNoiseLite/NoiseTexture #70919
- Object Add a test suite for Object #43583 (completed by More object unit tests #44387)
- OS Add a test suite for OS #42069
- PackedScene Add unit tests for PackedScene #79440 Improve PackedScene unit test for complex scene #80423 Improve PackedScene unit test by covering more methods #80819
- Path2D Unit tests for Path2D class #66927
- PathFollow2D PathFollow2D unit test #46277
- Path3D
- PathFollow3D add PathFollow3D unit test #46341
- PCKPacker Add a test suite for PCKPacker #43572
- Plane Added a test suite for the Plane object. #44492
- PrimitiveMesh (CapsuleMesh, CubeMesh, …)
- Projection Add a test suite for Projection #77275 Add tests for
Projection
#99125 - Quaternion Add tests file for Quaternion unit tests, with initial UTs #50907
- RandomNumberGenerator Add unit tests for
RandomNumberGenerator
#44560 - Rect2: Not covered in the legacy math test. Add a test suite for Rect2 and Rect2i #43514
- Rect2i: Not covered in the legacy math test. Add a test suite for Rect2 and Rect2i #43514
- RegEx Adds additional tests for RegEx class #82225
- RID Add unit tests for RID class. #54325
- Resource Add a test suite for Resource #43731
- Shortcut Add unit tests for Shortcut #58712
- SpriteFrames unit tests for all public methods in the sprite frame class #57742
- Transform
- Transform2D
- Translation Add a test suite for Translation #48778
- TranslationServer Add a test suite for TranslationServer #79331
- Variant Add unit tests for Variant for operator overloading #76244
- Vector Add a test suite for Vector #48821
- Vector2/Vector2i Add test suite for Vector2 #47202
- Vector3/Vector3i Add test suite for Vector3 #48063
- Vector4/Vector4i
Vector4
/Vector4i
: Add missing methods and tests #64027 - VisualShader Add unit test for VisualShader #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.
Metadata
Metadata
Assignees
Type
Projects
Status
Done