-
Notifications
You must be signed in to change notification settings - Fork 26
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
Run NUnit/XUnit tests in Godot process #58
Conversation
I understand that for sure. |
Planned to be published with Rider 2020.1 EAP1. Compatibility with Unity was resolved. |
The extra files would probably be a good candidate for a godot addon. This way they would be contained in a 'standard location', and the addon would even have the ability to open a socket or create some other additional form of communication channel with rider for other project file related tasks. |
Has anyone managed to make NUnit/XUnit tests work for Godot 4? Tried everything suggested, but there's always a different kind of error. |
Yes, Nunit tests work for me. If you are using the latest EAP you can use this project as-is (with the test and game csproj cleanly separated from the sln), otherwise, use this commit: geowarin/GodotUnitTests@a4d2ac2 |
Pure xunit works only to some extent, check the https://github.com/van800/godot-demo-projects/tree/net6/mono/dodge_the_creeps . But there is a wip on godotxunit port to Godot 4 fledware/GodotXUnit#20. |
I've not been able to get tests to work on Godot 4. I've switched to the NetCoreRunner files featured in The tests are not run and say inconclusive. The window pops up like before (in 3.x) but immediately closes. I even tried the most basic test:
Using Godot Engine v4.1.stable.mono.official.970459615 The session file doesn't seem to throw and obvious to me errors. 2023-08-04-10-48-24-993___e770c8d2-def6-489d-8221-34afcbb5e532.log Any idea on why it isn't working out for me? I'm sure I've done something wrong! |
@van800 thanks for your hard work on this, I've been using it to great success and we've got over 400 tests running in just a few seconds in Rider! Unfortunately, I haven't figured out a way to run the tests from the command line, which means I can't get any CI up and running on GitHub or GitLab or anything. Do you know if this is possible currently? And if not, could you point me in the right direction for adding support for this to Godot myself? Note: I'm |
Addresses godotengine/godot-proposals#432
Applicable to Rider 2021.1 and newer versions:
RiderTestRunner
folder with files from here to your own project.How it works (optional read):
godot-support/resharper/src/UnitTesting/GodotTestRunnerHostProvider.cs
Line 20 in baf8c27
godot-support/resharper/src/UnitTesting/GodotTestRunnerHost.cs
Line 114 in baf8c27
https://github.com/van800/godot-demo-projects/tree/3b193ba6d6d3d5bac7ec2145cd5b4a0628d9202b/mono/dodge_the_creeps/RiderTestRunner
https://github.com/van800/godot-demo-projects/blob/3b193ba6d6d3d5bac7ec2145cd5b4a0628d9202b/mono/dodge_the_creeps/RiderTestRunner/Runner.cs#L31