New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GD-322: Add option for automatic discovery of tests #322
Comments
Hi @dreed-sd, yes this is intended. I can just add a new option to enable real-time test discovering.
You do not always have to execute all tests, but can simply use the context menu, the FileSystemInspector or directly the script editor to run one or more test cases. |
We use VSCode with Godot, and when it's setup to do that you actually can't even view scripts in the built-in editor. If there's a way to get to your context menus with that in place, I don't know what it is. If there's a way to do it it's not obvious (to be fair I'm still fairly new to Godot). That might be fine if the tests were runnable in VSCode, but if I'm not mistaken that isn't available in 4.2 yet? All that seems to mean I have no way to run any tests without enabling the run overall button. If the issue is the performance of discovering all the tests, then I suggest at least starting off in a "click here to discover tests" state. The current behavior just looks like there are no tests, which makes it look broken. |
No we are just using GdScript with VSCode |
Ok, so you are using GDScript in VS Code, the upcoming .NET explorer will only recognize C# tests. |
Oh, that's disappointing to hear that there won't be GDScript support in VSCode? Are we crazy for using GdScript with VSCode? That I would have thought is a common configuration. We are new to the engine, maybe it isn't the case. I found GdUnit by looking for unit test frameworks that have a VSCode plugin. It doesn't though, if you're on the latest, and it won't, if you're not using C#... I suggest updating the docs to be clear about that. |
Well, primarily, I would see the Godot Editor for GDScripts. VS/Studio/Code should rather be used for C# scripts. |
Ok thanks. We use VSCode because it's a superior code editor. The built-in Editor is great, but VSCode is just a much better experience. |
Moved to milestone v4.3.0 it will be a bigger change set and needs a UI redesign. |
if you want to support execution of GDScript unit test on VSC please create a future request here, but this will have a very low priority. I need to focus on getting the C# API in good shape. |
# Why see #322 # What - added new option to enable/disable test discovery at runtime - fully reworked on inspector and all parts - using original editor icons for the inspector - delete icons we not use anymore - do code formattings on ui classes
…est discovery (#448) # Why see #322 # What - added new option to enable/disable test discovery at runtime - fully reworked on inspector and all parts - using original editor icons for the inspector - delete icons we not use anymore - do code formattings on all UI classes - add expand/collapse all to the inspector context menu ![image](https://github.com/MikeSchulze/gdUnit4/assets/347037/329430a9-1a3d-4137-a65e-09d2ad356519) ![image](https://github.com/MikeSchulze/gdUnit4/assets/347037/8120d75b-4a7e-41ba-aea2-a44c357f5ff7) # new settings ![image](https://github.com/MikeSchulze/gdUnit4/assets/347037/d2221cf0-a67e-4a19-9faf-391225d7cefb) ![image](https://github.com/MikeSchulze/gdUnit4/assets/347037/4689538f-25a8-47c1-83db-d2571dfc8025)
The used GdUnit4 version:
4.2.1
The used Godot version:
4.2 stable
OS including version:
Mac M1 / OSX
Describe the bug
The GdUnit panel shows no tests when first opening the project. If I click 'run overall tests', it successfully finds them all and runs them. I am not actually sure whether this is a bug, because maybe it isn't intended to do that? If not I'd call this a feature request. The 'run overall tests' button isn't even enabled by default in the config, so for a while when setting this up I thought GdUnit was just not working because I could not find a way to run any tests (and I am using VSCode, it seems 4.2 does not yet have a VSCode plugin, so I couldn't even run a specific test from code).
Steps to Reproduce
The text was updated successfully, but these errors were encountered: