MikeSchulze / gdUnit4Net

A Godot C# Unit Test Framework.
MIT License
61 stars 5 forks source link

GD-143: Rider test debugging doesn't work #143

Closed JustASquid closed 4 days ago

JustASquid commented 4 weeks ago

The used GdUnit4 version

4.4.1 (Pre Release/Master branch)

The used Godot version

v4.3

Operating System

Windows

Describe the bug

I've followed all the steps in the documentation to setup integration with Rider. Using Rider 2024.2.7.

On rider start, I see that it has picked up the unit tests:

image

Running the test in Rider works as expected - the project application is launched, the test runs and then the project application closes.

However, debugging the test doesn't work. The test doesn't succeed or fail, instead nothing happens. Afterwards, Rider loses track of the test altogether:

image

Running dotnet test directly works fine and runs all the tests.

Could I be missing something?

Steps to Reproduce

Example:

  1. Open the application.
  2. Click on '...' button.
  3. Enter '...' in the input field.
  4. Click on 'Submit'.
  5. Observe the error in the console.

If the issue involves code, please include relevant snippets below:

# Sample code demonstrating the issue
func reproduce_issue():
    # Your code here
    pass

Minimal reproduction project

No response

MikeSchulze commented 4 weeks ago

Hi, can you please add the missing information.

MikeSchulze commented 3 weeks ago

Hi @JustASquid can you please provide the requested information?

JustASquid commented 3 weeks ago

Sorry @MikeSchulze

System: Windows 10 Package versions:

    <PackageReference Include="gdUnit4.api" Version="4.4.*" />
    <PackageReference Include="gdUnit4.test.adapter" Version="2.*" />

Where can I find the test execution log? I don't see how that's useful anyway if the problem is "Rider doesn't pick up the tests"

MikeSchulze commented 3 weeks ago

Where can I find the test execution log? I don't see how that's useful anyway if the problem is "Rider doesn't pick up the tests"

image

Check your project is configured correctly, do not use release candidates, there is no guaranty of all works.

https://mikeschulze.github.io/gdUnit4/csharp_project_setup/vstest-adapter/#install-nuget-packages-and-project-references

Here the actual suggested project configuration:

  <PropertyGroup>
    <TargetFrameworks>net8.0</TargetFrameworks>
    <LangVersion>11.0</LangVersion>
    <!--Force nullable warnings, you can disable if you want-->
    <Nullable>enable</Nullable>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
    <!--Disable warning of invalid/incompatible GodotSharp version-->
    <NoWarn>NU1605</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <!--Required for GdUnit4-->
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
    <PackageReference Include="gdUnit4.api" Version="4.3.*" />
    <PackageReference Include="gdUnit4.test.adapter" Version="2.*" />
  </ItemGroup>

Have you setup the .runsettings ? https://mikeschulze.github.io/gdUnit4/csharp_project_setup/vstest-adapter/#preconditions

MikeSchulze commented 2 weeks ago

Hi @JustASquid any update?

MikeSchulze commented 4 days ago

Closed, I am not able to reproduce it and the reporter no longer responds