Closed GeorgeS2019 closed 3 years ago
Sorry for the late comment.
I'm not entirely sure what's being asked. But this project isn't using NET5, it's on 4.7 iirc. I'm not very good with the build systems in dotnet, so suggestions and pull requests would be greatly appreciated.
One technical issue that should be brought up is with xunit. To have custom annotations (GodotFact), xunit requires the dll to be specified: https://github.com/fledware/GodotXUnit/blob/master/addons/GodotXUnit/GodotXUnitApi/GodotFactAttribute.cs#L48
I hope this clears some things up, let me know!
Also, I'd like to say thanks for the attention you've been giving to this project!
@rexfleischer NOT .NET5 but .NET5 project format.
<Project Sdk="Godot.NET.Sdk/3.3.0">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
I feedback that it is more the issue we need to sort out as discussed here, the benefit of .NET5 project format for simplicity
@rexfleischer The other issues are as described, not sure if you have solutions soon
- non IDE integration
This would be really cool and I wanted to look into building a plugin for intellij to run tests there. But, all these build issues came up.
- using GD.Print statement within test (e.g. Fact and GodotFact) is not show up in the output of the (positive) test results ==> now we only get "No output"
This is definitely on my radar of things. The issue is that the godot tests run in a different process than the godot IDE, so there needs to be a way to grab output sent by GD.Print, which I couldnt find. You can either use console output, or GDU.Print.
I see what you mean now by the mixing of project builds. That's the main problem that I ran into. Godot 3.2.3 very forcefully changed the csproj file on the root. For instance, if you pull down this project, godot will change the csproj file. But you can see it is the same: https://github.com/fledware/GodotXUnit/blob/master/GodotXUnit.csproj#L2
And I couldn't get Godot.NET.Sdk/3.2.3 to build the sub projects.
@rexfleischer
Godot 3.2.3 very forcefully changed the csproj file
At least you have a provision for calling test.dll at a custom folder outside the godot project. I have not tested it yet. This could be one way to bring most of the unit tests in cs projects outside the godot project folder and use the .NET5 SDK project format.
That may be true, but then I don't think intellij will be able to find it if the attributes are hot loaded during compile time. I don't think that's a pattern I'd like to support.
@rexfleischer Do you plan to support Visual Studio e.g. 2019? There is a VS2019 Godot extension. Do you see a way to combine it?
I wasn't planning to. The only one I was planning to support was rider, because that's the IDE I use.
I was planning on doing this same type of thing when kotlin scripting becomes stable. I'd be able to reuse integration work with rider with the kotlin IDE.
I'm going to close this for now as won't fix. Until there is a way to have a multi project in godot, I'm not aware of a way to fix it.
If someone has a suggestion on how to have a multi project or some other solution, please open a different ticket as an enhancement.
Please look at the discussion here to understand the question addressed to the author of GodotXUnit