Open Calinou opened 3 years ago
Hi, new contributer here. I want to add some more methods in Transform3D covering methods that are currently not being tested such as the inverse functions and interpolate_with. Or is Transform3D no longer accepting new tests?
Hi, new contributer here. I want to add some more methods in Transform3D covering methods that are currently not being tested such as the inverse functions and interpolate_with. Or is Transform3D no longer accepting new tests?
Feel free to open a pull request to add more tests to an existing class :slightly_smiling_face:
Hello! Another new contributor here. Was hoping to add some tests that raise the coverage of the Path2D and Projection classes.
Hello! Another new contributor here. Was hoping to add some tests that raise the coverage of the Path2D and Projection classes.
Feel free to open a pull request for these :slightly_smiling_face:
Hello! This is my first time contributing! I'd like to add more coverage for Plane-Point operations for the Plane class specifically to test distance_to()
method of the Plane class.
I've started work on improving coverage of the distance_of()
method of Plane
class in #75602
Hello! I'm a first-time contributor and I would like to add unit tests for Curve3D and make sure the overload operators in Variant are all tested.
I want to take up writing unit-tests for the Cubemap
class. I've got the basic test file setup and will work on adding a basic test case to it. It should also serve as a good starting point for future test-cases for the Cubemap
class. Please feel free to give suggestions or pitfalls to look for :)
Following this conversation on the Godot Contributors Chat, testing CubeMap isn't feasible without RenderingServer access. This singleton isn't available in the testing environment as headless builds don't instance a RenderingServer, so I'll strike it out from the list.
I'm taking up the task of adding coverage for HTTPClient
class.
Path2D
is unchecked but wasn't it addressed in https://github.com/godotengine/godot/pull/66927?
Path2D
is unchecked but wasn't it addressed in #66927?
Good catch, fixed :slightly_smiling_face:
Hey @samkueb, are you still working on Projection's tests? I am also starting to work on it. If you wish we can pair and tackle it together :)
@StefanoPetrilli Nope, I ended up just working on Path2d. Feel free to work on Projection!
DynamicFont
has been renamed FontFile
in Godot 4, right? Should the checklist above reflect that?
Input
itself doesn't have any tests. Should it be on here?
Hi, I would like to see if we can cover TranslationServer
. Is anybody working on it?
Hey! I would like to work on NoiseTexture
. Please do tell me if someone is already working on it. I'm new to unit testing and contributing and would really appreciate it if someone gave me pointers on where to start working on.
When using gcovr 5.2 for coverage-reports as explained in https://github.com/godotengine/godot/issues/43440#issuecomment-1305518762, I had to experiment, in order to get it working with Clang. The following worked for me on Linux:
scons use_llvm=yes target=editor dev_mode=yes dev_build=yes use_coverage=yes '-j X'
./bin/godot.linuxbsd.editor.dev.x86_64.llvm --test
gcovr --gcov-executable "llvm-cov gcov" --exclude-directories thirdparty/ --exclude-directories tests/ -e .*.gen.h --decisions --html-details coverage.html
Line coverage went up from 16% to 23% since Nov 2022 🤩
Hi everyone, I'm interested in making my first contribution with tests for the ReGex class. Just wanted to comment to make sure it's not being worked on!
Howdy everyone. Looking to making my first contribution, just noting here that I'll be grabbing Font tests
I looked into AnimatedTexture class and for stable(4.1) it shows Deprecated. As it won't be updated and can be removed in future, is there still any need in tests for this class? Sorry, don't know who to tag here.
I looked into AnimatedTexture class and for stable(4.1) it shows Deprecated. As it won't be updated and can be removed in future, is there still any need in tests for this class? Sorry, don't know who to tag here.
I think we can still add tests for it. It has to remain supported throughout the 4.x cycle after all.
I looked into AnimatedTexture class and for stable(4.1) it shows Deprecated. As it won't be updated and can be removed in future, is there still any need in tests for this class? Sorry, don't know who to tag here.
I think we can still add tests for it. It has to remain supported throughout the 4.x cycle after all.
Ok, thanks. I'll work on this then.
@Calinou Hi, can you please check out Translation Server so it won't confuse anyone who would want to take it? It is covered by #79331. Thank you!
I wrote some tests for ImageTexture which should be linked to this issue now (though they're not merged at the time of me writing this). I ran into a snag I was able to solve and wanted to call it out here.
Some of these classes require the RenderingServer
for testing. At one point, that was not available and some of these tests were impossible to write, but I don't believe that is the case any longer - adding [SceneTree]
to your unit test name would initialize the RenderingEngine
: https://github.com/godotengine/godot/blob/fe5b1c8d49313d63fbe91cb7cdf463e10fb86afa/tests/test_main.cpp#L223
I think that should be refactored to be more extensible (i.e. it doesn't make sense for random tests to add [SceneTree]
to their name, but it does work.
Practically for this issue, I think that means CubeMap
can be reopened as a thing that can be tested. I'm happy to prove that out myself.
I've encountered the same problem with RenderingServer
. As you say it's configured in the test_main.cpp with
I personally think that such configuration should happen in the test fixture itself but if we stick to the approach that is currently is in Godot tests - we need to add test environment configuration if (name.find("[YourTestingClass]") != -1) {
in the test_main.cpp for each test fixture we create.
For example, I tested AnimatedTexture
and my every test has [AnimatedTexture]
tag, so I just add this for configuration
@bgaudiosi, sorry forgot to mention you in my response
AABB would benefit from more comprehensive testing of intersections, no testing is done for the clip
point and normal
vector for example
Hey everyone, we are a small student group looking to make our first contribution. We're looking to create a Unit Test for Camera2D, what is meant by "headless mode" ?
Means there's no renderer active, so limited or no graphics code will work
Hello, I'm currently working on tests for Camera3D. I'll be testing the methods that can work in headless mode, namely:
is_position_behind
is_position_in_frustum
project_local_ray_normal
project_position
project_ray_normal
project_ray_origin
unproject_position
Using SubViewport should be enough to give Camera3D a fake screen to calculate aspect ratio off of.
I'd be interested to work more on Variant tests. From what I can see the NOT
operator has been tested already and there seem to be some EQUAL
comparisions already via identity_compare
, although the actual ==
operator seems to use hash_compare
(at least in C++). So I have a few questions:
hash_compare
?I'm almost done with unit tests for Camera3D. There are just a few issues left to go over before I can submit the PR for review:
unproject_position
. It's probably not a good idea to submit failing unit tests, so I'd like to confirm if it's intended behavior and should be ignored, or if I should wait for the issue to be fixed.From what I can tell, there is no DynamicFont
class in the codebase and it was deleted in https://github.com/godotengine/godot/commit/99666de00fb30cb86473257776504ca70b4469c3#diff-35b4cc3280195a381c5e95d48a19f9d95c968ffae2604e3cc6897d3261ca9afa
Should this be removed from the list above, or replaced with a different class?
From what I can tell, there is no
DynamicFont
class in the codebase and it was deleted in 99666de#diff-35b4cc3280195a381c5e95d48a19f9d95c968ffae2604e3cc6897d3261ca9afaShould this be removed from the list above, or replaced with a different class?
FontFile
is the 4.x replacement of DynamicFont
. I've updated the list accordingly.
Hey everyone, I'm interested in trying to make some test cases for the AnimatedTexture class for my first contribution to Godot. I've seen some of the docs about unit tests and would like to know if there are any pointers to keep in mind for that class specifically. I saw in the ImageTexture PR #82086 that several test images were generated for the test suite, and I'm wondering if this needs to be done for AnimatedTexture as well. Thanks!
Hey everyone, I'm interested in trying to make some test cases for the AnimatedTexture class for my first contribution to Godot. I've seen some of the docs about unit tests and would like to know if there are any pointers to keep in mind for that class specifically. I saw in the ImageTexture PR #82086 that several test images were generated for the test suite, and I'm wondering if this needs to be done for AnimatedTexture as well. Thanks!
Hey, I've actually wrote tests in my fork for the all fields of AnimatedTexture but got stuck on testing _update_proxy
method. It depends on OS::get_singleton()->get_ticks_usec()
and I wasn't sure at the moment how to mock it. Then I got busy at job and forgot about this for a month :) If you have an idea how to mock OS
and write tests for _update_proxy
I'll pass it to you. In _update_proxy
happens all main logic and without it these tests I wrote are really "low value". On this week I'll attempt one more on cracking this one or asking help on dev chat.
Hey @menteValidus, apologies for not seeing your earlier comments in the issue😅. I am not familiar with mocking OS either. I'll avoid stepping on your toes and try taking a crack at GradientTexture instead. Thanks for the quick reply and letting me know about your progress.
Do we currently have a runtime mock system? I’ve made some before where you can register mocks at test time via a string name (or you could use a function pointer interpreted as a int) and then add a line or two of macros at the top that in test builds that keeps track of keys to mock and if set will run some closure instead of the function itself
InputEvent
is unchecked but I believe tests were added in https://github.com/godotengine/godot/pull/79444
Hello All, as a new contributor, I'd like to tackle NoiseTexture, PackedScene, and PacketPeer. If they're still available to claim, and what's the status on Font and what's still required to check off that test?
Hello All, as a new contributor, I'd like to tackle NoiseTexture, PackedScene, and PacketPeer.
Feel free to open pull requests for these :slightly_smiling_face:
and what's the status on Font and what's still required to check off that test?
Font has already been tackled by https://github.com/godotengine/godot/pull/81503. I've updated the list accordingly.
Hello, I was looking to make my first contribution to the project and thought this would be a good issue to start with. Is there any particular unit test that would be best suited to a first time contributor or should I just dive in? Thanks :)
I'd be interested to work more on Variant tests. From what I can see the
NOT
operator has been tested already and there seem to be someEQUAL
comparisions already viaidentity_compare
, although the actual==
operator seems to usehash_compare
(at least in C++). So I have a few questions:
- Would it make sense to make another test case for
hash_compare
?- Should the comparision test cases only consider same type comparisions or should comparisions between i. e. Vector2 and Vector2i also be considered?
- A lot of operators only apply to a subset of valid Variant types and often only for the same type, should a failure in other cases also be tested?
@SilicDev Did you start this one? I was going to try it if it's still open.
I linked this issue but just to state for the record: I added some unit tests for UndoRedo
https://github.com/godotengine/godot/pull/85434
It's a pretty important and sophisticated system so surprised tests didn't exist for it already. May add more tests in the future if these ones are accepted.
@Phoenixcresset are you still working on Camera2D? I'd like to give it a try if not.
@Phoenixcresset are you still working on Camera2D? I'd like to give it a try if not.
We unfortunately reached a halt in our progress, so feel free to try your luck ! I can send you what we had done so far if you wish !
@Phoenixcresset are you still working on Camera2D? I'd like to give it a try if not.
We unfortunately reached a halt in our progress, so feel free to try your luck ! I can send you what we had done so far if you wish !
That would be great, thank you.
Hello, as a new contributor, I would like to try adding some unit tests for FontFile if that is still available.
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.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.
ui_focus_
actions). This class is complex, so tests for it can be split in multiple pull requests.look_at()
androtate_object_local()
.bake_scene()
and/orbake_single_node()
. These methods are not currently exposed to the scripting API, but they're still public methods.get_aabb()
.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.
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.